A new version out -- need to make the necessary adjustments, iOS and Android.
Need this fix for RN 0.63 Android https://github.com/wix/Detox/pull/2210
Second time our project cant update to the latest RN version because of Detox not supporting it :( Hope this can be picked up soon!
@Guuz This type of attitude is unacceptable. The project is open source, so feel free to contribute instead of complaining. You are also free to not use Detox and use another testing framework. Good luck with that. Final warning!
@LeoNatan My apologies. My words were not mean as forcing/offensive. But reading it back now i see how they look that way. I'm not a native english speaker, which also doesn't help. But this is no excuse, as my message wasn't very kind.
I just upgraded both:
react-native (0.62.2 -> 0.63.2)
detox (16.9.2 -> 17.3.1)
with a project where e2e tests ran successfully for both platforms.
EDIT: Upgrading just react-native:
After upgrading both react-native and detox:
@sseppola Do you have Detox Instruments installed by any chance?
@LeoNatan, no but I'd be happy to install it and have a look.
No, the reason I ask is I just fixed an issue for RN63 support, but that version is not out and causes issues with Detox.
I haven't looked yet at RN63 support in Detox. I assumed it worked. I will look soon.
Ok, let me know if I can help.
If you want to help me debug, you can follow https://github.com/wix/Detox/blob/master/docs/Guide.DebuggingInXcode.md and see what's going on when it's stuck.
I don't get the same problem as when I run my tests. With Detox.framework linked it throws an error before the app starts, but it's similar to my original problem as it's still stuck on the splash screen.
Here's a screenshot with the error location and the logs:

The last frame in the stacktrace is:
#0 0x0000000110247444 in facebook::jsc::JSCRuntime::createFunctionFromHostFunction(facebook::jsi::PropNameID const&, unsigned int, std::__1::function<facebook::jsi::Value (facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long)>)::HostFunctionMetadata::call(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSValue*, unsigned long, OpaqueJSValue const* const*, OpaqueJSValue const**) at /Users/sindreseppola/projects/hoopteller/node_modules/react-native/ReactCommon/jsi/JSCRuntime.cpp:1130
And having placed a breakpoint on the line that crashes, it crashes on the second run. I can only imaging causing an infinite loop if Detox catches and retries whatever causes this.
Thanks for investigating!
That's the error I fixed with Detox Instruments. You sure you don't have it installed?
I installed it after you mentioned it, but never integrated it into the app as you didn’t need me to.
Could it cause that issue without being integrated?
Detox discovers it by itself and uses it. :)
Uninstall it for now, until I release a new version. Thanks
Good call, that was exactly what was happening. I uninstalled it and was able to reproduce the infinite loop, however I don't get any logs, but I profiled it in Instruments:

