解决Chromedriver报错Chromedriver exited unexpectedly with code 1, signal null


报错信息如下:

error: Chromedriver: Chromedriver exited unexpectedly with code 1, signal null
info: Chromedriver: Changed state to 'stopped'
warn: Chromedriver for context WEBVIEW_com.tencent.mm:tools stopped unexpectedly

error: Chromedriver quit unexpectedly during session
info: --> GET /wd/hub/session/1c76403c-a713-403f-96ac-3e59cfdb7919/source {}
info: JSONWP Proxy: Proxying [GET /wd/hub/session/1c76403c-a713-403f-96ac-3e59cf
db7919/source] to [GET http://127.0.0.1:9515/wd/hub/session/d7b57614f78bf16972f2
a5bab7a69bf2/source] with body: {}
info: JSONWP Proxy: Got response with status 200: {"sessionId":"d7b57614f78bf169
72f2a5bab7a69bf2","status":6,"value":{"message":"no such session\n  (Driver info
: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=W
indows ...
info: JSONWP Proxy: Replacing sessionId d7b57614f78bf16972f2a5bab7a69bf2 with 1c
76403c-a713-403f-96ac-3e59cfdb7919
info: <-- GET /wd/hub/session/1c76403c-a713-403f-96ac-3e59cfdb7919/source 200 22
.285 ms - 218
info: --> GET /wd/hub/session/1c76403c-a713-403f-96ac-3e59cfdb7919/source {}
info: JSONWP Proxy: Proxying [GET /wd/hub/session/1c76403c-a713-403f-96ac-3e59cf
db7919/source] to [GET http://127.0.0.1:9515/wd/hub/session/d7b57614f78bf16972f2
a5bab7a69bf2/source] with body: {}
info: JSONWP Proxy: Got response with status 200: {"sessionId":"d7b57614f78bf169
72f2a5bab7a69bf2","status":6,"value":{"message":"no such session\n  (Driver info
: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=W
indows ...
info: JSONWP Proxy: Replacing sessionId d7b57614f78bf16972f2a5bab7a69bf2 with 1c
76403c-a713-403f-96ac-3e59cfdb7919
info: <-- GET /wd/hub/session/1c76403c-a713-403f-96ac-3e59cfdb7919/source 200 15
.619 ms - 218
info: [debug] Didn't get a new command in 60 secs, shutting down...
info: Shutting down appium session
info: [debug] Pressing the HOME button
info: [debug] executing cmd: D:\Android\sdk\platform-tools\adb.exe -s 7N2TDM158V
040983 shell "input keyevent 3"
info: [debug] Resetting IME to 'com.sohu.inputmethod.sogou/.SogouIME'
info: [debug] executing cmd: D:\Android\sdk\platform-tools\adb.exe -s 7N2TDM158V
040983 shell "ime set com.sohu.inputmethod.sogou/.SogouIME"
info: [debug] Stopping logcat capture
info: [debug] Logcat terminated with code null, signal SIGTERM
info: [debug] Stopping chromedriver for context WEBVIEW_com.tencent.mm:tools
info: Chromedriver: Changed state to 'stopping'
info: JSONWP Proxy: Proxying [DELETE /] to [DELETE http://127.0.0.1:9515/wd/hub/
session/d7b57614f78bf16972f2a5bab7a69bf2] with no body
info: JSONWP Proxy: Got response with status 200: "{\"sessionId\":\"d7b57614f78b
f16972f2a5bab7a69bf2\",\"status\":0,\"value\":null}"
error: Chromedriver: Error: Can't stop process; it's not currently running
    at SubProcess.stop$ (lib/teen_process.js:211:13)
    at tryCatch (D:\Appium\node_modules\appium\node_modules\appium-chromedriver\
node_modules\teen_process\node_modules\babel-runtime\regenerator\runtime.js:67:4
0)
    at GeneratorFunctionPrototype.invoke [as _invoke] (D:\Appium\node_modules\ap
pium\node_modules\appium-chromedriver\node_modules\teen_process\node_modules\bab
el-runtime\regenerator\runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (D:\A
ppium\node_modules\appium\node_modules\appium-chromedriver\node_modules\teen_pro
cess\node_modules\babel-runtime\regenerator\runtime.js:100:21)
    at invoke (D:\Appium\node_modules\appium\node_modules\appium-chromedriver\no
de_modules\teen_process\node_modules\babel-runtime\regenerator\runtime.js:136:37
)
    at bound (domain.js:250:14)
    at runBound (domain.js:263:12)
    at enqueueResult (D:\Appium\node_modules\appium\node_modules\appium-chromedr
iver\node_modules\teen_process\node_modules\babel-runtime\regenerator\runtime.js
:185:17)
    at new Promise (D:\Appium\node_modules\appium\node_modules\appium-chromedriv
er\node_modules\teen_process\node_modules\babel-runtime\node_modules\core-js\lib
rary\modules\es6.promise.js:182:7)
    at AsyncIterator.enqueue (D:\Appium\node_modules\appium\node_modules\appium-
chromedriver\node_modules\teen_process\node_modules\babel-runtime\regenerator\ru
ntime.js:184:12)
    at AsyncIterator.prototype.(anonymous function) [as next] (D:\Appium\node_mo
dules\appium\node_modules\appium-chromedriver\node_modules\teen_process\node_mod
ules\babel-runtime\regenerator\runtime.js:100:21)
    at Object.runtime.async (D:\Appium\node_modules\appium\node_modules\appium-c
hromedriver\node_modules\teen_process\node_modules\babel-runtime\regenerator\run
time.js:209:12)
    at SubProcess.stop (lib/teen_process.js:209:50)
    at Chromedriver.stop$ (lib/chromedriver.js:153:23)
    at tryCatch (D:\Appium\node_modules\appium\node_modules\appium-chromedriver\
node_modules\babel-runtime\regenerator\runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (D:\Appium\node_modules\ap
pium\node_modules\appium-chromedriver\node_modules\babel-runtime\regenerator\run
time.js:294:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (D:\A
ppium\node_modules\appium\node_modules\appium-chromedriver\node_modules\babel-ru
ntime\regenerator\runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (D:\Appium\node_modules\appium\node_mod
ules\appium-chromedriver\node_modules\babel-runtime\regenerator\runtime.js:136:3
7)
    at bound (domain.js:250:14)
    at GeneratorFunctionPrototype.runBound (domain.js:263:12)
    at run (D:\Appium\node_modules\appium\node_modules\appium-chromedriver\node_
modules\babel-runtime\node_modules\core-js\library\modules\es6.promise.js:89:39)

    at D:\Appium\node_modules\appium\node_modules\appium-chromedriver\node_modul
es\babel-runtime\node_modules\core-js\library\modules\es6.promise.js:100:28
    at doNTCallback0 (node.js:407:9)
    at process._tickDomainCallback (node.js:377:13)
 [Error: Can't stop process; it's not currently running]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"shutdown"}
info: [debug] [BOOTSTRAP] [debug] Got command of type SHUTDOWN
info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":"OK, shutting down"
,"status":0}
info: [debug] [BOOTSTRAP] [debug] Closed client connection
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=.
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRun
ner
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.andro
id.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 0
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
info: [debug] [UIAUTOMATOR STDOUT] Test results for WatcherResultPrinter=.
info: [debug] [UIAUTOMATOR STDOUT] Time: 159.225
info: [debug] [UIAUTOMATOR STDOUT] OK (1 test)
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: -1
info: [debug] Sent shutdown command, waiting for UiAutomator to stop...
info: [debug] UiAutomator shut down normally
info: [debug] Cleaning up android objects
info: [debug] Cleaning up appium session
info: [debug] We shut down because no new commands came in

解决办法:

appium命令行指定端口 C:\Users\Administrator>appium --no-reset --port 4735 --bootstrap-port 4736 --udi
d b9979003 --chromedriver-port 8000


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM