Macaca 切换 webview,提示 no such session。

dustin · 2017年06月18日 · 最后由 dustin 回复于 2017年07月03日 · 2052 次阅读

chromedriver starting success.
proxy.js:52:14 [master] pid:17476 Proxy: /status:GET to http://localhost:9515
/wd/hub/status:GET with body:
proxy.js:58:16 [master] pid:17476 Got response with status 200: "{\"sessionId
\":\"\",\"status\":0,\"value\":{\"build\":{\"version\":\"alpha\"},\"os\":{\"arch
\":\"x86_64\",\"name\":\"Windows NT\",\"version\":\"6.1 SP1\"}}}"
proxy.js:52:14 [master] pid:17476 Proxy: /session:POST to http://localhost:95
15/wd/hub/session:POST with body: {"desiredCapabilities":{"chromeOptions":{"andr
oidPackage":"xxxxxxxxxxxxxx","androidUseRunningApp":true,"androidDevic
eSerial":"17a8606b"}}}
proxy.js:58:16 [master] pid:17476 Got response with status 200: {"sessionId":
"688740ab7566902ca24146c591529fc4","status":33,"value":{"message":"session not c
reated exception\nfrom unknown error: Runtime.executionContextCreated has invali
d 'context': {\"auxData...
chromedriver ready with: {"sessionId":null,"status":33,"value":{"message":"se
ssion not created exception\nfrom unknown error: Runtime.executionContextCreated
has invalid 'context': {\"auxData\":{\"frameId\":\"24725.5\",\"isDefault\":true
},\"id\":5,\"name\":\"\",\"origin\":\"https://en"}\ (Session inf
o: chrome=58.0.3029.83)\n (Driver info: chromedriver=2.20.353145 (343b531d31eeb
933ec778dbcf7081628a1396067),platform=Windows NT 6.1 SP1 x86_64)"}}
proxy.js:52:14 [master] pid:17476 Proxy: /wd/hub/session/:sessionId/window_ha
ndles:GET to http://localhost:9515/wd/hub/session/688740ab7566902ca24146c591529f
c4/window_handles:GET with body: {}
proxy.js:58:16 [master] pid:17476 Got response with status 200: {"sessionId":
"688740ab7566902ca24146c591529fc4","status":6,"value":{"message":"no such sessio
n\n (Driver info: chromedriver=2.20.353145 (343b531d31eeb933ec778dbcf7081628a13
96067),platform=Windows ...
responseHandler.js:54:12 [master] pid:17476 Send Error Respone to Client: NoS
uchDriver: no such session
(Driver info: chromedriver=2.20.353145 (343b531d31eeb933ec778dbcf7081628a13960
67),platform=Windows NT 6.1 SP1 x86_64)
responseHandler.js:60:14 [master] pid:17476 NoSuchDriver: no such session
(Driver info: chromedriver=2.20.353145 (343b531d31eeb933ec778dbcf7081628a13960
67),platform=Windows NT 6.1 SP1 x86_64)
at Object._.parseWebDriverResult (C:\Users\Administrator\AppData\Roaming\npm
\node_modules\macaca-android\lib\helper.js:72:11)
at Android.getWebviews (C:\Users\Administrator\AppData\Roaming\npm\node_modu
les\macaca-android\lib\macaca-android.js:306:16)
at next (native)
at onFulfilled (C:\Users\Administrator\AppData\Roaming\npm\node_modules\maca
ca-cli\node_modules\co\index.js:65:19)
at process._tickCallback (internal/process/next_tick.js:109:7)
responseHandler.js:76:14 [master] pid:17476 Send Bad HTTP Respone to Client[2
017-06-18 22:07:26]: {"sessionId":"0e96fab1-e904-4560-85c1-f1cb7f787c41","status
":6,"value":{"message":"no such session\n (Driver info: chromedriver=2.20.35314
5 (343b531d31eeb933ec778dbcf7081628a1396067),platform=Windows NT 6.1 SP1 x86_64)
"}}
responseHandler.js:11:12 [master] pid:17476 Recieve HTTP Request from Client[
2017-06-18 22:07:26]: method: GET url: /wd/hub/session/0e96fab1-e904-4560-85c1-f
1cb7f787c41/screenshot, jsonBody: {}
responseHandler.js:47:14 [master] pid:17476 Send HTTP Respone to Client[2017-
06-18 22:07:26]: {"sessionId":"0e96fab1-e904-4560-85c1-f1cb7f787c41","status":0,
"value":"\"iVBORw0KGgoAAAANSUhEUgAABDgAAAeACAYAAAArYecKAAAABHNCSVQICAgIfAhkiAAAI
ABJREFUeJzsnXl8TGf7/z9nJvsesokSRSUVe4XUTlUpWrXUWrSllNZSpVp7FbU9RfFYSi0PuqCo6kbtg
iL22HdiSUIiss7M9fvDb04zmcmeSSb9ft6vl9fbzDnnPvc5ZzJzznWuc90AIIqiCE3TNE3TNE3TNE3Td
Im1TXSCpmmapmmapmmapmm6AIYtdIKmaZqmaZqmaZqmabpAtolO0DRN0zRN0zRN0zRNF8CwhU7QNE3TN
E3TNE3TNE0XyDbRCZqmaZqmaZqmaZqm6QIYttAJmqZpmqZpmqZpmqbpAtkmOkHTNE3TNE3TNE3TNF0Aw
xY6QdM0..."}
responseHandler.js:11:12 [master] pid:17476 Recieve HTTP Request from Client[
2017-06-18 22:07:28]: method: DELETE url: /wd/hub/session/0e96fab1-e904-4560-85c
1-f1cb7f787c41, jsonBody: {}
session.js:80:12 [master] pid:17476 Delete session, sessionId: 0e96fab1-e904-
4560-85c1-f1cb7f787c41
responseHandler.js:47:14 [master] pid:17476 Send HTTP Respone to Client[2017-
06-18 22:07:28]: {"sessionId":"0e96fab1-e904-4560-85c1-f1cb7f787c41","status":0}

macaca-chromedriver.js:123:18 [master] pid:17476 chromedriver exit with code:
null, signal: SIGTERM
uiautomator-client.js:56:14 [master] pid:17476 INSTRUMENTATION_RESULT: shortM
sg=Process crashed.
uiautomator-client.js:56:14 [master] pid:17476
INSTRUMENTATION_CODE: 0

共收到 5 条回复 时间 点赞

已解决:android system webview 与 chromedriver 的问题

dustin 关闭了讨论 06月19日 11:01
dustin 重新开启了讨论 06月19日 13:26
dustin 回复

具体应该怎么处理

回复

我写了个解决方法的帖子,你可以看下。

dustin 回复

链接在哪里

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册