Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeout while attempting to run tests on android emulator #524

Closed
aoshi321 opened this issue Jan 17, 2018 · 21 comments
Closed

Timeout while attempting to run tests on android emulator #524

aoshi321 opened this issue Jan 17, 2018 · 21 comments

Comments

@aoshi321
Copy link

aoshi321 commented Jan 17, 2018

Description

While attempting to run run the tests they are timing out. The emulator does open along with the app and then closes when getting to the first screen. If I run the app alone in the emulator its works perfectly fine

Detox, Node, Device, Xcode and macOS Versions

  • Detox: 6.0.0
  • Node: 8.4.0
  • Device: Nexus_5X_API_25
  • macOS: 10.12.16

Steps to Reproduce

Running the following command to run the test:

detox test --loglevel verbose --configuration android.emu.release.

The package json has the following setup

"android.emu.release": {
    "binaryPath": "android/app/build/outputs/apk/app-release.apk",
    "build": "pushd android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release && popd",
    "type": "android.emulator",
    "name": "Nexus_5X_API_25"
  }

The build.grade has the following addition

testBuildType System.getProperty('testBuildType', 'debug')
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

androidTestCompile(project(path: ":detox", configuration: "oldOkhttpDebug"), {
exclude group: 'com.android.support', module: 'support-annotations'
exclude group: 'com.squareup.okhttp3', module: 'okhttp'
exclude group: 'com.squareup.okio', module: 'okio'

})

Notice I've had to exclude okhttp and okio as this was causing conflicts within my project.

Device and verbose Detox logs

node_modules/.bin/mocha e2e --opts e2e/mocha.opts --configuration android.emu.release --loglevel verbose

detox-server info 09:04:38: server listening on localhost:49646...
detox verb ws onOpen [object Object]
detox verb ws send: {"type":"login","params":{"sessionId":"608fcc81-99eb-aa4c-48aa-9f67a87e3de1","role":"tester"},"messageId":0}
detox verb ws onMessage: {"type":"loginSuccess","params":{"sessionId":"608fcc81-99eb-aa4c-48aa-9f67a87e3de1","role":"tester"},"messageId":0}
detox verb ws
detox verb 1: /Users/asbel/Library/Android/sdk/tools/emulator -list-avds --verbose
detox verb 1: stdout: Nexus_5X_API_25
detox verb 1: stdout: Nexus_5X_API_26_x86
detox verb 1: stdout: test
detox verb 1: stdout:
detox verb /Users/asbel/Library/Android/sdk/tools/emulator -verbose -gpu host -no-audio @Nexus_5X_API_25
(node:986) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
detox verb 2: /Users/asbel/Library/Android/sdk/platform-tools/adb devices
detox verb 2: stdout: List of devices attached
detox verb 2: stdout: emulator-5554 device
detox verb 2: stdout:
detox verb 2: stdout:
detox verb 3: /Users/asbel/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell getprop dev.bootcomplete
detox verb 3: stdout:
detox verb 3: stdout:
detox verb 4: /Users/asbel/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell getprop dev.bootcomplete
detox verb 4: stdout:
detox verb 4: stdout:
detox verb 5: /Users/asbel/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell getprop dev.bootcomplete
detox verb 5: stdout:
detox verb 5: stdout:
detox verb 6: /Users/asbel/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell getprop dev.bootcomplete
detox verb 6: stdout:
detox verb 6: stdout:
detox verb 7: /Users/asbel/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell getprop dev.bootcomplete
detox verb 7: stdout: 1
detox verb 7: stdout:
detox verb 8: /Users/asbel/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell input keyevent 82
detox verb 9: /Users/asbel/Library/Android/sdk/platform-tools/adb -s emulator-5554 uninstall com.testapp
detox verb 9: stdout: Success
detox verb 9: stdout:
detox verb 10: /Users/asbel/Library/Android/sdk/platform-tools/adb -s emulator-5554 uninstall com.testapp.test
detox verb 10: stdout: Success
detox verb 10: stdout:
detox verb 11: /Users/asbel/Library/Android/sdk/platform-tools/adb -s emulator-5554 install -r -g /Users/asbel/work/app-discovery/android/app/build/outputs/apk/app-release.apk
detox verb 11: stderr: Success
detox verb 11: stderr:
detox verb 12: /Users/asbel/Library/Android/sdk/platform-tools/adb -s emulator-5554 install -r -g /Users/asbel/work/app-discovery/android/app/build/outputs/apk/app-release-androidTest.apk
detox verb 12: stderr: Success
detox verb 12: stderr:
detox verb 13: /Users/asbel/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell am force-stop com.testapp
detox verb adb -s emulator-5554 shell am instrument -w -r -e detoxServer ws://localhost:49646 -e detoxSessionId 608fcc81-99eb-aa4c-48aa-9f67a87e3de1 -e debug false com.testapp.test/android.support.test.runner.AndroidJUnitRunner
detox verb Instrumentation spawned, childProcess.pid: 1021
detox verb ws send: {"type":"isReady","params":{},"messageId":-1000}
detox verb Instrumentation stdout: INSTRUMENTATION_STATUS: numtests=1
detox verb Instrumentation stdout: INSTRUMENTATION_STATUS: stream=
detox verb Instrumentation stdout: com.testapp.DetoxTest:
detox verb Instrumentation stdout: INSTRUMENTATION_STATUS: id=AndroidJUnitRunner
detox verb Instrumentation stdout: INSTRUMENTATION_STATUS: test=runDetoxTests
detox verb Instrumentation stdout: INSTRUMENTATION_STATUS: class=com.testapp.DetoxTest
detox verb Instrumentation stdout: INSTRUMENTATION_STATUS: current=1
detox verb Instrumentation stdout: INSTRUMENTATION_STATUS_CODE: 1
detox verb Instrumentation stdout:
detox verb Instrumentation stdout: INSTRUMENTATION_RESULT: shortMsg=Process crashed.
detox verb Instrumentation stdout: INSTRUMENTATION_CODE: 0
detox verb Instrumentation stdout:
detox verb instrumentationProcess terminated due to receipt of signal null

  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.

