首页 文章

Appium例外“'t stop process; it'目前无法正常运行”

提问于
浏览
0

环境:

  • java-client(6.0.0-BETA4)

  • 服务器Appium(1.5.0)

  • java 1.8

在自动化测试期间,当在Android模拟器上运行时,Appium会一直停滞不前 .

很少有测试因为问题而失败似乎是服务器问题:

Exception:

“org.openqa.selenium.WebDriverException:处理命令时发生未知的服务器端错误 . 原始错误:无法停止进程;它当前未运行”

有没有任何已知的方法来避免这个问题?

这是来自Appium服务器的更多堆栈跟踪:

[debug] [ADB] Running ‘…/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop com.go.android'[debug] [ADB] Pressing the HOME button
[debug] [ADB] Getting connected devices...[debug] [ADB] Pressing the HOME button
[debug] [ADB] Getting connected devices...[debug] [AndroidBootstrap] Sending command to android: {"cmd":"shutdown"}[debug] [AndroidBootstrap] Sending command to android: {"cmd":"shutdown"}
[debug] [AndroidBootstrap] Received command result from bootstrap
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {"cmd":"shutdown"}
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type SHUTDOWN
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {"status":0,"value":"OK, shutting down"}
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Closed client connection
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: numtests=1
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: stream=.
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: current=1
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS_CODE: 0
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: stream=
[debug] [AndroidBootstrap] [UIAUTO STDOUT] Test results for WatcherResultPrinter=.
[debug] [AndroidBootstrap] [UIAUTO STDOUT] Time: 52.015
[debug] [AndroidBootstrap] [UIAUTO STDOUT] OK (1 test)
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS_CODE: -1
[error] [UiAutomator] UiAutomator exited unexpectedly with code 0, signal null
[debug] [UiAutomator] Moving to state 'stopped'
[debug] [UiAutomator] Shutting down UiAutomator
[debug] [UiAutomator] Moving to state 'stopping'
[error] [Appium] Had trouble ending session fc510427-6374-4d94-83b4-f008e05f8d69: Can't stop process; it's not currently running (cmd: ‘/…/Library/Android/sdk/platform-tools/adb')
[error] [MJSONWP] Encountered internal error running command: Error: Can't stop process; it's not currently running (cmd: '/Users/Library/Android/sdk/platform-tools/adb')

使用“HOME”按钮退出应用程序时看起来失败了 .

1 回答

  • 0

    使用“允许会话覆盖”运行测试时发生此问题 . 关闭此选项,测试不再失败(运行超过500)测试,所以我的结论是这个选项导致了这个问题 .

相关问题