Detox: Detox 14.6.1 with RN 0.61.3 with Android fails to connect with the Metro Bundler

After upgrading a React Native application to 0.61.3, Android detox testing stopped working and would just hang. There is also no debug connection messages displayed on the Metro bundler.

Here is the trace output from Android:

$ detox test -c android.emu.debug --loglevel trace e2e/base/welcome.spec.js
detox[10230] INFO:  [test.js] configuration="android.emu.debug" loglevel="trace" artifactsLocation="artifacts/android.emu.debug.2019-11-07 17-07-55Z" recordLogs="none" takeScreenshots="manual" recordVideos="none" recordPerformance="none" reportSpecs=true readOnlyEmu=false node_modules/.bin/jest --config=e2e/config.json --maxWorkers=1 '--testNamePattern=^((?!:ios:).)*$' e2e/base/welcome.spec.js
● Deprecation Warning:

  Option "setupTestFrameworkScriptFile" was replaced by configuration "setupFilesAfterEnv", which supports multiple paths.

  Please update your configuration.

  Configuration Documentation:
  https://jestjs.io/docs/configuration.html

detox[10231] INFO:  [DetoxServer.js] server listening on localhost:64180...
detox[10231] DEBUG: [AsyncWebSocket.js/WEBSOCKET_OPEN] opened web socket to: ws://localhost:64180
detox[10231] TRACE: [AsyncWebSocket.js/WEBSOCKET_SEND] {"type":"login","params":{"sessionId":"0bf02aa4-e3cd-4114-e942-fb67509f7eba","role":"tester"},"messageId":0}
detox[10231] DEBUG: [DetoxServer.js/LOGIN] role=tester, sessionId=0bf02aa4-e3cd-4114-e942-fb67509f7eba
detox[10231] DEBUG: [DetoxServer.js/LOGIN_SUCCESS] role=tester, sessionId=0bf02aa4-e3cd-4114-e942-fb67509f7eba
detox[10231] TRACE: [AsyncWebSocket.js/WEBSOCKET_MESSAGE] {"type":"loginSuccess","params":{"sessionId":"0bf02aa4-e3cd-4114-e942-fb67509f7eba","role":"tester"},"messageId":0}