child_process.js:634
throw err;
^

Error: Command failed: node_modules/.bin/mocha e2e --opts e2e/mocha.opts --configuration android.emu.release --loglevel verbose
at checkExecSyncError (child_process.js:591:13)
at Object.execSync (child_process.js:631:13)
at runMocha (/Users/asbel/work/app-discovery/node_modules/detox/local-cli/detox-test.js:61:6)
at Object. (/Users/asbel/work/app-discovery/node_modules/detox/local-cli/detox-test.js:39:5)
at Module._compile (module.js:573:30)
at Object.Module._extensions..js (module.js:584:10)
at Module.load (module.js:507:32)
at tryModuleLoad (module.js:470:12)
at Function.Module._load (module.js:462:3)
at Function.Module.runMain (module.js:609:10)

This is the error log from adb logcat

--------- beginning of crash
01-18 09:05:25.214 3635 3875 E AndroidRuntime: FATAL EXCEPTION: com.wix.detox.manager
01-18 09:05:25.214 3635 3875 E AndroidRuntime: Process: com.test.app, PID: 3635
01-18 09:05:25.214 3635 3875 E AndroidRuntime: java.lang.NoSuchMethodError: No virtual method setCallWebSocket(Lokhttp3/Call;)V in class Lokhttp3/internal/Internal; or its super classes (declaration of 'okhttp3.internal.Internal' appears in /data/app/com.testapp-1/base.apk)
01-18 09:05:25.214 3635 3875 E AndroidRuntime: at okhttp3.ws.WebSocketCall.enqueue(WebSocketCall.java:108)
01-18 09:05:25.214 3635 3875 E AndroidRuntime: at com.wix.detox.WebSocketClient.connectToServer(WebSocketClient.java:135)
01-18 09:05:25.214 3635 3875 E AndroidRuntime: at com.wix.detox.DetoxManager.start(DetoxManager.java:74)
01-18 09:05:25.214 3635 3875 E AndroidRuntime: at com.wix.detox.Detox$1$1.run(Detox.java:133)
01-18 09:05:25.214 3635 3875 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:751)
01-18 09:05:25.214 3635 3875 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95)
01-18 09:05:25.214 3635 3875 E AndroidRuntime: at android.os.Looper.loop(Looper.java:154)
01-18 09:05:25.214 3635 3875 E AndroidRuntime: at com.wix.detox.Detox$1.run(Detox.java:136)
01-18 09:05:25.214 3635 3875 E AndroidRuntime: at java.lang.Thread.run(Thread.java:761)
01-18 09:05:25.218 3635 3875 I Process : Sending signal. PID: 3635 SIG: 9
01-18 09:05:25.223 4156 4174 D ApplicationLoaders: ignored Vulkan layer search path /system/priv-app/PrebuiltGmsCore/lib/x86:/system/fake-libs:/system/priv-app/PrebuiltGmsCore/PrebuiltGmsCore.apk!/lib/x86:/system/lib:/vendor/lib for namespace 0xaaff7090
01-18 09:05:25.258 4156 4177 W System : ClassLoader referenced unknown path:
01-18 09:05:25.258 4156 4177 W System : ClassLoader referenced unknown path: /system/priv-app/PrebuiltGmsCore/lib/x86
01-18 09:05:25.267 1697 1880 I WindowManager: WIN DEATH: Window{7bd2d4c u0 com.testapp/com.reactnativenavigation.controllers.NavigationActivity}
01-18 09:05:25.267 1697 1708 D GraphicsStats: Buffer count: 3
01-18 09:05:25.267 1337 3959 D : HostConnection::get() New Host Connection established 0xb333abc0, tid 3959
01-18 09:05:25.267 1697 1708 I ActivityManager: Process com.testapp (pid 3635) has died
01-18 09:05:25.267 1697 1708 D ActivityManager: cleanUpApplicationRecord -- 3635
01-18 09:05:25.269 1697 1735 W InputDispatcher: channel 'bde3968 com.testapp/com.reactnativenavigation.controllers.NavigationActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9
01-18 09:05:25.269 1697 1735 E InputDispatcher: channel 'bde3968 com.testapp/com.reactnativenavigation.controllers.NavigationActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
01-18 09:05:25.273 1403 4182 W SocketClient: write error (Broken pipe)
01-18 09:05:25.273 1403 4183 W SocketClient: write error (Broken pipe)
01-18 09:05:25.273 1403 4182 W DnsProxyListener: Error writing DNS result to client
01-18 09:05:25.273 1403 4183 W DnsProxyListener: Error writing DNS result to client
01-18 09:05:25.274 1697 1708 W ActivityManager: Force removing ActivityRecord{99ec8d u0 com.testapp/com.reactnativenavigation.controllers.NavigationActivity t6}: app died, no saved state
01-18 09:05:25.275 1697 1935 I WindowManager: WIN DEATH: Window{bde3968 u0 com.testapp/com.reactnativenavigation.controllers.NavigationActivity}
01-18 09:05:25.275 1697 1935 W InputDispatcher: Attempted to unregister already unregistered input channel 'bde3968 com.testapp/com.reactnativenavigation.controllers.NavigationActivity (server)'
01-18 09:05:25.280 1697 1708 W ActivityManager: Crash of app com.testapp running instrumentation ComponentInfo{com.testapp.test/android.support.test.runner.AndroidJUnitRunner}
01-18 09:05:25.281 4156 4177 D ApplicationLoaders: ignored Vulkan layer search path /system/priv-app/PrebuiltGmsCore/lib/x86:/system/fake-libs:/system/priv-app/PrebuiltGmsCore/PrebuiltGmsCore.apk!/lib/x86:/system/lib:/vendor/lib for namespace 0xaaff70d0

