Detox: Running tests on Android gets stuck in the "before all" hook

Description

hey, I am having an issue with running detox on Android. We got it working in iOS and now wanted to add Android tests as well. We use RN 0.49. When I run detox on Android - I get a white screen, and in the console I get stuck in the “before all” hook:

 1) "before all" hook

  0 passing (3m)
  1 failing

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

Steps to Reproduce

After following all the steps in the Android guide (and fixing some versions issues, and fixes from the troubleshooting), I tried to run the text: detox test --configuration android.emu.debug -l verbose , and got the following logs:

Start
detox-server info 15:56:55: server listening on localhost:64180...
detox verb ws onOpen [object Object]
detox verb ws send: {"type":"login","params":{"sessionId":"5e43bcb5-acd5-0c85-6791-bce08925d109","role":"tester"},"messageId":0}
detox verb ws onMessage: {"type":"loginSuccess","params":{"sessionId":"5e43bcb5-acd5-0c85-6791-bce08925d109","role":"tester"},"messageId":0}
detox verb ws
detox verb 1: /Users/ilonashub/Library/Android/sdk/tools/emulator -list-avds --verbose
detox verb 1: stdout: Nexus_5X_API_23
detox verb 1: stdout: Nexus_5X_API_24
detox verb 1: stdout:
detox verb Emulator stdout:  emulator: Android virtual device file at: /Users/ilonashub/.android/avd/Nexus_5X_API_24.ini
detox verb Emulator stdout:  emulator: virtual device content at /Users/ilonashub/.android/avd/Nexus_5X_API_24.avd
detox verb Emulator stdout:  emulator: virtual device config file: /Users/ilonashub/.android/avd/Nexus_5X_API_24.avd/config.ini
detox verb Emulator stdout:  emulator: using core hw config path: /Users/ilonashub/.android/avd/Nexus_5X_API_24.avd/hardware-qemu.ini
detox verb Emulator stdout:  emulator: Found AVD target API level: 24
detox verb Emulator stdout:  emulator: Read property file at /Users/ilonashub/Library/Android/sdk//system-images/android-24/google_apis_playstore/x86//build.prop
detox verb Emulator stdout:  emulator: No boot.prop property file found.
detox verb Emulator stdout:  emulator: found skin 'nexus_5x' in directory: /Users/ilonashub/Library/Android/sdk/skins/
detox verb Emulator stdout:  emulator: autoconfig: -skin nexus_5x
detox verb Emulator stdout:  emulator: autoconfig: -skindir /Users/ilonashub/Library/Android/sdk/skins/
detox verb Emulator stdout:  emulator: autoconfig: -kernel /Users/ilonashub/Library/Android/sdk//system-images/android-24/google_apis_playstore/x86//kernel-ranchu
detox verb Emulator stdout:  emulator: Target arch = 'x86'
detox verb Emulator stdout:  emulator: Auto-config: -qemu -cpu qemu32
detox verb Emulator stdout:  emulator: Auto-detect: Kernel image requires new device naming scheme.
detox verb Emulator stdout:  emulator: Auto-detect: Kernel does not support YAFFS2 partitions.
detox verb Emulator stdout:  emulator: autoconfig: -ramdisk /Users/ilonashub/Library/Android/sdk//system-images/android-24/google_apis_playstore/x86//ramdisk.img
detox verb Emulator stdout:  emulator: Using initial system image: /Users/ilonashub/Library/Android/sdk//system-images/android-24/google_apis_playstore/x86//system.img
detox verb Emulator stdout:  emulator: No vendor image
detox verb Emulator stdout:  emulator: autoconfig: -data /Users/ilonashub/.android/avd/Nexus_5X_API_24.avd/userdata-qemu.img
detox verb Emulator stdout:  emulator: autoconfig: -initdata /Users/ilonashub/.android/avd/Nexus_5X_API_24.avd/userdata.img
detox verb Emulator stdout:  emulator: autoconfig: -cache /Users/ilonashub/.android/avd/Nexus_5X_API_24.avd/cache.img
detox verb Emulator stdout:  emulator: autoconfig: -sdcard /Users/ilonashub/.android/avd/Nexus_5X_API_24.avd/sdcard.img
detox verb Emulator stdout:  emulator: Physical RAM size: 1536MB
detox verb Emulator stdout:
detox verb Emulator stdout:  emulator: VM heap size 256MB is below hardware specified minimum of 384MB,setting it to that value
detox verb Emulator stdout:  emulator: System image is read only
detox verb Emulator stdout:  emulator: Found 2 DNS servers: 192.115.106.35 62.219.186.7
detox verb Emulator stdout:  emulator: ERROR: There's another emulator instance running with the current AVD 'Nexus_5X_API_24'. Exiting...
detox verb Emulator stdout:
detox verb Emulator stdout:
detox verb 2: /Users/ilonashub/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/ilonashub/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell input keyevent 82
detox verb 4: /Users/ilonashub/Library/Android/sdk/platform-tools/adb -s emulator-5554 uninstall com.homeismobile
detox verb 4: stdout: Success
detox verb 4: stdout:
detox verb 5: /Users/ilonashub/Library/Android/sdk/platform-tools/adb -s emulator-5554 uninstall com.homeismobile.test
detox verb 5: stdout: Success
detox verb 5: stdout:
detox verb 6: /Users/ilonashub/Library/Android/sdk/platform-tools/adb -s emulator-5554 install -r -g /Users/ilonashub/homeis/home-is-mobile/android/app/build/outputs/apk/app-debug.apk
detox verb 6: stderr: Success
detox verb 6: stderr:
detox verb 7: /Users/ilonashub/Library/Android/sdk/platform-tools/adb -s emulator-5554 install -r -g /Users/ilonashub/homeis/home-is-mobile/android/app/build/outputs/apk/app-debug-androidTest.apk
detox verb 7: stderr: Success
detox verb 7: stderr:
detox verb 8: /Users/ilonashub/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell am force-stop com.homeismobile
detox verb adb -s emulator-5554 shell am instrument -w -r -e detoxServer ws://localhost:64180 -e detoxSessionId 5e43bcb5-acd5-0c85-6791-bce08925d109 -e debug false com.homeismobile.test/android.support.test.runner.AndroidJUnitRunner
detox verb Instrumentation spawned, childProcess.pid:  27598
detox verb ws send: {"type":"isReady","params":{},"messageId":-1000}
detox verb Instrumentation stdout:  INSTRUMENTATION_STATUS: numtests=1
detox verb Instrumentation stdout:
detox verb Instrumentation stdout:  INSTRUMENTATION_STATUS: stream=
detox verb Instrumentation stdout:  com.homeismobile.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.homeismobile.DetoxTest
detox verb Instrumentation stdout:  INSTRUMENTATION_STATUS: current=1
detox verb Instrumentation stdout:  INSTRUMENTATION_STATUS_CODE: 1
detox verb Instrumentation stdout:
  1) "before all" hook

  0 passing (3m)
  1 failing

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