I would be happy to send you the trace, just send me your email here or via PM on Twitter (I just followed you, same username as here on Github). At this point I don't know how I would find more info about what's going on here.
I think it’s better to just hit pause in Xcode when the app is stuck and post a screenshot of the backtrack (expanded to include the system frames), or by calling bt and pasting the output here.
Here's the output of running
bt in the debug console
objc_release
frame #1: 0x000000010d3719c4 HooptellerRCTDropReactPrefixes(s=@"RCTNativeAnimatedModule") at RCTUtils.m:967RCTBridgeModuleNameForClass(cls=RCTNativeAnimatedModule) at RCTBridge.m:96:10
frame #3: 0x000000010d283d38 Hoopteller-RCTCxxBridge moduleForClass: at RCTCxxBridge.mm:526:30-[WXAnimatedDisplayLinkIdlingResource isIdleNow](self=0x0000600002f8c0c0, _cmd="isIdleNow") at WXAnimatedDisplayLinkIdlingResource.m:52:22
frame #5: 0x00000001111d902f EarlGrey-GREYUIThreadExecutor grey_busyResourcesReturnEarly: at GREYUIThreadExecutor.m:325:14-[GREYUIThreadExecutor grey_areAllResourcesIdle](self=0x0000600002d9dc40, _cmd="grey_areAllResourcesIdle") at GREYUIThreadExecutor.m:277:11
frame #7: 0x00000001111d8747 EarlGrey__59-[GREYUIThreadExecutor executeSyncWithTimeout:block:error:]_block_invoke.95(.block_descriptor=0x000060000231d200) at GREYUIThreadExecutor.m:220:14__77-[GREYRunLoopSpinner grey_drainRunLoopInActiveModeAndCheckCondition:forTime:]_block_invoke(.block_descriptor=0x00006000038ebf80) at GREYRunLoopSpinner.m:137:9
frame #9: 0x000000011118e4a6 EarlGrey__89-[GREYRunLoopSpinner grey_setupObserverInMode:withBeforeSourcesBlock:beforeWaitingBlock:]_block_invoke(.block_descriptor=0x00006000038ebdc0, observer=0x0000600001c85900, activity=kCFRunLoopBeforeSources) at GREYRunLoopSpinner.m:258:13__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
frame #11: 0x00007fff23d9abde CoreFoundation__CFRunLoopDoObservers + 430__CFRunLoopRun + 946
frame #13: 0x00007fff23d9a944 CoreFoundationCFRunLoopRunSpecific + 404-[GREYRunLoopSpinner grey_drainRunLoopInActiveModeAndCheckCondition:forTime:](self=0x00006000023501b0, _cmd="grey_drainRunLoopInActiveModeAndCheckCondition:forTime:", stopConditionBlock=0x00000001111d8720, time=1.7976931348623157E+308) at GREYRunLoopSpinner.m:175:31
frame #15: 0x000000011118cc33 EarlGrey-GREYRunLoopSpinner spinWithStopConditionBlock: at GREYRunLoopSpinner.m:58:26-[GREYUIThreadExecutor executeSyncWithTimeout:block:error:](self=0x0000600002d9dc40, _cmd="executeSyncWithTimeout:block:error:", seconds=1.7976931348623157E+308, execBlock=0x00000001104420d0, error=0x0000000000000000) at GREYUIThreadExecutor.m:219:22
frame #17: 0x00000001111d7943 EarlGrey-GREYUIThreadExecutor executeSync:error: at GREYUIThreadExecutor.m:190:10__45-[EarlGreyImpl(.block_descriptor=0x000060000236fb70) detox_safeExecuteSync:]_block_invoke at EarlGrey+Detox.m:17:3
frame #19: 0x00007fff23da0b5c CoreFoundation__CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12__CFRunLoopDoBlocks + 195
frame #21: 0x00007fff23d9b5cb CoreFoundation__CFRunLoopRun + 2411CFRunLoopRunSpecific + 404
frame #23: 0x00007fff25939c71 Foundation-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 211-[NSRunLoop(NSRunLoop) runUntilDate:] + 72
frame #25: 0x000000010d7308c0 Hoopteller+RNSplashScreen show at RNSplashScreen.m:31:9-[AppDelegate application:didFinishLaunchingWithOptions:](self=0x0000600002d9f740, _cmd="application:didFinishLaunchingWithOptions:", application=0x00007fb10b106e70, launchOptions=0 key/value pairs) at AppDelegate.m:54:3
frame #27: 0x00000001104650ef Detox-DetoxAppDelegateProxy application:didFinishLaunchingWithOptions: at DetoxAppDelegateProxy.m:281:8-[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 232
frame #29: 0x00007fff48c84037 UIKitCore-[UIApplication _callInitializationDelegatesWithActions:forCanvas:payload:fromOriginatingProcess:] + 3985-[UIApplication _runWithMainScene:transitionContext:completion:] + 1226
frame #31: 0x00007fff4839225d UIKitCore-[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] + 122_UIScenePerformActionsWithLifecycleActionMask + 83
frame #33: 0x00007fff48392d6f UIKitCore__101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 198-[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 296
frame #35: 0x00007fff48392b9c UIKitCore-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 818-[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 345
frame #37: 0x00007fff48396a22 UIKitCore__186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke_2 + 178+[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] + 852
frame #39: 0x00007fff488bc41e UIKitCore_UISceneSettingsDiffActionPerformChangesWithTransitionContext + 240__186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 153
frame #41: 0x00007fff488bc321 UIKitCore_UISceneSettingsDiffActionPerformActionsWithDelayForTransitionContext + 84-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 381
frame #43: 0x00007fff481eafa8 UIKitCore__64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 657-[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 253
frame #45: 0x00007fff481eacd2 UIKitCore-[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 210-[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 512
frame #47: 0x00007fff487da8dc UIKitCore-[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 361-[FBSSceneImpl _callOutQueue_agent_didCreateWithTransitionContext:completion:] + 419
frame #49: 0x00007fff36cd2dc1 FrontBoardServices__86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke.154 + 102-[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 220
frame #51: 0x00007fff36cd2a52 FrontBoardServices__86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke + 355_dispatch_client_callout + 8
frame #53: 0x0000000111072da2 libdispatch.dylib_dispatch_block_invoke_direct + 300__FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30
frame #55: 0x00007fff36cf83d7 FrontBoardServices-[FBSSerialQueue _queue_performNextIfPossible] + 441-[FBSSerialQueue _performNextFromRunLoopSource] + 22
frame #57: 0x00007fff23da0d31 CoreFoundation__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17__CFRunLoopDoSource0 + 76
frame #59: 0x00007fff23da0434 CoreFoundation__CFRunLoopDoSources0 + 180__CFRunLoopRun + 974
frame #61: 0x00007fff23d9a944 CoreFoundationCFRunLoopRunSpecific + 404GSEventRunModal + 139
frame #63: 0x000000011045c21f Detox__detox_UIApplication_run(self=0x00007fb10b106e70, _cmd="_run") at ReactNativeSupport.m:143:9UIApplicationMain + 1605
frame #65: 0x000000010cbc4e60 Hooptellermain(argc=1, argv=0x00007ffee303ba78) at main.m:7:12start + 1
frame #67: 0x00007fff51a231fd libdyld.dylibstart + 1It looks like there is some infinite animation. Doubt this is Detox’ fault.
You're right! I commented out all my JS and imports without luck, so it had to be a native dependency. Eventually I created a demo project where I added dependencies one by one, and found that react-native-splash-screen was the problem.. looking back at the backtracks there were hints.
Thanks for your assistance @LeoNatan, hope this helps someone else.
Great, thanks for the investigation!
So without splash-screen Detox works for you on iOS with RN63?
Yes, [email protected] and [email protected] works on iOS after removing that dependency, and I never had an issue with Android.
Great!
17.3.3 out with RN 0.63 support
so is the fix here removing the splash screen module?
@genesy Consider opening an issue for that project so they can fix it.
I solved this on ios by conditionally excluding the splashscreen module during debug builds
I switched out react-native-spash-screen with react-native-bootsplash as the former doesn't seem to be actively maintained anymore.
I switched to [RNSplashScreen showSplash:@"LaunchScreen" inRootView:rootView]; after which react-native-spash-screen will no longer affect detox. See also https://github.com/crazycodeboy/react-native-splash-screen/issues/494#issuecomment-719513367
Most helpful comment
I switched out
react-native-spash-screenwithreact-native-bootsplashas the former doesn't seem to be actively maintained anymore.