以前都用的低版本的手机做并发,并发时未发现此问题,最近需要对高版本的手机做兼容时,根据版本高低加入了 automationName=uiautomator2 和 systemPort 后,发现在并发时,有时候手机会用例跑一半时不动了,log 如下:
[W3C (fa8d7b55)] Driver proxy active, passing request on via HTTP proxy
[WD Proxy] Got an unexpected response: {"code":"ESOCKETTIMEDOUT","connect":false}
[debug] [WD Proxy] Matched '/wd/hub/session/fa8d7b55-bcb7-4947-ad19-5769aaca0736/source' to command name 'getPageSource'
[debug] [WD Proxy] Proxying [GET /wd/hub/session/fa8d7b55-bcb7-4947-ad19-5769aaca0736/source] to [GET http://localhost:8235/wd/hub/session/1ad6799e-2b0f-46bb-8f3a-8bfdd95e91d3/source] with body: {}
[debug] [W3C (fa8d7b55)] Encountered internal error running command: Error: Could not proxy. Proxy error: Could not proxy command to remote server. Original error: Error: ESOCKETTIMEDOUT
[debug] [W3C (fa8d7b55)] at doJwpProxy (C:\Users\yangmeng\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\protocol\protocol.js:547:13)
[debug] [W3C (fa8d7b55)] at
[debug] [W3C (fa8d7b55)] at process._tickCallback (internal/process/next_tick.js:188:7)
[WD Proxy] Got an unexpected response: {"code":"ESOCKETTIMEDOUT","connect":false}
[debug] [W3C (fa8d7b55)] Encountered internal error running command: Error: Could not proxy. Proxy error: Could not proxy command to remote server. Original error: Error: ESOCKETTIMEDOUT
[debug] [W3C (fa8d7b55)] at doJwpProxy (C:\Users\yangmeng\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\protocol\protocol.js:547:13)
[debug] [W3C (fa8d7b55)] at
[HTTP] <-- GET /wd/hub/session/fa8d7b55-bcb7-4947-ad19-5769aaca0736/source 500 360025 ms - 807
但是低版本的手机中都不会出现
环境:
python2.7
appium-server 1.12.0