@aoshi321 aoshi321 reopened this Jan 18, 2018
@erikbo
Copy link

erikbo commented Jan 22, 2018

We seem to have the same issue running Detox. The framework looks really good so we'd really like to start using it but are currently stuck on this.

@llostris
Copy link

Same issue here, Detox works perfectly on iOS, however on Android it just opens the first screen and closes immediately, causing timeout of all the tests. We wanted to setup the tests on our CI unix machine, and this is a blocker for us.

Setup:
detox-7.0.0-alpha.0
react-native ^0.49.5

@rotemmiz
Copy link
Member

seems like your apps crashing. Never forget to post your adb logcat output...

@llostris
Copy link

llostris commented Jan 23, 2018

So the app doesn't seem to crash, it's stopping responding actually.

Here are the logs:
app-logcat.log

I see now that it seems to have problems connecting to the packager, however it's definitely running in the background.

Also, running the app using react-native run-android works fine.

@anton6
Copy link

anton6 commented Jan 25, 2018

@rotemmiz can you please tell me which version of Detox is currently most stable candidate for Android? At the moment I can't even get the android example (react-native) to run (with latest Detox v.7.0.0-alpha.1) I will really appreciate if you can let me know, because I really want our team to move over to Detox. I would have thought that the Android example on latest branch would work without any problems, but I've already spent all day without success following the instructions on https://github.com/wix/detox/blob/master/docs/More.AndroidSupportStatus.md and https://github.com/wix/detox/blob/master/docs/Introduction.Android.md. I think at the moment the example app does not work because it tries to use Detox v.7.0.0-alpha.1, but Android gradle plugin is still configured to use 2.3.3. But even when I configure the example to use 3.0.0 I'm still hitting various problems. Can you please try and run the latest Android example for react-native (currently set to use Detox v.7.0.0-alpha.1) to see if it actually works? Thanks.

@juddey
Copy link

juddey commented Jan 31, 2018

@anton6 I managed to get detox going today with version 7.0.1 on RN 0.51. Happy to share/dialog if you are still having issues and think it might help. I am running linux 🥇, but it shouldn't make too much difference.

@anton6
Copy link

anton6 commented Jan 31, 2018

@juddey Great thanks for that! I'm already setting up Appium at the moment for the company since they think it's more mature, but I am still keen to get detox working so that we can switch to it! I will try 7.0.1 as soon as I get the chance. If I have issues I will message you. Thanks :)

@rotemmiz
Copy link
Member

😔

@llostris
Copy link

