Detox: launchApp hanging on 18.2.2 with TrustKit

Description

When running the tests, with no “real” tests (just the demo ones that come from init), the app hangs at “Loading from localhost:8081”. When launching the same app on the simulator not using detox to launch it, I get past that banner almost instantly to the first screen of the app.

The log implies that the network request is “done”, but it’s still waiting on the bundle too load. This doesn’t happen on older versions of detox (17.8.3 is the pre-18 version i tried).

#2409 seems to be a similar issue, but it appears to also be happening on 17.5.0 versions. Notably, we don’t use react-native-splash-screen. Also, I have checked that debugging is disabled, and live reload is disabled. I am using a debug version of the app.

#2569 seems to be similar as well, but the app does not boot correctly. I do see the

App has not responded to the network requests below:
  (id = -1000) isReady: {}

error however

  • I have tested this issue on the latest Detox release and it still reproduces

Reproduction

Provide the steps necessary to reproduce the issue. If you are seeing a regression, try to provide the last known version where the issue did not reproduce.

  1. run detox init -r jest
  2. fill out the .detoxrc.js with some valid content
  3. run detox test -c ios to run the tests on iOS
  4. launchApp runs, but
  • “React Native (bundle load)” shows as pending on the detox side, and
  • “Loading from localhost:8081” shows on the simulator

This doesn’t happen when I launch the app manually (exact same app - only change is manual launch), and also seems to work correctly when I installed detox@17.8.3 - there was no hang and the app booted normally.

Expected behavior

The app gets passed the “Loading from localhost:8081”

Screenshots

If applicable, add screenshots to help explain your problem.

image image

Environment (please complete the following information):

  • Detox: 18.2.2
  • React Native: 0.63.4
  • Node: 15.3.0
  • Device: iPhone 8 @ iOS 14.3
  • Xcode: 12.3
  • iOS: 14.3
  • macOS: 11.1

Logs

If you are experiencing a timeout in your test

Device and verbose Detox logs

  • I have run my tests using the --loglevel trace argument and am providing the verbose log below:
