ReactNative android Ошибка: превышено время ожидания 120000 мс - PullRequest
1 голос
/ 10 апреля 2019

Я получаю сообщение об ошибке в Android-устройстве ReactNative при тестировании с помощью детоксикации.Ошибка: «Ошибка: превышено время ожидания 120000 мсек. Для асинхронных тестов и перехватов убедитесь, что вызвано« done () »; при возврате Promise убедитесь, что оно разрешено».

React-Native: 0.57.7

Детокс-тест отлично работает с iOS без каких-либо проблем, но с ошибкой тайм-аута при работе с Android.Не уверен, где я должен проверить об этом.

node_modules/.bin/mocha e2e --opts e2e/mocha.opts --configuration android.emu.debug --loglevel verbose     --grep :ios: --invert      --artifacts-location "artifacts/android.emu.debug.2019-04-10 10-27-45Z"  


detox[30977] INFO:  [DetoxServer.js] server listening on localhost:51629...
detox[30977] DEBUG: [AsyncWebSocket.js/WEBSOCKET_OPEN] opened web socket to: ws://localhost:51629
detox[30977] DEBUG: [DetoxServer.js/LOGIN] role=tester, sessionId=c4ef8798-0ec8-3517-0a6f-56bb03181111
detox[30977] DEBUG: [DetoxServer.js/LOGIN_SUCCESS] role=tester, sessionId=c4ef8798-0ec8-3517-0a6f-56bb03181111
detox[30977] DEBUG: [exec.js/EXEC_CMD, #0] /Users/iphone/Library/Android/sdk/emulator/emulator -list-avds --verbose
detox[30977] DEBUG: [exec.js/EXEC_CMD, #1] /Users/iphone/Library/Android/sdk/platform-tools/adb  devices
detox[30977] DEBUG: [exec.js/EXEC_CMD, #2] /Users/iphone/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell "getprop dev.bootcomplete"
detox[30977] DEBUG: [exec.js/EXEC_CMD, #3] /Users/iphone/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell "getprop ro.build.version.sdk"
detox[30977] DEBUG: [exec.js/EXEC_CMD, #4] /Users/iphone/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell "dumpsys power | grep \"^[ ]*m[UW].*=\""
detox[30977] DEBUG: [exec.js/EXEC_CMD, #5] /Users/iphone/Library/Android/sdk/build-tools/28.0.3/aapt dump badging "/Users/iphone/Desktop/extra/reactnativegettingstarted/android/app/build/outputs/apk/debug/app-debug.apk" | grep -e "package: name="
detox[30977] DEBUG: [exec.js/EXEC_CMD, #6] /Users/iphone/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell "pm list packages com.plugindemoapp"
detox[30977] DEBUG: [exec.js/EXEC_CMD, #7] /Users/iphone/Library/Android/sdk/platform-tools/adb -s emulator-5554 uninstall com.plugindemoapp
detox[30977] DEBUG: [exec.js/EXEC_CMD, #8] /Users/iphone/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell "pm list packages com.plugindemoapp.test"
detox[30977] DEBUG: [exec.js/EXEC_CMD, #9] /Users/iphone/Library/Android/sdk/platform-tools/adb -s emulator-5554 uninstall com.plugindemoapp.test
detox[30977] DEBUG: [exec.js/EXEC_CMD, #10] /Users/iphone/Library/Android/sdk/platform-tools/adb -s emulator-5554 install -r -g -t /Users/iphone/Desktop/extra/reactnativegettingstarted/android/app/build/outputs/apk/debug/app-debug.apk
detox[30977] DEBUG: [exec.js/EXEC_CMD, #11] /Users/iphone/Library/Android/sdk/platform-tools/adb -s emulator-5554 install -r -g -t /Users/iphone/Desktop/extra/reactnativegettingstarted/android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk
detox[30977] DEBUG: [exec.js/EXEC_CMD, #12] /Users/iphone/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell "pm list instrumentation"
detox[30977] DEBUG: [exec.js/SPAWN_CMD, #13] [pid=30994] /Users/iphone/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell am instrument -w -r "-e detoxServer ws://localhost:51629 -e detoxSessionId c4ef8798-0ec8-3517-0a6f-56bb03181111" -e debug false com.plugindemoapp.test/android.support.test.runner.AndroidJUnitRunner
detox[30977] DEBUG: [exec.js/EXEC_CMD, #14] /Users/iphone/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell "ps | grep \"com\.plugindemoapp$\""
detox[30977] DEBUG: [exec.js/EXEC_FAIL, #14] "/Users/iphone/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell "ps | grep \"com\.plugindemoapp$\""" failed with code = 1, stdout and stderr:

detox[30977] DEBUG: [exec.js/EXEC_FAIL, #14] 
detox[30977] DEBUG: [exec.js/EXEC_FAIL, #14] 
detox[30977] DEBUG: [exec.js/EXEC_CMD, #15] /Users/iphone/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell "ps | grep \"com\.plugindemoapp$\""
detox[30977] DEBUG: [exec.js/EXEC_FAIL, #15] "/Users/iphone/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell "ps | grep \"com\.plugindemoapp$\""" failed with code = 1, stdout and stderr:

detox[30977] DEBUG: [exec.js/EXEC_FAIL, #15] 
detox[30977] DEBUG: [exec.js/EXEC_FAIL, #15] 
detox[30977] DEBUG: [exec.js/EXEC_CMD, #16] /Users/iphone/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell "ps | grep \"com\.plugindemoapp$\""
detox[30977] DEBUG: [DetoxServer.js/CANNOT_FORWARD] role=testee not connected, cannot fw action (sessionId=c4ef8798-0ec8-3517-0a6f-56bb03181111)
detox[30977] DEBUG: [exec.js/KILL] sending SIGINT to [pid = 30994]: /Users/iphone/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell am instrument -w -r -e detoxServer ws://localhost:51629 -e detoxSessionId c4ef8798-0ec8-3517-0a6f-56bb03181111 -e debug false com.plugindemoapp.test/android.support.test.runner.AndroidJUnitRunner
  1) "before all" hook

  0 passing (2m)
  1 failing

  1) "before all" hook:
     Error: Timeout of 120000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.





  0 passing (2m)
  1 failing

  1) "before all" hook:
     Error: Timeout of 120000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.




detox[30977] DEBUG: [DetoxServer.js/DISCONNECT] role=tester, sessionId=c4ef8798-0ec8-3517-0a6f-56bb03181111
child_process.js:656
    throw err;
    ^

Error: Command failed: node_modules/.bin/mocha e2e --opts e2e/mocha.opts --configuration android.emu.debug --loglevel verbose     --grep :ios: --invert      --artifacts-location "artifacts/android.emu.debug.2019-04-10 10-27-45Z"  
    at checkExecSyncError (child_process.js:616:11)
    at Object.execSync (child_process.js:653:13)
    at runMocha (/Users/iphone/Desktop/extra/reactnativegettingstarted/node_modules/detox/local-cli/detox-test.js:143:6)
    at run (/Users/iphone/Desktop/extra/reactnativegettingstarted/node_modules/detox/local-cli/detox-test.js:85:7)
    at Object.<anonymous> (/Users/iphone/Desktop/extra/reactnativegettingstarted/node_modules/detox/local-cli/detox-test.js:233:1)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...