@juddey I'd be happy to hear how did you set it up!
I tried upgrading to 7.0.1 but still have issues (same as before) running it on Android.

@juddey
Copy link

juddey commented Feb 1, 2018

@llostris I've put gist of the commit that I used to get things working here.
I had to bump the appcompat library from 23.0.1 to 25.4.0 to resolve a dependency conflict, but this may not be necessary for you.

@rohitpkumar
Copy link

@juddey I am facing the same issue, when i run detox test -c android.emu.debug , i get error

  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.

Version details:

  • Detox - 7.0.1
  • Node - 8.9.4
  • Device - Nexus_5X_API_24
  • Ubuntu 16.04 LTS

Steps :
Running the following commands -

  1. detox build -c android.emu.debug [working fine]
  2. detox test -c android.emu.debug [getting error]

Issue - app is getting installed in the emulator, but not launching.

adb logcat output is

detox test --configuration android.emu.debug --loglevel verbose
node_modules/.bin/mocha e2e --opts e2e/mocha.opts --configuration android.emu.debug --loglevel verbose

detox info 13:37:02: server listening on localhost:43149...
detox verb ws onOpen [object Object]
detox verb ws send: {"type":"login","params":{"sessionId":"4d0d6d54-2663-e426-cf67-b5d1e6a31dfe","role":"tester"},"messageId":0}
detox verb ws onMessage: {"type":"loginSuccess","params":{"sessionId":"4d0d6d54-2663-e426-cf67-b5d1e6a31dfe","role":"tester"},"messageId":0}
detox verb ws
detox verb 1: /home/rohit/Android/Sdk/tools/emulator -list-avds --verbose
detox verb 1: stdout: Nexus_5X_API_24
detox verb 1: stdout:
detox verb /home/rohit/Android/Sdk/tools/emulator -verbose -gpu host -no-audio @Nexus_5X_API_24
detox verb 2: /home/rohit/Android/Sdk/platform-tools/adb devices
detox verb 2: stdout: List of devices attached
detox verb 2: stdout: emulator-5554 device
detox verb 2: stdout:
detox verb 2: stdout:
detox verb 3: /home/rohit/Android/Sdk/platform-tools/adb -s emulator-5554 shell getprop dev.bootcomplete
detox verb 3: stdout: 1
detox verb 3: stdout:
detox verb 4: /home/rohit/Android/Sdk/platform-tools/adb -s emulator-5554 shell input keyevent 82
detox verb 5: /home/rohit/Android/Sdk/platform-tools/adb -s emulator-5554 uninstall com.anarock.agentsapp.debug
detox verb 5: stdout: Success
detox verb 5: stdout:
detox verb 6: /home/rohit/Android/Sdk/platform-tools/adb -s emulator-5554 uninstall com.anarock.agentsapp.debug.test
detox verb 6: stdout: Success
detox verb 6: stdout:
detox verb 7: /home/rohit/Android/Sdk/platform-tools/adb -s emulator-5554 shell getprop ro.build.version.sdk
detox verb 7: stdout: 24
detox verb 7: stdout:
detox verb 8: /home/rohit/Android/Sdk/platform-tools/adb -s emulator-5554 install -r -g /home/rohit/workspace/Anarock-agentapp/android/app/build/outputs/apk/debug/app-debug.apk
detox verb 8: stdout: Success
detox verb 8: stdout:
detox verb 9: /home/rohit/Android/Sdk/platform-tools/adb -s emulator-5554 shell getprop ro.build.version.sdk
detox verb 9: stdout: 24
detox verb 9: stdout:
detox verb 10: /home/rohit/Android/Sdk/platform-tools/adb -s emulator-5554 install -r -g /home/rohit/workspace/Anarock-agentapp/android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk
detox verb 10: stdout: Success
detox verb 10: stdout:
detox verb 11: /home/rohit/Android/Sdk/platform-tools/adb -s emulator-5554 shell am force-stop com.anarock.agentsapp.debug
detox verb adb -s emulator-5554 shell am instrument -w -r -e detoxServer ws://localhost:43149 -e detoxSessionId 4d0d6d54-2663-e426-cf67-b5d1e6a31dfe -e debug false com.anarock.agentsapp.debug.test/android.support.test.runner.AndroidJUnitRunner
detox verb Instrumentation spawned, childProcess.pid: 26028
detox verb ws send: {"type":"isReady","params":{},"messageId":-1000}
detox verb Instrumentation stdout: INSTRUMENTATION_RESULT: stream=
detox verb Instrumentation stdout:
detox verb Instrumentation stdout: Time: 0
detox verb Instrumentation stdout:
detox verb Instrumentation stdout: OK (0 tests)
detox verb Instrumentation stdout:
detox verb Instrumentation stdout:
detox verb Instrumentation stdout: INSTRUMENTATION_CODE: -1
detox verb Instrumentation stdout:
detox verb instrumentationProcess terminated due to receipt of signal null

  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.