expand to see - i cut it off before the timeout. this same this thing just continues until the timeout
$ /Users/david/projects/ferocia/up/native/node_modules/.bin/detox test -c ios --loglevel trace
detox[94957] INFO:  [test.js] DETOX_CONFIGURATION="ios" DETOX_LOGLEVEL="trace" DETOX_REPORT_SPECS=true DETOX_START_TIMESTAMP=1611270389237 DETOX_USE_CUSTOM_LOGGER=true jest --config e2e/config.json --testNamePattern '^((?!:android:).)*$' --maxWorkers 1 e2e
detox[94958] TRACE: [Detox.js/DETOX_CREATE] created a Detox instance with config:
{"artifactsConfig":{"rootDir":"artifacts/ios.2021-01-21 23-06-29Z","plugins":{"log":{"enabled":true,"keepOnlyFailedTestsArtifacts":false},"screenshot":{"shouldTakeAutomaticSnapshots":true,"keepOnlyFailedTestsArtifacts":true,"takeWhen":{"testStart":false,"testDone":true},"enabled":true},"video":{"android":{"bitRate":4000000},"simulator":{"codec":"hevc"},"enabled":false,"keepOnlyFailedTestsArtifacts":false},"instruments":{"enabled":false,"keepOnlyFailedTestsArtifacts":false},"timeline":{"enabled":false},"uiHierarchy":{"enabled":true,"keepOnlyFailedTestsArtifacts":false}},"pathBuilder":{"_rootDir":"artifacts/ios.2021-01-21 23-06-29Z"}},"behaviorConfig":{"init":{"reinstallApp":true,"exposeGlobals":true},"cleanup":{"shutdownDevice":false},"launchApp":"auto"},"cliConfig":{"configuration":"ios","loglevel":"trace","useCustomLogger":"true"},"deviceConfig":{"type":"ios.simulator","build":"./up ios build test","binaryPath":"./products/ios/test.app","device":{"type":"iPhone 8","os":"14.3"}},"runnerConfig":{"testRunner":"jest","runnerConfig":"e2e/config.json","specs":"e2e"},"sessionConfig":{"autoStart":true,"server":"ws://localhost:51374","sessionId":"3f310b0f-bbc3-fe73-3087-353b3c551fe3","debugSynchronization":10000},"errorBuilder":{"filepath":"/Users/david/projects/ferocia/up/native/.detoxrc.js","contents":{"testRunner":"jest","runnerConfig":"e2e/config.json","artifacts":{"rootDir":"artifacts","plugins":{"instruments":{"enabled":false},"log":{"enabled":true},"uiHierarchy":"enabled","screenshot":{"shouldTakeAutomaticSnapshots":true,"keepOnlyFailedTestsArtifacts":true,"takeWhen":{"testStart":false,"testDone":true}},"video":{"android":{"bitRate":4000000},"simulator":{"codec":"hevc"}}}},"configurations":{"ios":{"type":"ios.simulator","build":"./up ios build test","binaryPath":"./products/ios/test.app","device":{"type":"iPhone 8","os":"14.3"}},"android":{"type":"android.emulator","binaryPath":"SPECIFY_PATH_TO_YOUR_APP_BINARY","device":{"avdName":"Pixel_2_API_29"}}}},"configurationName":"ios"}}
detox[94958] INFO:  [DetoxServer.js] server listening on localhost:51374...
detox[94958] DEBUG: [AsyncWebSocket.js/WEBSOCKET_OPEN] opened web socket to: ws://localhost:51374
detox[94958] TRACE: [AsyncWebSocket.js/WEBSOCKET_SEND] {"type":"login","params":{"sessionId":"3f310b0f-bbc3-fe73-3087-353b3c551fe3","role":"tester"},"messageId":0}
detox[94958] DEBUG: [DetoxServer.js/LOGIN] role=tester, sessionId=3f310b0f-bbc3-fe73-3087-353b3c551fe3
detox[94958] DEBUG: [DetoxServer.js/LOGIN_SUCCESS] role=tester, sessionId=3f310b0f-bbc3-fe73-3087-353b3c551fe3
detox[94958] TRACE: [AsyncWebSocket.js/WEBSOCKET_MESSAGE] {"type":"loginSuccess","params":{"sessionId":"3f310b0f-bbc3-fe73-3087-353b3c551fe3","role":"tester"},"messageId":0}