detox verb ws send: {"type":"cleanup","params":{"stopRunner":true},"messageId":1}

Detox, Node, Device, Xcode and macOS Versions

  • Detox: 5.9.1
  • Node: 8.4.0
  • Device: nexus_5x_API_24
  • Xcode: 9.1
  • macOS: 10.12.6

Device and verbose Detox logs

from the adb logcat I could see a few errors - which I think are unrelated to the issue (for example pushwoosh error shouldn’t prevent the app to be up I think. So I added some of the logs with warnings/errors here.

......
11-09 16:03:19.386  2145  2681 E Volley  : [147] BasicNetwork.performRequest: Unexpected response code 307 for https://android.googleapis.com/nova/herrevad/network_quality_info
11-09 16:03:19.391  2145  5906 W Herrevad: [481] RemoteReportsRefreshChimeraService.a: java.util.concurrent.ExecutionException: com.android.volley.ServerError
11-09 16:03:19.391  2145  5906 W Herrevad: java.util.concurrent.ExecutionException: com.android.volley.ServerError
11-09 16:03:19.391  2145  5906 W Herrevad: 	at com.android.volley.toolbox.RequestFuture.a(:com.google.android.gms@11743470:4)
11-09 16:03:19.391  2145  5906 W Herrevad: 	at com.android.volley.toolbox.RequestFuture.get(:com.google.android.gms@11743470:2)
11-09 16:03:19.391  2145  5906 W Herrevad: 	at com.google.android.gms.herrevad.services.RemoteReportsRefreshChimeraService.a(:com.google.android.gms@11743470:26)
11-09 16:03:19.391  2145  5906 W Herrevad: 	at com.google.android.gms.herrevad.services.RemoteReportsRefreshChimeraService.a(:com.google.android.gms@11743470:33)
11-09 16:03:19.391  2145  5906 W Herrevad: 	at sxf.run(:com.google.android.gms@11743470:1)
11-09 16:03:19.391  2145  5906 W Herrevad: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
11-09 16:03:19.391  2145  5906 W Herrevad: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
11-09 16:03:19.391  2145  5906 W Herrevad: 	at java.lang.Thread.run(Thread.java:761)
11-09 16:03:19.391  2145  5906 W Herrevad: Caused by: com.android.volley.ServerError
11-09 16:03:19.391  2145  5906 W Herrevad: 	at com.android.volley.toolbox.BasicNetwork.performRequest(:com.google.android.gms@11743470:37)
11-09 16:03:19.391  2145  5906 W Herrevad: 	at mhc.performRequest(:com.google.android.gms@11743470:4)
11-09 16:03:19.391  2145  5906 W Herrevad: 	at com.android.volley.NetworkDispatcher.run(:com.google.android.gms@11743470:12)
11-09 16:03:19.444  5829  5900 W System  : ClassLoader referenced unknown path: /system/app/Chrome/lib/x86
......
11-09 16:03:19.542  5829  5898 V WebViewChromiumFactoryProvider: Binding Chromium to main looper Looper (main, tid 1) {90d2951}
11-09 16:03:19.691  1944  2248 W Conscrypt: Could not set socket write timeout:
11-09 16:03:19.691  1944  2248 W Conscrypt:    java.lang.reflect.Method.invoke(Native Method)
11-09 16:03:19.691  1944  2248 W Conscrypt:    com.google.android.gms.org.conscrypt.Platform.setSocketWriteTimeout(:com.google.android.gms@11743470:13)
11-09 16:03:19.710  1944  1944 I WearableService: Wearable Services stopping
11-09 16:03:19.837  1944  2248 W Conscrypt: Could not set socket write timeout:
11-09 16:03:19.838  1944  2248 W Conscrypt:    java.lang.reflect.Method.invoke(Native Method)
11-09 16:03:19.838  1944  2248 W Conscrypt:    com.google.android.gms.org.conscrypt.Platform.setSocketWriteTimeout(:com.google.android.gms@11743470:13)
11-09 16:03:28.206  5829  5886 W unknown:InspectorPackagerConnection: Couldn't connect to packager, will silently retry
11-09 16:03:39.339  3495  3533 W Finsky  : [210] com.google.android.finsky.FinskyApp.i(1468): No account configured on this device.
11-09 16:03:39.341  3495  3533 I Finsky  : [210] com.google.android.finsky.c.e.run(1151): Replicating app states via AMAS.
11-09 16:03:39.397  3495  3533 I Finsky  : [210] com.google.android.finsky.c.c.a(311): Completed 0 account content syncs with 0 successful.
11-09 16:03:39.397  3495  3495 I Finsky  : [1] com.google.android.finsky.services.j.a(149): Installation state replication succeeded.
....
11-09 16:09:47.871  1944  2714 W Conscrypt: Could not set socket write timeout:
11-09 16:09:47.872  1944  2714 W Conscrypt:    java.lang.reflect.Method.invoke(Native Method)
11-09 16:09:47.872  1944  2714 W Conscrypt:    com.google.android.gms.org.conscrypt.Platform.setSocketWriteTimeout(:com.google.android.gms@11743470:13)
11-09 16:09:48.034  1944  2714 W Conscrypt: Could not set socket write timeout:
11-09 16:09:48.034  1944  2714 W Conscrypt:    java.lang.reflect.Method.invoke(Native Method)
11-09 16:09:48.036  1944  2714 W Conscrypt:    com.google.android.gms.org.conscrypt.Platform.setSocketWriteTimeout(:com.google.android.gms@11743470:13)
11-09 16:09:48.193  1944  2714 W GLSUser : [AppCertManager] IOException while requesting key:
11-09 16:09:48.193  1944  2714 W GLSUser : java.io.IOException: Invalid device key response.
11-09 16:09:48.193  1944  2714 W GLSUser : 	at eyw.a(:com.google.android.gms@11743470:14)
11-09 16:09:48.193  1944  2714 W GLSUser : 	at eyw.a(:com.google.android.gms@11743470:65)
11-09 16:09:48.193  1944  2714 W GLSUser : 	at eyu.a(:com.google.android.gms@11743470:8)
11-09 16:09:48.193  1944  2714 W GLSUser : 	at eyq.a(:com.google.android.gms@11743470:1)
11-09 16:09:48.193  1944  2714 W GLSUser : 	at eyp.a(:com.google.android.gms@11743470:10)
11-09 16:09:48.193  1944  2714 W GLSUser : 	at com.google.android.gms.auth.account.be.legacy.AuthCronChimeraService.b(:com.google.android.gms@11743470:7)
11-09 16:09:48.193  1944  2714 W GLSUser : 	at edr.call(:com.google.android.gms@11743470:3)
11-09 16:09:48.193  1944  2714 W GLSUser : 	at java.util.concurrent.FutureTask.run(FutureTask.java:237)
11-09 16:09:48.193  1944  2714 W GLSUser : 	at mmu.run(:com.google.android.gms@11743470:26)
11-09 16:09:48.193  1944  2714 W GLSUser : 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
11-09 16:09:48.193  1944  2714 W GLSUser : 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
11-09 16:09:48.193  1944  2714 W GLSUser : 	at mse.run(:com.google.android.gms@11743470)
11-09 16:09:48.193  1944  2714 W GLSUser : 	at java.lang.Thread.run(Thread.java:761)

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 13
  • Comments: 31 (8 by maintainers)

Most upvoted comments

Here’s the complete logcat output: https://pastebin.com/LGK4zhYC

@blumendorf made a repository to reproduce this problem: https://github.com/ewyso/react-native-detox-e-android

I’m running detox this way:

./node_modules/.bin/detox build --configuration android.emu.debug && ./node_modules/.bin/detox test --configuration android.emu.debug -l verbose  --debug-synchronization 30000

and it runs fine unless react-native-device-info is imported (uncomment App.js line 18).

In my case problem was in react-native-device-info package. When react-native-device-info is imported this bug happens. I just stubbed import for test environment and it works again.

@ghsdh3409 's answer fixed it for me.

I had to put: androidTestImplementation 'org.mockito:mockito-android:2.7.22' to app/build.gradle or for previous versions of gradle: androidTestCompile 'org.mockito:mockito-android:2.7.22'

These are imports:

import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.webkit.WebSettings;
import static org.mockito.Mockito.*;

And at the end, I have put @ghsdh3409 's code in DetoxTest.java from androidTest directory.

(For those lazy like me, so that you don’t have to look for your correct imports yourself 😃 )

My problem also is due to react-native-device-info. As this comment, they are still trying to figure out.

I temporary fix it by stubbing WebSettings.getDefaultUserAgent() using mockito-android in my Detox test code.

@Test
public void runDetoxTests() throws InterruptedException {
  Context reactContext = InstrumentationRegistry.getTargetContext().getApplicationContext();
  WebSettings webSettings = spy(WebSettings.class);
  doReturn("getDefaultUserAgentMock").when(webSettings).getDefaultUserAgent(reactContext);

  Detox.runTests(mActivityRule);
}

@skv-headless I’ve pinpointed the problem of react-native-device-info to this line in the native module:

     constants.put("userAgent", WebSettings.getDefaultUserAgent(this.reactContext));

This line make detox hang forever. If I comment it out, the detox test runs fine. Any clues on what might be going on ? 🤔

Any update on this as @ilonashub . i am getting the same behaviour here. the app launches but gets stuck and no tests are performed. Everything works fine when i use the emulator. btw i already did

adb reverse tcp:8081 tcp:8081

The log that is displayed by detox test -c android.emu.debug - --debug-synchronization 300 -l verbose

node_modules/.bin/mocha e2e --opts e2e/mocha.opts --configuration android.emu.debug --loglevel verbose   --debug-synchronization 300 --grep :ios: --invert  


detox-server info 12:48:05: server listening on localhost:55634...
detox verb ws onOpen [object Object]
detox verb ws send: {"type":"login","params":{"sessionId":"959956bd-ac16-cb2b-4b3d-7e65f60126f2","role":"tester"},"messageId":0}
detox verb ws onMessage: {"type":"loginSuccess","params":{"sessionId":"959956bd-ac16-cb2b-4b3d-7e65f60126f2","role":"tester"},"messageId":0}
detox verb ws  
detox verb 1: /Users/sherazahmadkhilji/Library/Android/sdk/platform-tools/adb  devices 
detox verb 1: stdout: List of devices attached
detox verb 1: stdout: 0815f82b25841905	device
detox verb 1: stdout: 
detox verb 1: stdout: 
detox verb 2: /Users/sherazahmadkhilji/Library/Android/sdk/platform-tools/adb -s 0815f82b25841905 shell input keyevent 82 
detox verb 3: /Users/sherazahmadkhilji/Library/Android/sdk/platform-tools/adb -s 0815f82b25841905 uninstall com.goreadymade 
detox verb 3: stdout: Success
detox verb 3: stdout: 
detox verb 4: /Users/sherazahmadkhilji/Library/Android/sdk/platform-tools/adb -s 0815f82b25841905 uninstall com.goreadymade.test 
detox verb 4: stdout: Success
detox verb 4: stdout: 
detox verb 5: /Users/sherazahmadkhilji/Library/Android/sdk/platform-tools/adb -s 0815f82b25841905 shell getprop ro.build.version.sdk 
detox verb 5: stdout: 24
detox verb 5: stdout: 
detox verb 6: /Users/sherazahmadkhilji/Library/Android/sdk/platform-tools/adb -s 0815f82b25841905 install -r -g /Users/sherazahmadkhilji/ReactNative/GoReadyMade/android/app/build/outputs/apk/debug/app-debug.apk 
detox verb 6: stdout: Success
detox verb 6: stdout: 
detox verb 7: /Users/sherazahmadkhilji/Library/Android/sdk/platform-tools/adb -s 0815f82b25841905 shell getprop ro.build.version.sdk 
detox verb 7: stdout: 24
detox verb 7: stdout: 
detox verb 8: /Users/sherazahmadkhilji/Library/Android/sdk/platform-tools/adb -s 0815f82b25841905 install -r -g /Users/sherazahmadkhilji/ReactNative/GoReadyMade/android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk 
detox verb 8: stdout: Success
detox verb 8: stdout: 
detox verb 9: /Users/sherazahmadkhilji/Library/Android/sdk/platform-tools/adb -s 0815f82b25841905 shell am force-stop com.goreadymade 
detox verb 10: /Users/sherazahmadkhilji/Library/Android/sdk/platform-tools/adb -s 0815f82b25841905 shell pm list instrumentation 
detox verb 10: stdout: instrumentation:com.goreadymade.test/android.support.test.runner.AndroidJUnitRunner (target=com.goreadymade)
detox verb 10: stdout: instrumentation:com.microsoft.office.excel/android.test.InstrumentationTestRunner (target=com.microsoft.office.msohttp.tests)
detox verb 10: stdout: instrumentation:com.microsoft.office.onenote/android.test.InstrumentationTestRunner (target=com.microsoft.office.msohttp.tests)
detox verb 10: stdout: instrumentation:com.microsoft.office.word/android.test.InstrumentationTestRunner (target=com.microsoft.office.msohttp.tests)
detox verb 10: stdout: instrumentation:com.microsoft.office.powerpoint/android.test.InstrumentationTestRunner (target=com.microsoft.office.msohttp.tests)
detox verb 10: stdout: 
detox verb /Users/sherazahmadkhilji/Library/Android/sdk/platform-tools/adb -s 0815f82b25841905 shell am instrument -w -r -e detoxServer ws://localhost:55634 -e detoxSessionId 959956bd-ac16-cb2b-4b3d-7e65f60126f2 -e debug false com.goreadymade.test/android.support.test.runner.AndroidJUnitRunner 
detox verb Instrumentation spawned, childProcess.pid:  11023
detox verb ws send: {"type":"isReady","params":{},"messageId":-1000}
detox verb Instrumentation stdout:  INSTRUMENTATION_STATUS: numtests=1
detox verb Instrumentation stdout:  
detox verb Instrumentation stdout:  INSTRUMENTATION_STATUS: stream=
detox verb Instrumentation stdout:  com.goreadymade.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.goreadymade.DetoxTest
detox verb Instrumentation stdout:  INSTRUMENTATION_STATUS: current=1
detox verb Instrumentation stdout:  INSTRUMENTATION_STATUS_CODE: 1
detox verb Instrumentation stdout:  

  0 passing (2m)

  1) "before all" hook