child_process.js:644
throw err;
^

Error: Command failed: node_modules/.bin/mocha e2e --opts e2e/mocha.opts --configuration android.emu.debug --loglevel verbose
at checkExecSyncError (child_process.js:601:13)
at Object.execSync (child_process.js:641:13)
at runMocha (/home/rohit/workspace/Anarock-agentapp/node_modules/detox/local-cli/detox-test.js:72:6)
at Object. (/home/rohit/workspace/Anarock-agentapp/node_modules/detox/local-cli/detox-test.js:50:5)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
at Function.Module.runMain (module.js:684:10)

@juddey
Copy link

juddey commented Mar 13, 2018

@rohitpkumar While the error message is the same as what I had, its a catch all message that will fire when the tests fail with a timeout. I suspect that the root cause of what you are seeing is something different.

I can't help on this right now, so I'd open a stackoverflow issue tagged with [detox] so someone who has time can help you resolve it. Good luck! 👍

@rotemmiz
Copy link
Member

@rohitpkumar
Copy link

@rotemmiz Yes, i have created that. Please find screenshot.

detoxtest java

@compojoom
Copy link

I'm running into the same error on RN 0.55

detox verb Instrumentation stdout:  INSTRUMENTATION_STATUS: numtests=1
detox verb Instrumentation stdout:  INSTRUMENTATION_STATUS: stream=
detox verb Instrumentation stdout:  com.xxx.android.react.xxx.DetoxTest:
detox verb Instrumentation stdout:  INSTRUMENTATION_STATUS: id=AndroidJUnitRunner
detox verb Instrumentation stdout:  INSTRUMENTATION_STATUS: test=runDetoxTests
detox verb Instrumentation stdout:  INSTRUMENTATION_STATUS: class=com.xxx.android.react.xxx.DetoxTest
detox verb Instrumentation stdout:
detox verb Instrumentation stdout:  INSTRUMENTATION_STATUS: current=1
detox verb Instrumentation stdout:  INSTRUMENTATION_STATUS_CODE: 1
detox verb Instrumentation stdout:

The VM is started, the app is also being started - I see that it connects to the packager and downloads the index.html, but it then fails to launch the main activity.


This is the output of logcat:
04-18 11:57:28.035 6207-6270/com.xxx.android.react.xxx I/DetoxManager: DetoxServerUrl : ws://10.0.2.2:55003
    DetoxSessionId : 58665589-5e17-0d37-11cd-f5be4891d03b
04-18 11:57:28.044 1682-1703/? I/ActivityManager: Displayed com.xxx.android.react.xxx/.MainActivity: +651ms
04-18 11:57:28.490 6207-6212/com.xxx.android.react.xxx I/zygote: Do full code cache collection, code=122KB, data=68KB
    After code cache collection, code=112KB, data=54KB
04-18 11:57:28.687 6207-6212/com.xxx.android.react.xxx I/zygote: Do partial code cache collection, code=116KB, data=57KB
    After code cache collection, code=116KB, data=57KB
    Increasing code cache capacity to 512KB
04-18 11:57:28.688 6207-6264/com.xxx.android.react.xxx D/EGL_emulation: eglMakeCurrent: 0xa0306560: ver 3 0 (tinfo 0xa03039a0)
04-18 11:57:28.693 6207-6207/com.xxx.android.react.xxx D/ReactNative: ReactInstanceManager.onJSBundleLoadedFromServer()
    ReactInstanceManager.recreateReactContextInBackground()
    ReactInstanceManager.runCreateReactContextOnNewThread()
04-18 11:57:28.697 6207-6271/com.xxx.android.react.xxx I/zygote: Thread[39,tid=6271,Native,Thread*=0x8ab21000,peer=0x13241440,"Thread-8"] recursive attempt to load library "/data/app/com.xxx.android.react.xxx-pYr9btKT2wDjIR6r3bcVhQ==/lib/x86/libfb.so"
04-18 11:57:28.698 6207-6271/com.xxx.android.react.xxx D/ReactNative: ReactInstanceManager.createReactContext()
04-18 11:57:28.707 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTGroupViewManager
    Could not find generated setter for class com.facebook.react.views.art.ARTGroupShadowNode
04-18 11:57:28.708 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTShapeViewManager
04-18 11:57:28.709 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTShapeShadowNode
    Could not find generated setter for class com.facebook.react.views.art.ARTTextViewManager
04-18 11:57:28.710 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTTextShadowNode
    Could not find generated setter for class com.facebook.react.views.checkbox.ReactCheckBoxManager