detox[10231] DEBUG: [exec.js/EXEC_CMD, #0] /Users/user/Library/Android/sdk/emulator/emulator -list-avds --verbose
detox[10231] TRACE: [exec.js/EXEC_SUCCESS, #0] Pixel_2_API_29

detox[10231] DEBUG: [exec.js/EXEC_CMD, #1] /Users/user/Library/Android/sdk/platform-tools/adb  devices
detox[10231] DEBUG: [exec.js/EXEC_SUCCESS, #1] List of devices attached
emulator-18444	device


detox[10231] TRACE: [EmulatorTelnet.js/TELNET_CONNECTING] port: 18444, host: localhost
detox[10231] DEBUG: [exec.js/EXEC_CMD, #2] /Users/user/Library/Android/sdk/platform-tools/adb -s emulator-18444 shell "getprop dev.bootcomplete"
detox[10231] TRACE: [exec.js/EXEC_SUCCESS, #2] 1

detox[10231] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onBootDevice({ coldBoot: false, deviceId: 'emulator-18444' })
detox[10231] DEBUG: [exec.js/EXEC_CMD, #3] /Users/user/Library/Android/sdk/platform-tools/adb -s emulator-18444 shell "getprop ro.build.version.sdk"
detox[10231] TRACE: [exec.js/EXEC_SUCCESS, #3] 29

detox[10231] DEBUG: [exec.js/EXEC_CMD, #4] /Users/user/Library/Android/sdk/platform-tools/adb -s emulator-18444 shell "dumpsys power | grep \"^[ ]*m[UW].*=\""
detox[10231] TRACE: [exec.js/EXEC_SUCCESS, #4]   mWakefulness=Awake
  mWakefulnessChanging=false
  mWakeLockSummary=0x1
  mUserActivitySummary=0x1
  mWakeUpWhenPluggedOrUnpluggedConfig=false
  mWakeUpWhenPluggedOrUnpluggedInTheaterModeConfig=false
  mUserActivityTimeoutOverrideFromWindowManager=-1
  mUserInactiveOverrideFromWindowManager=false

detox[10231] DEBUG: [exec.js/EXEC_CMD, #5] /Users/user/Library/Android/sdk/build-tools/29.0.2/aapt dump badging "/Users/user/work/myInfo/Client/android/app/build/outputs/apk/debug/app-debug.apk" | grep -e "package: name="
detox[10231] TRACE: [exec.js/EXEC_SUCCESS, #5] package: name='com.heresmyinfo.client.debug' versionCode='44' versionName='0.9.72' compileSdkVersion='28' compileSdkVersionCodename='9'

detox[10231] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onBeforeUninstallApp({ deviceId: 'emulator-18444',
  bundleId: 'com.heresmyinfo.client.debug' })
detox[10231] DEBUG: [exec.js/EXEC_CMD, #6] /Users/user/Library/Android/sdk/platform-tools/adb -s emulator-18444 shell "pm list packages com.heresmyinfo.client.debug"
detox[10231] TRACE: [exec.js/EXEC_SUCCESS, #6] package:com.heresmyinfo.client.debug.test
package:com.heresmyinfo.client.debug

detox[10231] DEBUG: [exec.js/EXEC_CMD, #7] /Users/user/Library/Android/sdk/platform-tools/adb -s emulator-18444 uninstall com.heresmyinfo.client.debug
detox[10231] TRACE: [exec.js/EXEC_SUCCESS, #7] Success

detox[10231] DEBUG: [exec.js/EXEC_CMD, #8] /Users/user/Library/Android/sdk/platform-tools/adb -s emulator-18444 shell "pm list packages com.heresmyinfo.client.debug.test"
detox[10231] TRACE: [exec.js/EXEC_SUCCESS, #8] package:com.heresmyinfo.client.debug.test

detox[10231] DEBUG: [exec.js/EXEC_CMD, #9] /Users/user/Library/Android/sdk/platform-tools/adb -s emulator-18444 uninstall com.heresmyinfo.client.debug.test
detox[10231] TRACE: [exec.js/EXEC_SUCCESS, #9] Success

detox[10231] DEBUG: [exec.js/EXEC_CMD, #10] /Users/user/Library/Android/sdk/platform-tools/adb -s emulator-18444 install -r -g -t "/Users/user/work/myInfo/Client/android/app/build/outputs/apk/debug/app-debug.apk"
detox[10231] TRACE: [exec.js/EXEC_SUCCESS, #10] Performing Streamed Install
Success

detox[10231] DEBUG: [exec.js/EXEC_CMD, #11] /Users/user/Library/Android/sdk/platform-tools/adb -s emulator-18444 install -r -g -t "/Users/user/work/myInfo/Client/android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk"
detox[10231] TRACE: [exec.js/EXEC_SUCCESS, #11] Performing Streamed Install
Success

detox[10231] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onBeforeTerminateApp({ deviceId: 'emulator-18444',
  bundleId: 'com.heresmyinfo.client.debug' })
detox[10231] DEBUG: [exec.js/EXEC_CMD, #12] /Users/user/Library/Android/sdk/platform-tools/adb -s emulator-18444 shell "am force-stop com.heresmyinfo.client.debug"
detox[10231] TRACE: [exec.js/EXEC_SUCCESS, #12]
detox[10231] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onBeforeLaunchApp({ deviceId: 'emulator-18444',
  bundleId: 'com.heresmyinfo.client.debug',
  launchArgs:
   { detoxServer: 'ws://localhost:64180',
     detoxSessionId: '0bf02aa4-e3cd-4114-e942-fb67509f7eba' } })
detox[10231] DEBUG: [exec.js/EXEC_CMD, #13] /Users/user/Library/Android/sdk/platform-tools/adb -s emulator-18444 shell "date +\"%m-%d %T.000\""
detox[10231] TRACE: [exec.js/EXEC_SUCCESS, #13] 11-07 09:07:58.000

detox[10231] DEBUG: [exec.js/EXEC_CMD, #14] /Users/user/Library/Android/sdk/platform-tools/adb -s emulator-18444 reverse tcp:64180 tcp:64180
detox[10231] TRACE: [exec.js/EXEC_SUCCESS, #14] 64180

detox[10231] DEBUG: [exec.js/EXEC_CMD, #15] /Users/user/Library/Android/sdk/platform-tools/adb -s emulator-18444 shell "pm list instrumentation"
detox[10231] TRACE: [exec.js/EXEC_SUCCESS, #15] instrumentation:com.heresmyinfo.client.debug.test/com.android.test.runner.MultiDexTestRunner (target=com.heresmyinfo.client.debug)

detox[10231] DEBUG: [exec.js/SPAWN_CMD, #16] [pid=10252] /Users/user/Library/Android/sdk/platform-tools/adb -s emulator-18444 shell am instrument -w -r -e detoxServer ws://localhost:64180 -e detoxSessionId 0bf02aa4-e3cd-4114-e942-fb67509f7eba -e debug ZmFsc2U= com.heresmyinfo.client.debug.test/com.android.test.runner.MultiDexTestRunner
detox[10231] DEBUG: [exec.js/EXEC_CMD, #17] /Users/user/Library/Android/sdk/platform-tools/adb -s emulator-18444 shell "ps | grep \"com\.heresmyinfo\.client\.debug$\""
detox[10231] TRACE: [exec.js/EXEC_SUCCESS, #17] u0_a147       4370  1776 1905620 129332 0                   0 R com.heresmyinfo.client.debug

detox[4370] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onLaunchApp({ deviceId: 'emulator-18444',
  bundleId: 'com.heresmyinfo.client.debug',
  launchArgs:
   { detoxServer: 'ws://localhost:64180',
     detoxSessionId: '0bf02aa4-e3cd-4114-e942-fb67509f7eba' },
  pid: 4370 })
detox[10231] TRACE: [AsyncWebSocket.js/WEBSOCKET_SEND] {"type":"isReady","params":{},"messageId":-1000}
detox[10231] TRACE: [DetoxServer.js/MESSAGE] role=tester action=isReady (sessionId=0bf02aa4-e3cd-4114-e942-fb67509f7eba)
detox[10231] DEBUG: [DetoxServer.js/CANNOT_FORWARD] role=testee not connected, cannot fw action (sessionId=0bf02aa4-e3cd-4114-e942-fb67509f7eba)

 RUNS  e2e/base/welcome.spec.js 

It hangs after the ‘cannot fw action’ debug statement without connecting to the application on the emulator and there

While ios also issues a ‘cannot fw action’ debug statement, it continues processing to connect to the application on the emulator.

$ detox test -c ios.sim.debug --loglevel trace e2e/base/welcome.spec.js
detox[10033] INFO:  [test.js] configuration="ios.sim.debug" loglevel="trace" artifactsLocation="artifacts/ios.sim.debug.2019-11-07 16-54-40Z" recordLogs="none" takeScreenshots="manual" recordVideos="none" recordPerformance="none" reportSpecs=true node_modules/.bin/jest --config=e2e/config.json --maxWorkers=1 '--testNamePattern=^((?!:android:).)*$' e2e/base/welcome.spec.js
● Deprecation Warning:

  Option "setupTestFrameworkScriptFile" was replaced by configuration "setupFilesAfterEnv", which supports multiple paths.

  Please update your configuration.

  Configuration Documentation:
  https://jestjs.io/docs/configuration.html

detox[10034] INFO:  [DetoxServer.js] server listening on localhost:59142...
detox[10034] DEBUG: [AsyncWebSocket.js/WEBSOCKET_OPEN] opened web socket to: ws://localhost:59142
detox[10034] TRACE: [AsyncWebSocket.js/WEBSOCKET_SEND] {"type":"login","params":{"sessionId":"70cb384d-3f5e-1e41-ad0e-ad6cf58d6cde","role":"tester"},"messageId":0}
detox[10034] DEBUG: [DetoxServer.js/LOGIN] role=tester, sessionId=70cb384d-3f5e-1e41-ad0e-ad6cf58d6cde
detox[10034] DEBUG: [DetoxServer.js/LOGIN_SUCCESS] role=tester, sessionId=70cb384d-3f5e-1e41-ad0e-ad6cf58d6cde
detox[10034] TRACE: [AsyncWebSocket.js/WEBSOCKET_MESSAGE] {"type":"loginSuccess","params":{"sessionId":"70cb384d-3f5e-1e41-ad0e-ad6cf58d6cde","role":"tester"},"messageId":0}

detox[10034] DEBUG: [exec.js/EXEC_CMD, #0] applesimutils --list --byType "iPhone 8"
detox[10034] TRACE: [exec.js/EXEC_SUCCESS, #0] [
  {
    "deviceType" : {
      "name" : "iPhone 8",
      "bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Library\/Developer\/CoreSimulator\/Profiles\/DeviceTypes\/iPhone 8.simdevicetype",
      "identifier" : "com.apple.CoreSimulator.SimDeviceType.iPhone-8"
    },
    "state" : "Booted",
    "isAvailable" : true,
    "name" : "iPhone 8",
    "udid" : "3AD1ADD0-599B-400A-A018-9497928A95A7",
    "os" : {
      "buildversion" : "17A844",
      "bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Library\/Developer\/CoreSimulator\/Profiles\/Runtimes\/iOS.simruntime",
      "isAvailable" : true,
      "name" : "iOS 13.1",
      "identifier" : "com.apple.CoreSimulator.SimRuntime.iOS-13-1",
      "version" : "13.1"
    }
  }
]

detox[10034] DEBUG: [exec.js/EXEC_CMD, #1] applesimutils --list --byId 3AD1ADD0-599B-400A-A018-9497928A95A7 --maxResults 1
detox[10034] TRACE: [exec.js/EXEC_SUCCESS, #1] [
  {
    "deviceType" : {
      "name" : "iPhone 8",
      "bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Library\/Developer\/CoreSimulator\/Profiles\/DeviceTypes\/iPhone 8.simdevicetype",
      "identifier" : "com.apple.CoreSimulator.SimDeviceType.iPhone-8"
    },
    "state" : "Booted",
    "isAvailable" : true,
    "name" : "iPhone 8",
    "udid" : "3AD1ADD0-599B-400A-A018-9497928A95A7",
    "os" : {
      "buildversion" : "17A844",
      "bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Library\/Developer\/CoreSimulator\/Profiles\/Runtimes\/iOS.simruntime",
      "isAvailable" : true,
      "name" : "iOS 13.1",
      "identifier" : "com.apple.CoreSimulator.SimRuntime.iOS-13-1",
      "version" : "13.1"
    }
  }
]

detox[10034] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onBootDevice({ coldBoot: false,
  deviceId: '3AD1ADD0-599B-400A-A018-9497928A95A7' })
detox[10034] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onBeforeUninstallApp({ deviceId: '3AD1ADD0-599B-400A-A018-9497928A95A7',
  bundleId: 'com.heresmyinfo.heresmyinfo' })
detox[10034] DEBUG: [exec.js/EXEC_CMD, #2] /usr/bin/xcrun simctl uninstall 3AD1ADD0-599B-400A-A018-9497928A95A7 com.heresmyinfo.heresmyinfo
detox[10034] DEBUG: [exec.js/EXEC_TRY, #2] Uninstalling com.heresmyinfo.heresmyinfo...
detox[10034] TRACE: [exec.js/EXEC_SUCCESS, #2]
detox[10034] DEBUG: [exec.js/EXEC_SUCCESS, #2] com.heresmyinfo.heresmyinfo uninstalled
detox[10034] DEBUG: [exec.js/EXEC_CMD, #3] /usr/bin/xcrun simctl install 3AD1ADD0-599B-400A-A018-9497928A95A7 "/Users/user/work/myInfo/Client/ios/build/Build/Products/Debug-iphonesimulator/client.app"
detox[10034] DEBUG: [exec.js/EXEC_TRY, #3] Installing /Users/user/work/myInfo/Client/ios/build/Build/Products/Debug-iphonesimulator/client.app...
detox[10034] TRACE: [exec.js/EXEC_SUCCESS, #3]
detox[10034] DEBUG: [exec.js/EXEC_SUCCESS, #3] /Users/user/work/myInfo/Client/ios/build/Build/Products/Debug-iphonesimulator/client.app installed
detox[10034] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onBeforeTerminateApp({ deviceId: '3AD1ADD0-599B-400A-A018-9497928A95A7',
  bundleId: 'com.heresmyinfo.heresmyinfo' })
detox[10034] DEBUG: [exec.js/EXEC_CMD, #4] /usr/bin/xcrun simctl terminate 3AD1ADD0-599B-400A-A018-9497928A95A7 com.heresmyinfo.heresmyinfo
detox[10034] DEBUG: [exec.js/EXEC_TRY, #4] Terminating com.heresmyinfo.heresmyinfo...
detox[10034] TRACE: [exec.js/EXEC_SUCCESS, #4]
detox[10034] DEBUG: [exec.js/EXEC_SUCCESS, #4] com.heresmyinfo.heresmyinfo terminated
detox[10034] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onBeforeLaunchApp({ bundleId: 'com.heresmyinfo.heresmyinfo',
  deviceId: '3AD1ADD0-599B-400A-A018-9497928A95A7',
  launchArgs:
   { detoxServer: 'ws://localhost:59142',
     detoxSessionId: '70cb384d-3f5e-1e41-ad0e-ad6cf58d6cde' } })
detox[10034] DEBUG: [exec.js/EXEC_CMD, #5] SIMCTL_CHILD_DYLD_INSERT_LIBRARIES="/Users/user/Library/Detox/ios/6c3d88685b110179f322e5aa846acc3a7725e287/Detox.framework/Detox" /usr/bin/xcrun simctl launch 3AD1ADD0-599B-400A-A018-9497928A95A7 com.heresmyinfo.heresmyinfo --args -detoxServer "ws://localhost:59142" -detoxSessionId "70cb384d-3f5e-1e41-ad0e-ad6cf58d6cde"
detox[10034] DEBUG: [exec.js/EXEC_TRY, #5] Launching com.heresmyinfo.heresmyinfo...
detox[10034] TRACE: [exec.js/EXEC_SUCCESS, #5] com.heresmyinfo.heresmyinfo: 10071

detox[10034] DEBUG: [exec.js/EXEC_CMD, #6] /usr/bin/xcrun simctl get_app_container 3AD1ADD0-599B-400A-A018-9497928A95A7 com.heresmyinfo.heresmyinfo
detox[10034] TRACE: [exec.js/EXEC_SUCCESS, #6] /Users/user/Library/Developer/CoreSimulator/Devices/3AD1ADD0-599B-400A-A018-9497928A95A7/data/Containers/Bundle/Application/6193C385-0FDD-43C9-8135-3FB9D82CDC99/client.app

detox[10034] INFO:  [AppleSimUtils.js] com.heresmyinfo.heresmyinfo launched. To watch simulator logs, run:
        /usr/bin/xcrun simctl spawn 3AD1ADD0-599B-400A-A018-9497928A95A7 log stream --level debug --style compact --predicate 'processImagePath beginsWith "/Users/user/Library/Developer/CoreSimulator/Devices/3AD1ADD0-599B-400A-A018-9497928A95A7/data/Containers/Bundle/Application/6193C385-0FDD-43C9-8135-3FB9D82CDC99/client.app"'
detox[10071] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onLaunchApp({ bundleId: 'com.heresmyinfo.heresmyinfo',
  deviceId: '3AD1ADD0-599B-400A-A018-9497928A95A7',
  launchArgs:
   { detoxServer: 'ws://localhost:59142',
     detoxSessionId: '70cb384d-3f5e-1e41-ad0e-ad6cf58d6cde' },
  pid: 10071 })
detox[10034] TRACE: [AsyncWebSocket.js/WEBSOCKET_SEND] {"type":"isReady","params":{},"messageId":-1000}
detox[10034] TRACE: [DetoxServer.js/MESSAGE] role=tester action=isReady (sessionId=70cb384d-3f5e-1e41-ad0e-ad6cf58d6cde)
detox[10034] DEBUG: [DetoxServer.js/CANNOT_FORWARD] role=testee not connected, cannot fw action (sessionId=70cb384d-3f5e-1e41-ad0e-ad6cf58d6cde)
detox[10034] DEBUG: [DetoxServer.js/LOGIN] role=testee, sessionId=70cb384d-3f5e-1e41-ad0e-ad6cf58d6cde
detox[10034] DEBUG: [DetoxServer.js/LOGIN_SUCCESS] role=testee, sessionId=70cb384d-3f5e-1e41-ad0e-ad6cf58d6cde
detox[10034] TRACE: [DetoxServer.js/MESSAGE] role=testee action=ready (sessionId=70cb384d-3f5e-1e41-ad0e-ad6cf58d6cde)
detox[10034] TRACE: [AsyncWebSocket.js/WEBSOCKET_MESSAGE] {"type":"ready","messageId":-1000,"params":{}}

detox[10034] TRACE: [AsyncWebSocket.js/WEBSOCKET_SEND] {"type":"waitForActive","params":{},"messageId":1}
detox[10034] TRACE: [DetoxServer.js/MESSAGE] role=tester action=waitForActive (sessionId=70cb384d-3f5e-1e41-ad0e-ad6cf58d6cde)
detox[10034] TRACE: [DetoxServer.js/MESSAGE] role=testee action=waitForActiveDone (sessionId=70cb384d-3f5e-1e41-ad0e-ad6cf58d6cde)
detox[10034] TRACE: [AsyncWebSocket.js/WEBSOCKET_MESSAGE] {"type":"waitForActiveDone","messageId":1,"params":{}}

detox[10034] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onBeforeAll()
detox[10034] TRACE: [Detox.js/DETOX_BEFORE_EACH] running test: "Welcome screen ensure welcome screen elements exist: welcome screen, signup and login"
detox[10034] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onBeforeEach({ title: 'ensure welcome screen elements exist: welcome screen, signup and login',
  fullName: 'Welcome screen ensure welcome screen elements exist: welcome screen, signup and login',
  status: 'running' })
detox[10034] DEBUG: [exec.js/EXEC_CMD, #7] applesimutils --byId 3AD1ADD0-599B-400A-A018-9497928A95A7 --bundle com.heresmyinfo.heresmyinfo --restartSB --setPermissions contacts=YES
detox[10034] DEBUG: [exec.js/EXEC_TRY, #7] Trying to set permissions...
detox[10034] TRACE: [exec.js/EXEC_SUCCESS, #7]
detox[10034] DEBUG: [exec.js/EXEC_SUCCESS, #7] Permissions are set
detox[10034] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onBeforeLaunchApp({ bundleId: 'com.heresmyinfo.heresmyinfo',
  deviceId: '3AD1ADD0-599B-400A-A018-9497928A95A7',
  launchArgs:
   { detoxServer: 'ws://localhost:59142',
     detoxSessionId: '70cb384d-3f5e-1e41-ad0e-ad6cf58d6cde' } })
detox[10034] DEBUG: [exec.js/EXEC_CMD, #8] SIMCTL_CHILD_DYLD_INSERT_LIBRARIES="/Users/user/Library/Detox/ios/6c3d88685b110179f322e5aa846acc3a7725e287/Detox.framework/Detox" /usr/bin/xcrun simctl launch 3AD1ADD0-599B-400A-A018-9497928A95A7 com.heresmyinfo.heresmyinfo --args -detoxServer "ws://localhost:59142" -detoxSessionId "70cb384d-3f5e-1e41-ad0e-ad6cf58d6cde"
detox[10034] DEBUG: [exec.js/EXEC_TRY, #8] Launching com.heresmyinfo.heresmyinfo...
detox[10034] DEBUG: [DetoxServer.js/DISCONNECT] role=testee, sessionId=70cb384d-3f5e-1e41-ad0e-ad6cf58d6cde
detox[10034] TRACE: [AsyncWebSocket.js/WEBSOCKET_MESSAGE] {"type":"testeeDisconnected","messageId":-49642}

detox[10034] TRACE: [exec.js/EXEC_SUCCESS, #8] com.heresmyinfo.heresmyinfo: 10096

detox[10034] DEBUG: [exec.js/EXEC_CMD, #9] /usr/bin/xcrun simctl get_app_container 3AD1ADD0-599B-400A-A018-9497928A95A7 com.heresmyinfo.heresmyinfo
detox[10034] TRACE: [exec.js/EXEC_SUCCESS, #9] /Users/user/Library/Developer/CoreSimulator/Devices/3AD1ADD0-599B-400A-A018-9497928A95A7/data/Containers/Bundle/Application/6193C385-0FDD-43C9-8135-3FB9D82CDC99/client.app

detox[10034] INFO:  [AppleSimUtils.js] com.heresmyinfo.heresmyinfo launched. To watch simulator logs, run:
        /usr/bin/xcrun simctl spawn 3AD1ADD0-599B-400A-A018-9497928A95A7 log stream --level debug --style compact --predicate 'processImagePath beginsWith "/Users/user/Library/Developer/CoreSimulator/Devices/3AD1ADD0-599B-400A-A018-9497928A95A7/data/Containers/Bundle/Application/6193C385-0FDD-43C9-8135-3FB9D82CDC99/client.app"'
detox[10096] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onLaunchApp({ bundleId: 'com.heresmyinfo.heresmyinfo',
  deviceId: '3AD1ADD0-599B-400A-A018-9497928A95A7',
  launchArgs:
   { detoxServer: 'ws://localhost:59142',
     detoxSessionId: '70cb384d-3f5e-1e41-ad0e-ad6cf58d6cde' },
  pid: 10096 })
detox[10034] TRACE: [AsyncWebSocket.js/WEBSOCKET_SEND] {"type":"isReady","params":{},"messageId":-1000}
detox[10034] TRACE: [DetoxServer.js/MESSAGE] role=tester action=isReady (sessionId=70cb384d-3f5e-1e41-ad0e-ad6cf58d6cde)
detox[10034] DEBUG: [DetoxServer.js/CANNOT_FORWARD] role=testee not connected, cannot fw action (sessionId=70cb384d-3f5e-1e41-ad0e-ad6cf58d6cde)
detox[10034] DEBUG: [DetoxServer.js/LOGIN] role=testee, sessionId=70cb384d-3f5e-1e41-ad0e-ad6cf58d6cde
detox[10034] DEBUG: [DetoxServer.js/LOGIN_SUCCESS] role=testee, sessionId=70cb384d-3f5e-1e41-ad0e-ad6cf58d6cde

 RUNS  e2e/base/welcome.spec.js

I’m also seeing a connection message from the Metro Bundler:

BUNDLE [ios, dev] ./index.js ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100.0% (1/1), done.

LOG connected to remotedev-server

Environment (please complete the following information):

  • Detox: 14.6.1
  • React Native: 0.61.3
  • Node:
  • Device: Android Pixel 2
  • OS: Mac OSX 10.14.6

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 5
  • Comments: 36 (3 by maintainers)

Most upvoted comments

Hi guys,

Still with the same problem using “react-native”: “0.61.3” and “detox”: “^14.9.2”. Already tried to add android:usesCleartextTraffic=“true” and also using the network_security_config.xml but with no luck.

Thanks for forwarding that RN issue #27010 to me. My schedule is pretty filled running around for the next few days, but I’ll try to look at it ASAP and implement their instructions

On Mon, Jan 13, 2020 at 4:48 AM d4vidi notifications@github.com wrote:

Since the discussion here went a bit offtrack (not entirely focused on the original submission), I’ll be referring strictly to @bullwrinkle https://github.com/bullwrinkle’s notes. In that sense, issues with new RN’s could be a result of this pending RN issue: facebook/react-native#27010 https://github.com/facebook/react-native/issues/27010. It is applicable in debug, and can be worked-around, as explained there in one of my comments.

@bullwrinkle https://github.com/bullwrinkle please report back if this helps you out. Thanks.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/wix/Detox/issues/1743?email_source=notifications&email_token=AAGVYRWOXQDI4L4DXDYXKR3Q5RPK5A5CNFSM4JKLGIP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIYSRXQ#issuecomment-573647070, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGVYRXGSLTV3H7X3EZPH4DQ5RPK5ANCNFSM4JKLGIPQ .

Since the discussion here went a bit offtrack (not entirely focused on the original submission), I’ll be referring strictly to @bullwrinkle’s notes. In that sense, issues with new RN’s could be a result of this pending RN issue: https://github.com/facebook/react-native/issues/27010. It is applicable in debug, and can be worked-around, as explained there in one of my comments.

@bullwrinkle please report back if this helps you out. Thanks.

I created a brand new RN project to try on a clean project, and it worked successfully. I then created a new branch of my app, tried adding detox to it again, and it also worked. I am no longer encountering this issue, and I’m inclined to believe it was due to some misconfiguration that’s easy to run into yet hard to diagnose.