detox verb instrumentationProcess terminated due to receipt of signal SIGTERM 

It took me a day to come to the same conclusion, but yea - it’s RNDeviceInfo. The second I remove it from mainApplication.java and the tests start on android.

doing @machour’s change also fixes the issue. Is this something that detox can go around or should we look for ways to fix this in RNDEviceInfo? I don’t see anything out of the ordinary that deviceInfo does. https://developer.android.com/reference/android/webkit/WebSettings

Thanks for the quick response! So I ran the build again and made sure that if I open the installed app on the emulator it runs properly.

When I ran detox test -c android.emu.release --debug-synchronization 300 nothing changed… It looks like it’s not able to open the app when I ran the detox test.

The output for detox test --configuration android.emu.release --debug-synchronization 300 --loglevel verbose:

detox-server info 12:10:11: server listening on localhost:60281...
detox verb ws onOpen [object Object]
detox verb ws send: {"type":"login","params":{"sessionId":"5d7b0205-0ed4-15d9-e902-cf8ace063f4e","role":"tester"},"messageId":0}
detox verb ws onMessage: {"type":"loginSuccess","params":{"sessionId":"5d7b0205-0ed4-15d9-e902-cf8ace063f4e","role":"tester"},"messageId":0}
detox verb ws
detox verb 1: /Users/ilonashub/Library/Android/sdk/tools/emulator -list-avds --verbose
detox verb 1: stdout: Nexus_5X_API_23
detox verb 1: stdout: Nexus_5X_API_24
detox verb 1: stdout:
detox verb Emulator stdout:  emulator: Android virtual device file at: /Users/ilonashub/.android/avd/Nexus_5X_API_24.ini
detox verb Emulator stdout:  emulator: virtual device content at /Users/ilonashub/.android/avd/Nexus_5X_API_24.avd
detox verb Emulator stdout:  emulator: virtual device config file: /Users/ilonashub/.android/avd/Nexus_5X_API_24.avd/config.ini
detox verb Emulator stdout:  emulator: using core hw config path: /Users/ilonashub/.android/avd/Nexus_5X_API_24.avd/hardware-qemu.ini
detox verb Emulator stdout:  emulator: Found AVD target API level: 24
detox verb Emulator stdout:  emulator: Read property file at /Users/ilonashub/Library/Android/sdk//system-images/android-24/google_apis_playstore/x86//build.prop
detox verb Emulator stdout:  emulator: No boot.prop property file found.
detox verb Emulator stdout:  emulator: found skin 'nexus_5x' in directory: /Users/ilonashub/Library/Android/sdk/skins/
detox verb Emulator stdout:  emulator: autoconfig: -skin nexus_5x
detox verb Emulator stdout:  emulator: autoconfig: -skindir /Users/ilonashub/Library/Android/sdk/skins/
detox verb Emulator stdout:  emulator: autoconfig: -kernel /Users/ilonashub/Library/Android/sdk//system-images/android-24/google_apis_playstore/x86//kernel-ranchu
detox verb Emulator stdout:  emulator: Target arch = 'x86'
detox verb Emulator stdout:  emulator: Auto-config: -qemu -cpu qemu32
detox verb Emulator stdout:  emulator: Auto-detect: Kernel image requires new device naming scheme.
detox verb Emulator stdout:  emulator: Auto-detect: Kernel does not support YAFFS2 partitions.
detox verb Emulator stdout:  emulator: autoconfig: -ramdisk /Users/ilonashub/Library/Android/sdk//system-images/android-24/google_apis_playstore/x86//ramdisk.img
detox verb Emulator stdout:  emulator: Using initial system image: /Users/ilonashub/Library/Android/sdk//system-images/android-24/google_apis_playstore/x86//system.img
detox verb Emulator stdout:  emulator: No vendor image
detox verb Emulator stdout:  emulator: autoconfig: -data /Users/ilonashub/.android/avd/Nexus_5X_API_24.avd/userdata-qemu.img
detox verb Emulator stdout:  emulator: autoconfig: -initdata /Users/ilonashub/.android/avd/Nexus_5X_API_24.avd/userdata.img
detox verb Emulator stdout:  emulator: autoconfig: -cache /Users/ilonashub/.android/avd/Nexus_5X_API_24.avd/cache.img
detox verb Emulator stdout:  emulator: autoconfig: -sdcard /Users/ilonashub/.android/avd/Nexus_5X_API_24.avd/sdcard.img
detox verb Emulator stdout:  emulator: Physical RAM size: 1536MB
detox verb Emulator stdout:
detox verb Emulator stdout:  emulator: VM heap size 256MB is below hardware specified minimum of 384MB,setting it to that value
detox verb Emulator stdout:  emulator: System image is read only
detox verb Emulator stdout:  emulator: Found 2 DNS servers: 192.115.106.35 62.219.186.7
detox verb Emulator stdout:  emulator: ERROR: There's another emulator instance running with the current AVD 'Nexus_5X_API_24'. Exiting...
detox verb Emulator stdout:
detox verb Emulator stdout:
detox verb 2: /Users/ilonashub/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/ilonashub/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell input keyevent 82
detox verb 4: /Users/ilonashub/Library/Android/sdk/platform-tools/adb -s emulator-5554 uninstall com.homeismobile
detox verb 4: stdout: Success
detox verb 4: stdout:
detox verb 5: /Users/ilonashub/Library/Android/sdk/platform-tools/adb -s emulator-5554 uninstall com.homeismobile.test
detox verb 5: stdout: Success
detox verb 5: stdout:
detox verb 6: /Users/ilonashub/Library/Android/sdk/platform-tools/adb -s emulator-5554 install -r -g /Users/ilonashub/homeis/home-is-mobile/android/app/build/outputs/apk/app-release.apk
detox verb 6: stderr: Success
detox verb 6: stderr:
detox verb 7: /Users/ilonashub/Library/Android/sdk/platform-tools/adb -s emulator-5554 install -r -g /Users/ilonashub/homeis/home-is-mobile/android/app/build/outputs/apk/app-release-androidTest.apk
detox verb 7: stderr: Success
detox verb 7: stderr:
detox verb 8: /Users/ilonashub/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell am force-stop com.homeismobile
detox verb adb -s emulator-5554 shell am instrument -w -r -e detoxServer ws://localhost:60281 -e detoxSessionId 5d7b0205-0ed4-15d9-e902-cf8ace063f4e -e debug false com.homeismobile.test/android.support.test.runner.AndroidJUnitRunner
detox verb Instrumentation spawned, childProcess.pid:  64513
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.homeismobile.DetoxTest:
detox verb Instrumentation stdout:  INSTRUMENTATION_STATUS: id=AndroidJUnitRunner
detox verb Instrumentation stdout:  INSTRUMENTATION_STATUS: test=runDetoxTests
detox verb Instrumentation stdout:
detox verb Instrumentation stdout:  INSTRUMENTATION_STATUS: class=com.homeismobile.DetoxTest
detox verb Instrumentation stdout:  INSTRUMENTATION_STATUS: current=1
detox verb Instrumentation stdout:  INSTRUMENTATION_STATUS_CODE: 1
detox verb Instrumentation stdout:

and after a few minutes I start to see mocha’s timeouts…