04-18 11:57:28.713 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.uimanager.LayoutShadowNode
04-18 11:57:28.717 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.picker.ReactDialogPickerManager
04-18 11:57:28.720 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.drawer.ReactDrawerLayoutManager
04-18 11:57:28.722 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.picker.ReactDropdownPickerManager
04-18 11:57:28.724 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.scroll.ReactHorizontalScrollViewManager
04-18 11:57:28.727 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.scroll.ReactHorizontalScrollContainerViewManager
04-18 11:57:28.728 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.progressbar.ReactProgressBarViewManager
04-18 11:57:28.729 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.progressbar.ProgressBarShadowNode
04-18 11:57:28.730 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.scroll.ReactScrollViewManager
04-18 11:57:28.733 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.slider.ReactSliderManager
04-18 11:57:28.735 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.slider.ReactSliderManager$ReactSliderShadowNode
04-18 11:57:28.736 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.switchview.ReactSwitchManager
04-18 11:57:28.738 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.switchview.ReactSwitchManager$ReactSwitchShadowNode
04-18 11:57:28.739 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.toolbar.ReactToolbarManager
04-18 11:57:28.741 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.webview.ReactWebViewManager
04-18 11:57:28.745 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.swiperefresh.SwipeRefreshLayoutManager
04-18 11:57:28.746 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTSurfaceViewManager
04-18 11:57:28.747 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTSurfaceViewShadowNode
04-18 11:57:28.748 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.frescosupport.FrescoBasedReactTextInlineImageViewManager
    Could not find generated setter for class com.facebook.react.views.text.frescosupport.FrescoBasedReactTextInlineImageShadowNode
04-18 11:57:28.749 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.image.ReactImageManager
04-18 11:57:28.752 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.modal.ReactModalHostManager
04-18 11:57:28.753 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.modal.ModalHostShadowNode
04-18 11:57:28.755 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.ReactRawTextManager
    Could not find generated setter for class com.facebook.react.views.text.ReactRawTextShadowNode
04-18 11:57:28.756 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.textinput.ReactTextInputManager
04-18 11:57:28.760 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.textinput.ReactTextInputShadowNode
04-18 11:57:28.763 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.ReactTextViewManager
04-18 11:57:28.765 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.ReactTextShadowNode
    Could not find generated setter for class com.facebook.react.views.view.ReactViewManager
04-18 11:57:28.768 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.viewpager.ReactViewPagerManager
04-18 11:57:28.771 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.text.ReactVirtualTextViewManager
    Could not find generated setter for class com.facebook.react.views.text.ReactVirtualTextShadowNode
04-18 11:57:28.773 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.horcrux.svg.RenderableViewManager
    Could not find generated setter for class com.horcrux.svg.GroupShadowNode
04-18 11:57:28.777 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.horcrux.svg.PathShadowNode
04-18 11:57:28.778 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.horcrux.svg.CircleShadowNode
04-18 11:57:28.779 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.horcrux.svg.EllipseShadowNode
04-18 11:57:28.781 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.horcrux.svg.LineShadowNode
04-18 11:57:28.783 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.horcrux.svg.RectShadowNode
04-18 11:57:28.784 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.horcrux.svg.TextShadowNode
04-18 11:57:28.786 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.horcrux.svg.TSpanShadowNode
04-18 11:57:28.787 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.horcrux.svg.TextPathShadowNode
04-18 11:57:28.789 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.horcrux.svg.ImageShadowNode
    Could not find generated setter for class com.horcrux.svg.ClipPathShadowNode
04-18 11:57:28.790 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.horcrux.svg.DefsShadowNode
    Could not find generated setter for class com.horcrux.svg.UseShadowNode
