macacajs / macaca-android

🤖 Macaca Android driver
https://macacajs.github.io/guide/versioning.html
MIT License
52 stars 21 forks source link

升级到2.0.40后用例出现异常:Request:http://localhost:3456/wd/hub/session/c68bfd70-37a8-4ee4-b380-75ab547648ce/element/1/displayed #72

Open shutiger opened 7 years ago

shutiger commented 7 years ago

版本号: macaca-android: 2.0.40 macaca-cli:2.0.10

更新前用例跑起来没问题,更新之后几乎无法跑起来了,如错误日志中描述,好像是macaca.client.commands.Element中的isDisplayed()方法报错了。

错误日志如下: 2017-10-12 19:47:13 Request:http://localhost:3456/wd/hub/session/c68bfd70-37a8-4ee4-b380-75ab547648ce/element:{"using":"name","value":"广场"} 2017-10-12 19:47:16 Response:{"status":0,"value":{"ELEMENT":"1"},"sessionId":"c68bfd70-37a8-4ee4-b380-75ab547648ce"} 2017-10-12 19:47:16 Request:http://localhost:3456/wd/hub/session/c68bfd70-37a8-4ee4-b380-75ab547648ce/element/1/displayed 2017-10-12 19:47:19 Response:{"status":13,"value":"An unknown server-side error occurred while processing the command.","sessionId":"c68bfd70-37a8-4ee4-b380-75ab547648ce"} attempt to search the element for 0 times

shutiger commented 7 years ago

刚才让同事升级到2.0.40出现了同样的问题,应该不是我机子的问题

shutiger commented 7 years ago

macaca server端的日志

proxy.js:55:14 [master] pid:22475 Proxy: /wd/hub/session/27a5e676-7206-403f-8b59-75f9eade4669/element:POST to http://127.0.0.1:9001/wd/hub/session/:sessionId/element:POST with body: {"using":"name","value":"广场"} uiautomator-client.js:61:14 [master] pid:22475

proxy.js:85:20 [master] pid:22475 Got response with status 200: {"status":0,"value":{"ELEMENT":"1"},"sessionId":"27a5e676-7206-403f-8b59-75f9eade4669"} session.js:109:14 [master] pid:22475 Send HTTP Respone to Client[2017-10-13 10:09:27]: {"status":0,"value":"{\"ELEMENT\":\"1\"}","sessionId":"27a5e676-7206-403f-8b59-75f9eade4669"} responseHandler.js:11:12 [master] pid:22475 Recieve HTTP Request from Client[2017-10-13 10:09:27]: method: GET url: /wd/hub/session/27a5e676-7206-403f-8b59-75f9eade4669/element/1/displayed, jsonBody: {}