macaca icon indicating copy to clipboard operation
macaca copied to clipboard

用例运行失败后重试导致手机重启

Open laiyuncong8404 opened this issue 8 years ago • 3 comments

  • Macaca Version: 2.0.4

  • Macaca Doctor Logs: macaca-doctor version: 2.0.1

    Node.js checklist:

    node env: /usr/local/bin/node node version: v7.7.1

    iOS checklist:

    Xcode Command Line Tools is ready, version: 2347. xcodebuild version: 8.3.2 iproxy[usbmuxd] is installed at: /usr/local/bin/iproxy ios_webkit_debug_proxy is installed at: /usr/local/bin/ios_webkit_debug_proxy carthage is installed, version: 0.24.0

    Android checklist:

    JAVA version is 1.8.0_121 JAVA_HOME is set to /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home ANDROID_HOME is set to /Users/xiaoxue/Library/android-sdk-macosx Platforms is set to /Users/xiaoxue/Library/android-sdk-macosx/platforms/android-25 ADB tool is set to /Users/xiaoxue/Library/android-sdk-macosx/platform-tools/adb gradle is installed, version: 3.5

    Installed driver list:

    android: 2.0.30 chrome: 1.0.6 electron: 1.1.7 ios: 2.0.22

  • Operate System: OSX 10.12.3 Android: 5.1.1 品牌:红米3

  • Programming Language: python

  • 错误概况 由于 https://github.com/alibaba/macaca/issues/656错误,所以在没有重启macaca server的情况下,直接重新运行用例,一般重试第3次,有90%以上概率导致手机自动重启。

laiyuncong8404 avatar Jul 26 '17 09:07 laiyuncong8404

@laiyuncong8404 I could not reproduce this issue, can you please try other phones and see if the reboot issue happen on them as well?

qichuan avatar Oct 26 '17 00:10 qichuan

This issue does no longer exist, but i get another issue. send_keys method doesn't work as expected.

Appium Log

>> responseHandler.js:11:12 [master] pid:4174 Recieve HTTP Request from Client[2017-10-27 10:26:08]: method: POST url: /wd/hub/session/40f3dadb-a5b3-4381-a866-304470db7773/element, jsonBody: {"using":"name","value":"Subscribe"}
>> proxy.js:55:14 [master] pid:4174 Proxy: /wd/hub/session/40f3dadb-a5b3-4381-a866-304470db7773/element:POST to http://127.0.0.1:9008/wd/hub/session/40f3dadb-a5b3-4381-a866-304470db7773/element:POST with body: {"using":"name","value":"Subscribe"}
>> proxy.js:85:20 [master] pid:4174 Got response with status 200: {"sessionId":null,"status":0,"value":{"ELEMENT":"1"}}
>> session.js:109:14 [master] pid:4174 Send HTTP Respone to Client[2017-10-27 10:26:09]: {"sessionId":null,"status":0,"value":"{\"ELEMENT\":\"1\"}"}
>> responseHandler.js:11:12 [master] pid:4174 Recieve HTTP Request from Client[2017-10-27 10:26:09]: method: GET url: /wd/hub/session/40f3dadb-a5b3-4381-a866-304470db7773/element/1/displayed, jsonBody: {}
>> proxy.js:55:14 [master] pid:4174 Proxy: /wd/hub/session/40f3dadb-a5b3-4381-a866-304470db7773/element/1/displayed:GET to http://127.0.0.1:9008/wd/hub/session/40f3dadb-a5b3-4381-a866-304470db7773/element/1/displayed:GET with body: {}
>> proxy.js:85:20 [master] pid:4174 Got response with status 200: {"sessionId":"40f3dadb-a5b3-4381-a866-304470db7773","status":0,"value":true}
>> session.js:109:14 [master] pid:4174 Send HTTP Respone to Client[2017-10-27 10:26:09]: {"sessionId":"40f3dadb-a5b3-4381-a866-304470db7773","status":0,"value":"true"}
>> responseHandler.js:11:12 [master] pid:4174 Recieve HTTP Request from Client[2017-10-27 10:26:09]: method: POST url: /wd/hub/session/40f3dadb-a5b3-4381-a866-304470db7773/element/1/click, jsonBody: {}
>> proxy.js:55:14 [master] pid:4174 Proxy: /wd/hub/session/40f3dadb-a5b3-4381-a866-304470db7773/element/1/click:POST to http://127.0.0.1:9008/wd/hub/session/40f3dadb-a5b3-4381-a866-304470db7773/element/1/click:POST with body: {}
>> proxy.js:85:20 [master] pid:4174 Got response with status 200: {"sessionId":"40f3dadb-a5b3-4381-a866-304470db7773","status":0}
>> session.js:109:14 [master] pid:4174 Send HTTP Respone to Client[2017-10-27 10:26:09]: {"sessionId":"40f3dadb-a5b3-4381-a866-304470db7773","status":0}
>> responseHandler.js:11:12 [master] pid:4174 Recieve HTTP Request from Client[2017-10-27 10:26:09]: method: POST url: /wd/hub/session/40f3dadb-a5b3-4381-a866-304470db7773/element, jsonBody: {"using":"id","value":"io.emqtt.sample:id/topic"}
>> proxy.js:55:14 [master] pid:4174 Proxy: /wd/hub/session/40f3dadb-a5b3-4381-a866-304470db7773/element:POST to http://127.0.0.1:9008/wd/hub/session/40f3dadb-a5b3-4381-a866-304470db7773/element:POST with body: {"using":"id","value":"io.emqtt.sample:id/topic"}
>> proxy.js:85:20 [master] pid:4174 Got response with status 200: {"sessionId":"40f3dadb-a5b3-4381-a866-304470db7773","status":0,"value":{"ELEMENT":"1"}}
>> session.js:109:14 [master] pid:4174 Send HTTP Respone to Client[2017-10-27 10:26:10]: {"sessionId":"40f3dadb-a5b3-4381-a866-304470db7773","status":0,"value":"{\"ELEMENT\":\"1\"}"}
>> responseHandler.js:11:12 [master] pid:4174 Recieve HTTP Request from Client[2017-10-27 10:26:10]: method: POST url: /wd/hub/session/40f3dadb-a5b3-4381-a866-304470db7773/element/1/value, jsonBody: {"value":["encyclopedia/#"]}
>> proxy.js:55:14 [master] pid:4174 Proxy: /wd/hub/session/40f3dadb-a5b3-4381-a866-304470db7773/element/1/value:POST to http://127.0.0.1:9008/wd/hub/session/40f3dadb-a5b3-4381-a866-304470db7773/element/1/value:POST with body: {"value":["encyclopedia/#"]}
>> proxy.js:85:20 [master] pid:4174 Got response with status 200: {"sessionId":"40f3dadb-a5b3-4381-a866-304470db7773","status":13,"value":"An unknown server-side error occurred while processing the command."}
>> session.js:109:14 [master] pid:4174 Send HTTP Respone to Client[2017-10-27 10:26:10]: {"sessionId":"40f3dadb-a5b3-4381-a866-304470db7773","status":13,"value":"\"An unknown server-side error occurred while processing the command.\""}

Python Log

Traceback (most recent call last):
  File "MQTT.test.py", line 75, in test_01_sub
    .send_keys('encyclopedia/#')
  File "/Users/xiaoxue/Library/Python/2.7/lib/python/site-packages/macaca/util.py", line 145, in fluent_interface
    ret = func(instance, *args, **kwargs)
  File "/Users/xiaoxue/Library/Python/2.7/lib/python/site-packages/macaca/webelement.py", line 435, in send_keys
    'value': value_to_key_strokes(value)})
  File "/Users/xiaoxue/Library/Python/2.7/lib/python/site-packages/macaca/webelement.py", line 60, in _execute
    return self._driver._execute(command, data, unpack)
  File "/Users/xiaoxue/Library/Python/2.7/lib/python/site-packages/macaca/webdriver.py", line 68, in _execute
    ret.raise_for_status()
  File "/Users/xiaoxue/Library/Python/2.7/lib/python/site-packages/macaca/webdriverresult.py", line 54, in raise_for_status
    raise WebDriverException(error, message, screen, stacktrace)
WebDriverException:
Error: WebDriverError.UNKNOWN_ERROR
Message: None

laiyuncong8404 avatar Oct 27 '17 02:10 laiyuncong8404

我也遇到一样的问题

njf1107 avatar Nov 07 '17 12:11 njf1107