04-18 11:57:28.791 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.horcrux.svg.SymbolShadowNode
04-18 11:57:28.794 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.horcrux.svg.LinearGradientShadowNode
04-18 11:57:28.795 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.horcrux.svg.RadialGradientShadowNode
04-18 11:57:28.796 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.horcrux.svg.SvgViewManager
04-18 11:57:28.797 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.horcrux.svg.SvgViewShadowNode
04-18 11:57:28.800 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class org.wonday.pdf.RCTPdfManager
04-18 11:57:28.801 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.airbnb.android.react.maps.AirMapCalloutManager
04-18 11:57:28.804 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.airbnb.android.react.maps.AirMapMarkerManager
04-18 11:57:28.808 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.airbnb.android.react.maps.AirMapPolylineManager
04-18 11:57:28.811 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.airbnb.android.react.maps.AirMapPolygonManager
04-18 11:57:28.812 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.airbnb.android.react.maps.AirMapCircleManager
04-18 11:57:28.813 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.airbnb.android.react.maps.AirMapManager
04-18 11:57:28.815 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.airbnb.android.react.maps.AirMapLiteManager
04-18 11:57:28.816 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.airbnb.android.react.maps.AirMapUrlTileManager
04-18 11:57:28.817 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.airbnb.android.react.maps.AirMapLocalTileManager
04-18 11:57:28.818 6207-6271/com.xxx.android.react.xxx W/unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.airbnb.android.react.maps.AirMapOverlayManager
04-18 11:57:28.825 6207-6271/com.xxx.android.react.xxx D/RNFirebaseCrashlytics: New instance
04-18 11:57:28.826 6207-6271/com.xxx.android.react.xxx D/RNFirebaseAuth: RNFirebaseAuth:initialized
04-18 11:57:28.826 6207-6271/com.xxx.android.react.xxx D/RNFirebaseStorage: New instance
04-18 11:57:28.826 6207-6271/com.xxx.android.react.xxx D/RNFirebaseAnalytics: New instance
04-18 11:57:28.830 6207-6271/com.xxx.android.react.xxx D/ReactNative: Initializing React Xplat Bridge.
04-18 11:57:28.831 6207-6271/com.xxx.android.react.xxx D/ReactNative: Initializing React Xplat Bridge before initializeBridge
04-18 11:57:28.834 6207-6271/com.xxx.android.react.xxx D/ReactNative: Initializing React Xplat Bridge after initializeBridge
    CatalystInstanceImpl.runJSBundle()
04-18 11:57:28.835 6207-6277/com.xxx.android.react.xxx D/ReactNative: ReactInstanceManager.setupReactContext()
    CatalystInstanceImpl.initialize()
04-18 11:57:28.837 6207-6207/com.xxx.android.react.xxx W/unknown:ReactNative: Packager connection already open, nooping.
04-18 11:57:28.838 6207-6277/com.xxx.android.react.xxx D/ReactNative: ReactInstanceManager.attachRootViewToInstance()
04-18 11:57:28.849 6207-6207/com.xxx.android.react.xxx I/Detox: Got react context through listener.
04-18 11:57:28.849 6207-6270/com.xxx.android.react.xxx I/Detox: Removing Espresso IdlingResources for React Native.
04-18 11:57:28.850 6207-6270/com.xxx.android.react.xxx I/Detox: Setting up Espresso Idling Resources for React Native.
04-18 11:57:29.144 6207-6277/com.xxx.android.react.xxx I/WebViewFactory: Loading com.android.chrome version 58.0.3029.125 (code 303012512)
04-18 11:57:29.189 6207-6277/com.xxx.android.react.xxx I/cr_LibraryLoader: Time to load native libraries: 5 ms (timestamps 8621-8626)
04-18 11:57:29.198 6207-6277/com.xxx.android.react.xxx I/chromium: [INFO:library_loader_hooks.cc(140)] Chromium logging enabled: level = 0, default verbosity = 0
04-18 11:57:29.199 6207-6277/com.xxx.android.react.xxx I/cr_LibraryLoader: Expected native library version number "58.0.3029.125", actual native library version number "58.0.3029.125"
04-18 11:57:29.374 6207-6277/com.xxx.android.react.xxx D/RNFirebaseAuth: addAuthStateListener
04-18 11:57:29.536 6207-6263/com.xxx.android.react.xxx W/unknown:InspectorPackagerConnection: Couldn't connect to packager, will silently retry
04-18 11:57:29.586 6207-6276/com.xxx.android.react.xxx W/ResourceType: No package identifier when getting value for resource number 0x00000000

Not sure it is supposed to work at all, since this issue is open: #608, but it for sure works great on RN .55 with iOS emulator.

@gomdolkim
Copy link

gomdolkim commented May 21, 2018

Same issue to me. iOS works fine and android is not.

Setup:
detox: 7.3.7
react-native: 0.47.1

@gomdolkim
Copy link

gomdolkim commented May 23, 2018

what I found is code is stuck in Espresso.registerIdlingResources which is deprecated.

https://github.com/wix/detox/blob/master/detox/android/detox/src/main/java/com/wix/detox/ReactNativeSupport.java#L336

when calling setupRNQueueInterrogator with FIELD_JS_MSG_QUEUE, it could reach to Espresso.registerIdlingResources. rest of things don't call it.
https://github.com/wix/detox/blob/master/detox/android/detox/src/main/java/com/wix/detox/ReactNativeSupport.java#L318

I commented out Espresso.registerIdlingResources then it is able to run properly.

@hiepnm
Copy link

hiepnm commented May 27, 2018