detox[94958] DEBUG: [exec.js/EXEC_CMD, #0] applesimutils --list --byOS 14.3 --byType "iPhone 8"
detox[94958] TRACE: [exec.js/EXEC_SUCCESS, #0] [
  {
    "os" : {
      "bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Library\/Developer\/CoreSimulator\/Profiles\/Runtimes\/iOS.simruntime",
      "buildversion" : "18C61",
      "runtimeRoot" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Library\/Developer\/CoreSimulator\/Profiles\/Runtimes\/iOS.simruntime\/Contents\/Resources\/RuntimeRoot",
      "identifier" : "com.apple.CoreSimulator.SimRuntime.iOS-14-3",
      "version" : "14.3",
      "isAvailable" : true,
      "name" : "iOS 14.3"
    },
    "dataPath" : "\/Users\/david\/Library\/Developer\/CoreSimulator\/Devices\/46AF1CE8-0373-49B4-BB26-78E90B96CB5D\/data",
    "logPath" : "\/Users\/david\/Library\/Logs\/CoreSimulator\/46AF1CE8-0373-49B4-BB26-78E90B96CB5D",
    "udid" : "46AF1CE8-0373-49B4-BB26-78E90B96CB5D",
    "isAvailable" : true,
    "deviceType" : {
      "minRuntimeVersion" : 720896,
      "bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Library\/Developer\/CoreSimulator\/Profiles\/DeviceTypes\/iPhone 8.simdevicetype",
      "maxRuntimeVersion" : 4294967295,
      "name" : "iPhone 8",
      "identifier" : "com.apple.CoreSimulator.SimDeviceType.iPhone-8",
      "productFamily" : "iPhone"
    },
    "deviceTypeIdentifier" : "com.apple.CoreSimulator.SimDeviceType.iPhone-8",
    "state" : "Booted",
    "name" : "iPhone 8"
  }
]

detox[94958] DEBUG: [exec.js/EXEC_CMD, #1] applesimutils --list --byId 46AF1CE8-0373-49B4-BB26-78E90B96CB5D --maxResults 1
detox[94958] TRACE: [exec.js/EXEC_SUCCESS, #1] [
  {
    "os" : {
      "bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Library\/Developer\/CoreSimulator\/Profiles\/Runtimes\/iOS.simruntime",
      "buildversion" : "18C61",
      "runtimeRoot" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Library\/Developer\/CoreSimulator\/Profiles\/Runtimes\/iOS.simruntime\/Contents\/Resources\/RuntimeRoot",
      "identifier" : "com.apple.CoreSimulator.SimRuntime.iOS-14-3",
      "version" : "14.3",
      "isAvailable" : true,
      "name" : "iOS 14.3"
    },
    "dataPath" : "\/Users\/david\/Library\/Developer\/CoreSimulator\/Devices\/46AF1CE8-0373-49B4-BB26-78E90B96CB5D\/data",
    "logPath" : "\/Users\/david\/Library\/Logs\/CoreSimulator\/46AF1CE8-0373-49B4-BB26-78E90B96CB5D",
    "udid" : "46AF1CE8-0373-49B4-BB26-78E90B96CB5D",
    "isAvailable" : true,
    "deviceType" : {
      "minRuntimeVersion" : 720896,
      "bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Library\/Developer\/CoreSimulator\/Profiles\/DeviceTypes\/iPhone 8.simdevicetype",
      "maxRuntimeVersion" : 4294967295,
      "name" : "iPhone 8",
      "identifier" : "com.apple.CoreSimulator.SimDeviceType.iPhone-8",
      "productFamily" : "iPhone"
    },
    "deviceTypeIdentifier" : "com.apple.CoreSimulator.SimDeviceType.iPhone-8",
    "state" : "Booted",
    "name" : "iPhone 8"
  }
]

detox[94958] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onBootDevice({
  coldBoot: false,
  deviceId: '46AF1CE8-0373-49B4-BB26-78E90B96CB5D',
  type: 'iPhone 8'
})
detox[94958] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onBeforeUninstallApp({
  deviceId: '46AF1CE8-0373-49B4-BB26-78E90B96CB5D',
  bundleId: 'au.com.up.money.integration'
})
detox[94958] DEBUG: [exec.js/EXEC_CMD, #2] /usr/bin/xcrun simctl uninstall 46AF1CE8-0373-49B4-BB26-78E90B96CB5D au.com.up.money.integration
detox[94958] DEBUG: [exec.js/EXEC_TRY, #2] Uninstalling au.com.up.money.integration...
detox[94958] TRACE: [exec.js/EXEC_SUCCESS, #2]
detox[94958] DEBUG: [exec.js/EXEC_SUCCESS, #2] au.com.up.money.integration uninstalled
detox[94958] DEBUG: [exec.js/EXEC_CMD, #3] /usr/bin/xcrun simctl install 46AF1CE8-0373-49B4-BB26-78E90B96CB5D "/Users/david/projects/ferocia/up/native/products/ios/test.app"
detox[94958] DEBUG: [exec.js/EXEC_TRY, #3] Installing /Users/david/projects/ferocia/up/native/products/ios/test.app...
detox[94958] TRACE: [exec.js/EXEC_SUCCESS, #3]
detox[94958] DEBUG: [exec.js/EXEC_SUCCESS, #3] /Users/david/projects/ferocia/up/native/products/ios/test.app installed
ROOT_DESCRIBE_BLOCK[94958] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onRunDescribeStart({ name: 'ROOT_DESCRIBE_BLOCK' })
Example[94958] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onRunDescribeStart({ name: 'Example' })
detox[94958] INFO:  Example is assigned to 46AF1CE8-0373-49B4-BB26-78E90B96CB5D {"type":"iPhone 8","os":"14.3"}
detox[94958] INFO:  at e2e/firstTest.e2e.js:11:21
 before all
detox[94958] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onBeforeTerminateApp({
  deviceId: '46AF1CE8-0373-49B4-BB26-78E90B96CB5D',
  bundleId: 'au.com.up.money.integration'
})
detox[94958] INFO:  at e2e/firstTest.e2e.js:22:21
 launch app done
detox[94958] DEBUG: [exec.js/EXEC_CMD, #4] /usr/bin/xcrun simctl terminate 46AF1CE8-0373-49B4-BB26-78E90B96CB5D au.com.up.money.integration
detox[94958] DEBUG: [exec.js/EXEC_TRY, #4] Terminating au.com.up.money.integration...
detox[94958] INFO:  Example: should have welcome screen
detox[94958] TRACE: [Detox.js/DETOX_BEFORE_EACH] running test: "Example should have welcome screen"
detox[94958] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onTestStart({
  title: 'should have welcome screen',
  fullName: 'Example should have welcome screen',
  status: 'running',
  invocations: 1
})
detox[94958] TRACE: [Artifact.js/START] starting SimulatorLogRecording
detox[94958] DEBUG: [exec.js/SPAWN_CMD, #5] [pid=95063] /usr/bin/xcrun simctl spawn 46AF1CE8-0373-49B4-BB26-78E90B96CB5D log stream --level debug --style compact
detox[94958] TRACE: [AsyncWebSocket.js/WEBSOCKET_SEND] {"type":"reactNativeReload","params":{},"messageId":-1000}
detox[94958] TRACE: [DetoxServer.js/MESSAGE] role=tester action=reactNativeReload (sessionId=3f310b0f-bbc3-fe73-3087-353b3c551fe3)
detox[94958] DEBUG: [DetoxServer.js/CANNOT_FORWARD] role=app not connected, cannot fw action (sessionId=3f310b0f-bbc3-fe73-3087-353b3c551fe3)
detox[94958] TRACE: [exec.js/EXEC_SUCCESS, #4]
detox[94958] DEBUG: [exec.js/EXEC_SUCCESS, #4] au.com.up.money.integration terminated
detox[94958] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onTerminateApp({
  deviceId: '46AF1CE8-0373-49B4-BB26-78E90B96CB5D',
  bundleId: 'au.com.up.money.integration'
})
detox[94958] DEBUG: [exec.js/EXEC_CMD, #6] applesimutils --byId 46AF1CE8-0373-49B4-BB26-78E90B96CB5D --bundle au.com.up.money.integration --restartSB --setPermissions location=always,notifications=YES
detox[94958] DEBUG: [exec.js/EXEC_TRY, #6] Trying to set permissions...
detox[94958] TRACE: [exec.js/EXEC_SUCCESS, #6]
detox[94958] DEBUG: [exec.js/EXEC_SUCCESS, #6] Permissions are set
detox[94958] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onBeforeLaunchApp({
  bundleId: 'au.com.up.money.integration',
  deviceId: '46AF1CE8-0373-49B4-BB26-78E90B96CB5D',
  launchArgs: {
    detoxServer: 'ws://localhost:51374',
    detoxSessionId: '3f310b0f-bbc3-fe73-3087-353b3c551fe3',
    detoxURLBlacklistRegex: '\\("localhost:8081"\\)'
  }
})
detox[94958] TRACE: [Artifact.js/START] starting SimulatorLogRecording {
  udid: '46AF1CE8-0373-49B4-BB26-78E90B96CB5D',
  bundleId: 'au.com.up.money.integration'
}
detox[94958] TRACE: [Artifact.js/STOP] stopping SimulatorLogRecording
detox[94958] DEBUG: [exec.js/KILL] sending SIGINT to [pid = 95063]: /usr/bin/xcrun simctl spawn 46AF1CE8-0373-49B4-BB26-78E90B96CB5D log stream --level debug --style compact
detox[94958] TRACE: [exec.js/SPAWN_END, #5] /usr/bin/xcrun simctl spawn 46AF1CE8-0373-49B4-BB26-78E90B96CB5D log stream --level debug --style compact finished with code = 0
detox[94958] DEBUG: [exec.js/EXEC_CMD, #7] /usr/bin/xcrun simctl get_app_container 46AF1CE8-0373-49B4-BB26-78E90B96CB5D au.com.up.money.integration
detox[94958] TRACE: [exec.js/EXEC_SUCCESS, #7] /Users/david/Library/Developer/CoreSimulator/Devices/46AF1CE8-0373-49B4-BB26-78E90B96CB5D/data/Containers/Bundle/Application/6AA6FDE4-C9E2-4572-AD36-774A922C5038/test.app

detox[94958] DEBUG: [exec.js/SPAWN_CMD, #8] [pid=95116] /usr/bin/xcrun simctl spawn 46AF1CE8-0373-49B4-BB26-78E90B96CB5D log stream --level debug --style compact --predicate "processImagePath beginsWith \"/Users/david/Library/Developer/CoreSimulator/Devices/46AF1CE8-0373-49B4-BB26-78E90B96CB5D/data/Containers/Bundle/Application/6AA6FDE4-C9E2-4572-AD36-774A922C5038/test.app\""
detox[94958] DEBUG: [exec.js/EXEC_CMD, #9] SIMCTL_CHILD_DYLD_INSERT_LIBRARIES="/Users/david/Library/Detox/ios/8819bfbbc5e7840cd22a0609009bcfaefd64e1a2/Detox.framework/Detox" /usr/bin/xcrun simctl launch 46AF1CE8-0373-49B4-BB26-78E90B96CB5D au.com.up.money.integration --args -detoxServer ws://localhost:51374 -detoxSessionId 3f310b0f-bbc3-fe73-3087-353b3c551fe3 -detoxURLBlacklistRegex '\("localhost:8081"\)'
detox[94958] DEBUG: [exec.js/EXEC_TRY, #9] Launching au.com.up.money.integration...
detox[94958] TRACE: [exec.js/EXEC_SUCCESS, #9] au.com.up.money.integration: 95210

detox[94958] DEBUG: [exec.js/EXEC_CMD, #10] /usr/bin/xcrun simctl get_app_container 46AF1CE8-0373-49B4-BB26-78E90B96CB5D au.com.up.money.integration
detox[94958] TRACE: [exec.js/EXEC_SUCCESS, #10] /Users/david/Library/Developer/CoreSimulator/Devices/46AF1CE8-0373-49B4-BB26-78E90B96CB5D/data/Containers/Bundle/Application/6AA6FDE4-C9E2-4572-AD36-774A922C5038/test.app

detox[94958] INFO:  [AppleSimUtils.js] au.com.up.money.integration launched. To watch simulator logs, run:
        /usr/bin/xcrun simctl spawn 46AF1CE8-0373-49B4-BB26-78E90B96CB5D log stream --level debug --style compact --predicate 'process == "Up"'
detox[95210] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onLaunchApp({
  bundleId: 'au.com.up.money.integration',
  deviceId: '46AF1CE8-0373-49B4-BB26-78E90B96CB5D',
  launchArgs: {
    detoxServer: 'ws://localhost:51374',
    detoxSessionId: '3f310b0f-bbc3-fe73-3087-353b3c551fe3',
    detoxURLBlacklistRegex: '\\("localhost:8081"\\)'
  },
  pid: 95210
})
detox[94958] TRACE: [AsyncWebSocket.js/WEBSOCKET_SEND] {"type":"isReady","params":{},"messageId":-1000}
detox[94958] TRACE: [DetoxServer.js/MESSAGE] role=tester action=isReady (sessionId=3f310b0f-bbc3-fe73-3087-353b3c551fe3)
detox[94958] DEBUG: [DetoxServer.js/CANNOT_FORWARD] role=app not connected, cannot fw action (sessionId=3f310b0f-bbc3-fe73-3087-353b3c551fe3)
detox[94958] DEBUG: [DetoxServer.js/LOGIN] role=app, sessionId=3f310b0f-bbc3-fe73-3087-353b3c551fe3
detox[94958] DEBUG: [DetoxServer.js/LOGIN_SUCCESS] role=app, sessionId=3f310b0f-bbc3-fe73-3087-353b3c551fe3
detox[94958] TRACE: [AsyncWebSocket.js/WEBSOCKET_SEND] {"type":"currentStatus","params":{},"messageId":1}
detox[94958] TRACE: [DetoxServer.js/MESSAGE] role=tester action=currentStatus (sessionId=3f310b0f-bbc3-fe73-3087-353b3c551fe3)
detox[94958] TRACE: [DetoxServer.js/MESSAGE] role=app action=currentStatusResult (sessionId=3f310b0f-bbc3-fe73-3087-353b3c551fe3)
detox[94958] TRACE: [AsyncWebSocket.js/WEBSOCKET_MESSAGE] {"messageId":1,"type":"currentStatusResult","params":{"status":"The system is busy with the following tasks:\n\nDelayed Perform Selector\n⏱ 1 pending selector\n\nDispatch Queue\n⏱ Queue: “Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)” with 24 work items\n\nRun Loop\n⏱ “Main Run Loop”\n\nOne-time Events\n⏱ “React Native (bundle load)”\n⏱ “Network Request” with object: “URL: “https://api2.branch.io/v1/install””\n\nTimer\n⏱ Fire date: 2021-01-22 10:06:46 +1100 (fire interval: 0.9999979734420776) repeats: NO repeat interval: 0>\n⏱ Fire date: 2021-01-22 10:06:46 +1100 (fire interval: 1.499992966651917) repeats: NO repeat interval: 0>","messageId":1}}

detox[94958] INFO:  [actions.js] The system is busy with the following tasks:

Delayed Perform Selector
⏱ 1 pending selector

Dispatch Queue
⏱ Queue: “Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)” with 24 work items

Run Loop
⏱ “Main Run Loop”

One-time Events
⏱ “React Native (bundle load)”
⏱ “Network Request” with object: “URL: “https://api2.branch.io/v1/install””

Timer
⏱ Fire date: 2021-01-22 10:06:46 +1100 (fire interval: 0.9999979734420776) repeats: NO repeat interval: 0>
⏱ Fire date: 2021-01-22 10:06:46 +1100 (fire interval: 1.499992966651917) repeats: NO repeat interval: 0>
detox[94958] TRACE: [AsyncWebSocket.js/WEBSOCKET_SEND] {"type":"currentStatus","params":{},"messageId":2}
detox[94958] TRACE: [DetoxServer.js/MESSAGE] role=tester action=currentStatus (sessionId=3f310b0f-bbc3-fe73-3087-353b3c551fe3)
detox[94958] TRACE: [DetoxServer.js/MESSAGE] role=app action=currentStatusResult (sessionId=3f310b0f-bbc3-fe73-3087-353b3c551fe3)
detox[94958] TRACE: [AsyncWebSocket.js/WEBSOCKET_MESSAGE] {"params":{"messageId":2,"status":"The system is busy with the following tasks:\n\nDispatch Queue\n⏱ Queue: “Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)” with 1 work item\n\nRun Loop\n⏱ “Main Run Loop”\n\nOne-time Events\n⏱ “React Native (bundle load)”"},"messageId":2,"type":"currentStatusResult"}

detox[94958] INFO:  [actions.js] The system is busy with the following tasks:

Dispatch Queue
⏱ Queue: “Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)” with 1 work item

Run Loop
⏱ “Main Run Loop”

One-time Events
⏱ “React Native (bundle load)”
detox[94958] TRACE: [AsyncWebSocket.js/WEBSOCKET_SEND] {"type":"currentStatus","params":{},"messageId":3}
detox[94958] TRACE: [DetoxServer.js/MESSAGE] role=tester action=currentStatus (sessionId=3f310b0f-bbc3-fe73-3087-353b3c551fe3)
detox[94958] TRACE: [DetoxServer.js/MESSAGE] role=app action=currentStatusResult (sessionId=3f310b0f-bbc3-fe73-3087-353b3c551fe3)
detox[94958] TRACE: [AsyncWebSocket.js/WEBSOCKET_MESSAGE] {"params":{"messageId":3,"status":"The system is busy with the following tasks:\n\nDispatch Queue\n⏱ Queue: “Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)” with 1 work item\n\nRun Loop\n⏱ “Main Run Loop”\n\nOne-time Events\n⏱ “React Native (bundle load)”"},"messageId":3,"type":"currentStatusResult"}

detox[94958] INFO:  [actions.js] The system is busy with the following tasks:

Dispatch Queue
⏱ Queue: “Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)” with 1 work item

Run Loop
⏱ “Main Run Loop”

One-time Events
⏱ “React Native (bundle load)”

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 8
  • Comments: 48 (13 by maintainers)

Most upvoted comments

EDIT2: It seems like issue with TrustKit config. Setting the TSKSwizzleNetworkDelegates to false in app plist seems to solve the issue.

I can confirm that this change solves the issue for our app as well.

it’s still relevant

I want to put my two cents: the issue of

App has not responded to the network requests below:
  (id = -1000) isReady: {}

might occur if someone forgot to finalize the Android configuration according to Introduction.Android. I’m aware the thread is about iOS but maybe it’ll help someone who’s facing this or similar problem.

@deecewan Do you have Firebase/Google stuff in your project? Recently it was shown to have bugs.

LOL, I highly appreciate the offer, but if anything, @alon-ha would be address for this. In any case, it’s not quite needed! Wix takes good care of us in that sense 🍻

We have run into the similar issue with our production app. Disabling Flipper having no effect. I have been trying to reproduce the issue adding only bunch of dependencies into a clean project, but so far no luck. What I found out and may help to locate the issue:

  1. The issue only appears when using detox 18.x, on v17.14.9 it works well.
  2. The debug iOS build is hanging on the bundle load step (as described in the initial post).
  3. When we try to run the release iOS build, it goes past the initial loading, but hangs when performing some specific server call from a redux-saga using axios. (figured out by trying without that call). Strangely, some axios calls finish successfully before. The app doesn’t hang completely, the buttons in UI are still working when pressed manually, but the app doesn’t get pass the hanging operation. It looks like if the redux-saga would get cancelled. The detox test fails almost immediately by not passing a testing expect call. (so like if synchronization would be completed)
  4. Every time the same hang is 100% reproducible, so not random at all. Always happening at the same stage of the app.
  5. Running the exact same build manually works without issues.

So it seems strangely that the issue is not connected with any particular library, but more with the architecture of the app. Our app is using many libraries. All hangs I’ve seen so far are coming from a redux-saga custom code. When we workaround one hang, it hangs later in the flow on something else. Sometimes not even directly on a server call, but when trying to wait for the server response using a redux-saga take effect. I’ll try to spend more time investigating where it’s coming from, and hopefully create some minimal example. Unfortunately so far we only run into this issue with our production code, so cannot share.

EDIT: After hours of investigating and removing one lib at a time (very tedious job), I’ve found the culprit: react-native-cert-pinner. When removed from the project, tests work again. Are you using the same (or similar) in your project @deecewan ? And does someone know some better alternative? The lib is not maintained anymore (for 2 years). Thank you

EDIT2: It seems like issue with TrustKit config. Setting the TSKSwizzleNetworkDelegates to false in app plist seems to solve the issue.

@erheron I don’t think your issue is related to this one. If you have timeouts in Detox, it means it’s something busy in your app. Follow the sync debug guide and you will find out what is causing that.

The issue here is that RN doesn’t load the bundle.

@LeoNatan just checked - we don’t have Flipper enabled either. The code doesn’t seem to exist in AppDelegate.swift. I can add in a bunch of logging in the AppDelegate#application function and see if/when it is failing there.

I cannot post a zip of our application, but I will try and produce a MWE.

Hey I’ve added this to the backlog, I hope we could handle it soon 🙏🏻

Guys, I am unable to reproduce this. As requested before, please create an empty project that reproduces this issue with the latest Detox, so I can investigate. Thanks