I got this problem on both iOS and Android :(

@stale
Copy link

stale bot commented Jul 11, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back.
Thank you for your contributions.

@stale stale bot added the 🏚 stale label Jul 11, 2018
@stale
Copy link

stale bot commented Jul 18, 2018

The issue has been closed for inactivity.

@stale stale bot closed this as completed Jul 18, 2018
@akqaaditya
Copy link

akqaaditya commented Jul 19, 2018

I am also facing same issue with Same log which is shared above.

(node:76688) ExperimentalWarning: The fs.promises API is experimental
before
detox info 14:33:40: server listening on localhost:58979...
detox verb ws onOpen [object Object]
detox verb ws send: {"type":"login","params":{"sessionId":"007f086c-37eb-681b-f64f-953905b302f7","role":"tester"},"messageId":0}
detox verb ws onMessage: {"type":"loginSuccess","params":{"sessionId":"007f086c-37eb-681b-f64f-953905b302f7","role":"tester"},"messageId":0}
detox verb ws
detox verb 1: /Users/aditya.pare/Library/Android/sdk/emulator/emulator -list-avds --verbose
detox verb 1: stdout: Pixel_2_API_25
Pixel_API_25
Pixel_XL_API_P

detox verb 2: /Users/aditya.pare/Library/Android/sdk/platform-tools/adb devices
detox verb 2: stdout: List of devices attached
emulator-5554 device

detox verb 3: /Users/aditya.pare/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell getprop dev.bootcomplete
detox verb 3: stdout: 1

detox verb 4: /Users/aditya.pare/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell input keyevent 82
detox verb 5: /Users/aditya.pare/Library/Android/sdk/platform-tools/adb -s emulator-5554 uninstall com.sephora.mcommerce
detox verb 5: stdout: Success

detox verb 6: /Users/aditya.pare/Library/Android/sdk/platform-tools/adb -s emulator-5554 uninstall com.sephora.mcommerce.test
detox verb 6: stdout: Success

detox verb 7: /Users/aditya.pare/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell getprop ro.build.version.sdk
detox verb 7: stdout: 25

detox verb 8: /Users/aditya.pare/Library/Android/sdk/platform-tools/adb -s emulator-5554 install -r -g /Users/aditya.pare/iOS/appofcards/android/app/build/outputs/apk/debug/app-debug.apk
detox verb 8: stdout: Success

detox verb 9: /Users/aditya.pare/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell getprop ro.build.version.sdk
detox verb 9: stdout: 25

detox verb 10: /Users/aditya.pare/Library/Android/sdk/platform-tools/adb -s emulator-5554 install -r -g /Users/aditya.pare/iOS/appofcards/android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk
detox verb 10: stdout: Success

detox verb 11: /Users/aditya.pare/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell am force-stop com.sephora.mcommerce
detox verb 12: /Users/aditya.pare/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell pm list instrumentation
detox verb 12: stdout: instrumentation:com.android.emulator.smoketests/android.support.test.runner.AndroidJUnitRunner (target=com.android.emulator.smoketests)
instrumentation:com.android.smoketest.tests/com.android.smoketest.SmokeTestRunner (target=com.android.smoketest)
instrumentation:com.example.android.apis/.app.LocalSampleInstrumentation (target=com.example.android.apis)
instrumentation:com.sephora.mcommerce.test/android.support.test.runner.AndroidJUnitRunner (target=com.sephora.mcommerce)
instrumentation:org.chromium.webview_shell/.WebViewLayoutTestRunner (target=org.chromium.webview_shell)

detox verb /Users/aditya.pare/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell am instrument -w -r -e detoxServer ws://localhost:58979 -e detoxSessionId 007f086c-37eb-681b-f64f-953905b302f7 -e debug false com.sephora.mcommerce.test/android.support.test.runner.AndroidJUnitRunner
detox verb Instrumentation spawned, childProcess.pid: 76704
detox verb ws send: {"type":"isReady","params":{},"messageId":-1000}
detox verb Instrumentation stdout: INSTRUMENTATION_RESULT: shortMsg=Process crashed.
detox verb Instrumentation stdout: INSTRUMENTATION_CODE: 0
detox verb Instrumentation stdout:
detox verb instrumentationProcess terminated due to receipt of signal null

  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.

child_process.js:636
throw err;
^

Error: Command failed: node_modules/.bin/mocha e2e --opts e2e/mocha.opts --configuration android.emu.debug --loglevel verbose --grep :ios: --invert
at checkExecSyncError (child_process.js:596:11)
at Object.execSync (child_process.js:633:13)
at runMocha (/Users/aditya.pare/iOS/appofcards/node_modules/detox/local-cli/detox-test.js:114:6)
at run (/Users/aditya.pare/iOS/appofcards/node_modules/detox/local-cli/detox-test.js:75:7)
at Object. (/Users/aditya.pare/iOS/appofcards/node_modules/detox/local-cli/detox-test.js:181:1)
at Module._compile (internal/modules/cjs/loader.js:678:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
at Module.load (internal/modules/cjs/loader.js:589:32)
at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
at Function.Module._load (internal/modules/cjs/loader.js:520:3)

@wix wix locked and limited conversation to collaborators Jul 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests