Repository: wix/Detox

Issue #279: std::__1::bad_function_call (crash when using RN >= 0.48)
Created: 2017-09-15T13:59:40Z
Detox stopped working after upgrading to react-native 0.48.3
Description
detox test --configuration ios.sim.debug                     
    node_modules/.bin/mocha specs/e2e --opts specs/e2e/mocha.opts --configuration ios.sim.debug  
    [...]

App starts then App crash.
<HANGS for 12000 secs>
2017-09-15 09:50:51.764 myApp[90013:21708181] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.AccessibilityManagerQueue[0x6080000e6a80]>
2017-09-15 09:50:51.765 [info][tid:main][RCTRootView.m:301] Running application MyApp ({
    initialProps =     {
    };
    rootTag = 1;
})
libc++abi.dylib: terminating with unexpected exception of type std::__1::bad_function_call
Signal caught: Abort trap: 6
0   EarlGrey                            0x000000011d382009 grey_signalHandler + 249
1   libsystem_platform.dylib            0x00000001115f3b3a _sigtramp + 26
2   libsystem_pthread.dylib             0x00000001116112c8 _pthread_keys + 9720
3   libsystem_c.dylib                   0x000000011136288f abort + 127
4   libc++abi.dylib                     0x0000000111141ce5 __cxa_bad_cast + 0
5   libc++abi.dylib                     0x000000011115ccbd _ZL26default_unexpected_handlerv + 0
6   libobjc.A.dylib                     0x000000010ed013cf _ZL15_objc_terminatev + 114
7   libc++abi.dylib                     0x0000000111159f29 _ZSt11__terminatePFvvE + 8
8   libc++abi.dylib                     0x0000000111159fa3 _ZSt9terminatev + 51
9   libc++abi.dylib                     0x0000000111159ef4 _ZSt12__unexpectedPFvvE + 6
10  libc++abi.dylib                     0x000000011115a90f __cxa_call_unexpected + 137
11  myApp                               0x00000001088fe110 _ZN8facebook5react11JSCExecutor16initOnJSVMThreadEv + 1872

Node, Device, Xcode and macOS Versions

Node:    8.5.0
Device:  iPhone 6 sim iOS 10.3
Xcode:   8.3.3
macOS: 10.12.6

"react": "^16.0.0-rc.2",
"react-dom": "^16.0.0-rc.2",
"react-native": "0.48.3",
"detox": "^5.6.2",

Duplicate issue #328: Application crashes during the startup
Created: 2017-10-10T14:31:47Z
Description
Application crashes during the startup. Seems that cpp bridge fails to start:
017-10-10 16:23:23.028 Werkspot[81280:7840049] Crash handler setup started.
2017-10-10 16:23:23.029 Werkspot[81280:7840049] Crash handler setup completed.
2017-10-10 16:23:23.029 Werkspot[81280:7840049] Enabling accessibility for automation on Simulator.
2017-10-10 16:23:23.611 Werkspot[81280:7840049] ☣️ DETOX:: Detox Action Sent: login
2017-10-10 16:23:23.810 Werkspot[81280:7840049] ☣️ DETOX:: Detox Action Received: loginSuccess
2017-10-10 16:23:23.864 [info][tid:main][RCTCxxBridge.mm:187] Initializing <RCTCxxBridge: 0x6040001b36a0> (parent: <RCTBridge: 0x6040000ac540>, executor: (null))
2017-10-10 16:23:23.893 [warn][tid:main][RCTBridge.m:114] Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-10 16:23:23.919 Werkspot[81280:7840049] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.AccessibilityManagerQueue>
2017-10-10 16:23:23.921 [info][tid:main][RCTRootView.m:301] Running application Werkspot ({
    initialProps =     {
    };
    rootTag = 1;
})
libc++abi.dylib: terminating with unexpected exception of type std::__1::bad_function_call: std::exception
Signal caught: Abort trap: 6
0   EarlGrey                            0x0000000116c01c79 grey_signalHandler + 249
1   libsystem_platform.dylib            0x000000010b700b3a _sigtramp + 26
2   ???                                 0x0000ffff00001fa0 0x0 + 281470681751456
3   libsystem_c.dylib                   0x000000010b39e107 abort + 127
4   libc++abi.dylib                     0x000000010b13891f __cxa_bad_cast + 0
5   libc++abi.dylib                     0x000000010b138aa3 _ZL25default_terminate_handlerv + 241
6   libobjc.A.dylib                     0x000000010544c1c6 _ZL15_objc_terminatev + 105
7   libc++abi.dylib                     0x000000010b154159 _ZSt11__terminatePFvvE + 8
8   libc++abi.dylib                     0x000000010b1541d3 _ZSt9terminatev + 51
9   libc++abi.dylib                     0x000000010b154124 _ZSt12__unexpectedPFvvE + 6
10  libc++abi.dylib                     0x000000010b154967 __cxa_call_unexpected + 137
2017-10-10 16:23:23.933 Werkspot[81280:7840049] [HockeySDK] -[BITCrashManager initWithAppIdentifier:appEnvironment:hockeyAppClient:]/252 [HockeySDK] WARNING: HockeySDKResources.bundle is missing, will send reports automatically!
2017-10-10 16:23:23.934 Werkspot[81280:7840049] [HockeySDK] -[BITUpdateManager init]/486 [HockeySDK] WARNING: HockeySDKResources.bundle is missing, make sure it is added!
11  Werkspot                            0x00000001047116b4 _ZN8facebook5react11JSCExecutor16initOnJSVMThreadEv + 1876
12  Werkspot                            0x0000000104710cc1 _ZN8facebook5react11JSCExecutorC2ENSt3__110shared_ptrINS0_16ExecutorDelegateEEENS3_INS0_18MessageQueueThreadEEERKN5folly7dynamicE + 1025
13  Werkspot                            0x000000010471192d _ZN8facebook5react11JSCExecutorC1ENSt3__110shared_ptrINS0_16ExecutorDelegateEEENS3_INS0_18MessageQueueThreadEEERKN5folly7dynamicE + 29
14  Werkspot                            0x0000000104710458 _ZN8facebook5react18JSCExecutorFactory16createJSExecutorENSt3__110shared_ptrINS0_16ExecutorDelegateEEENS3_INS0_18MessageQueueThreadEEE + 440
15  Werkspot                            0x0000000104728134 _ZN8facebook5react16NativeToJsBridgeC2EPNS0_17JSExecutorFactoryENSt3__110shared_ptrINS0_14ModuleRegistryEEENS5_INS0_18MessageQueueThreadEEENS5_INS0_16InstanceCallbackEEE + 580
16  Werkspot                            0x000000010472825d _ZN8facebook5react16NativeToJsBridgeC1EPNS0_17JSExecutorFactoryENSt3__110shared_ptrINS0_14ModuleRegistryEEENS5_INS0_18MessageQueueThreadEEENS5_INS0_16InstanceCallbackEEE + 29
17  Werkspot                            0x0000000104727a6c _ZZN8facebook5react8Instance16initializeBridgeENSt3__110unique_ptrINS0_16InstanceCallbackENS2_14default_deleteIS4_EEEENS2_10shared_ptrINS0_17JSExecutorFactoryEEENS8_INS0_18MessageQueueThreadEEENS8_INS0_14ModuleRegistryEEEEN3$_0clEv + 636
18  Werkspot                            0x00000001047277dd _ZNSt3__128__invoke_void_return_wrapperIvE6__callIJRZN8facebook5react8Instance16initializeBridgeENS_10unique_ptrINS4_16InstanceCallbackENS_14default_deleteIS7_EEEENS_10shared_ptrINS4_17JSExecutorFactoryEEENSB_INS4_18MessageQueueThreadEEENSB_INS4_14ModuleRegistryEEEE3$_0EEEvDpOT_ + 45
19  Werkspot                            0x0000000104727509 _ZNSt3__110__function6__funcIZN8facebook5react8Instance16initializeBridgeENS_10unique_ptrINS3_16InstanceCallbackENS_14default_deleteIS6_EEEENS_10shared_ptrINS3_17JSExecutorFactoryEEENSA_INS3_18MessageQueueThreadEEENSA_INS3_14ModuleRegistryEEEE3$_0NS_9allocatorISH_EEFvvEEclEv + 41
20  Werkspot                            0x00000001045ca22b _ZNKSt3__18functionIFvvEEclEv + 123
21  Werkspot                            0x00000001045c9f18 _ZN8facebook5react17tryAndReturnErrorERKNSt3__18functionIFvvEEE + 24
22  Werkspot                            0x00000001045b8761 _ZN8facebook5react16RCTMessageThread7tryFuncERKNSt3__18functionIFvvEEE + 33
23  Werkspot                            0x00000001045be3cf _ZZN8facebook5react16RCTMessageThread14runOnQueueSyncEONSt3__18functionIFvvEEEENK3$_2clEv + 175
24  Werkspot                            0x00000001045be30d _ZNSt3__128__invoke_void_return_wrapperIvE6__callIJRZN8facebook5react16RCTMessageThread14runOnQueueSyncEONS_8functionIFvvEEEE3$_2EEEvDpOT_ + 45
25  Werkspot                            0x00000001045be0c9 _ZNSt3__110__function6__funcIZN8facebook5react16RCTMessageThread14runOnQueueSyncEONS_8functionIFvvEEEE3$_2NS_9allocatorIS9_EES6_EclEv + 41
2017-10-10 16:23:23.941 Werkspot[81280:7840049] [HockeySDK] -[BITStoreUpdateManager init]/131 [HockeySDK] WARNING: HockeySDKResources.bundle is missing, built in UI is deactivated!
26  Werkspot                            0x00000001045ca22b _ZNKSt3__18functionIFvvEEclEv + 123
27  Werkspot                            0x00000001045b85cb _ZN8facebook5react16RCTMessageThread7runSyncENSt3__18functionIFvvEEE + 91
28  Werkspot                            0x00000001045b8b0b _ZN8facebook5react16RCTMessageThread14runOnQueueSyncEONSt3__18functionIFvvEEE + 315
29  Werkspot                            0x000000010472107e _ZN8facebook5react8Instance16initializeBridgeENSt3__110unique_ptrINS0_16InstanceCallbackENS2_14default_deleteIS4_EEEENS2_10shared_ptrINS0_17JSExecutorFactoryEEENS8_INS0_18MessageQueueThreadEEENS8_INS0_14ModuleRegistryEEE + 1182
30  Werkspot                            0x000000010455a07f -[RCTCxxBridge _initializeBridge:] + 3423
31  Werkspot                            0x0000000104557229 __21-[RCTCxxBridge start]_block_invoke.172 + 153
32  Werkspot                            0x000000010457306c _ZNSt3__128__invoke_void_return_wrapperIvE6__callIJRU8__strongU13block_pointerFvvEEEEvDpOT_ + 60
33  Werkspot                            0x0000000104572ea9 _ZNSt3__110__function6__funcIU8__strongU13block_pointerFvvENS_9allocatorIS4_EES2_EclEv + 41
34  Werkspot                            0x00000001045ca22b _ZNKSt3__18functionIFvvEEclEv + 123
35  Werkspot                            0x00000001045c9f18 _ZN8facebook5react17tryAndReturnErrorERKNSt3__18functionIFvvEEE + 24
36  Werkspot                            0x0000000104554870 -[RCTCxxBridge _tryAndHandleError:] + 80
37  Foundation                          0x0000000104e8d948 __NSThreadPerformPerform + 334
38  CoreFoundation                      0x00000001067bc2b1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
39  CoreFoundation                      0x000000010685bd31 __CFRunLoopDoSource0 + 81
40  CoreFoundation                      0x00000001067a0c19 __CFRunLoopDoSources0 + 185
41  CoreFoundation                      0x00000001067a01ff __CFRunLoopRun + 1279
42  CoreFoundation                      0x000000010679fa89 CFRunLoopRunSpecific + 409
43  Werkspot                            0x00000001045545db +[RCTCxxBridge runRunLoop] + 1035
44  Foundation                          0x0000000104e558ac __NSThread__start__ + 1197
45  libsystem_pthread.dylib             0x000000010b71293b _pthread_body + 180
46  libsystem_pthread.dylib             0x000000010b712887 _pthread_body + 0
47  libsystem_pthread.dylib             0x000000010b71208d thread_start + 13

Steps to Reproduce

react-native@0.48
detox 5.8.1
mocha 4.0.1
add configuration from getting started to package.json, replace "example" by app name
run detox test

Node, Device, Xcode and macOS Versions

Node: 8.1.3
Device: iPhone 7, iOS 11
Xcode: 9.0
macOS: 10.12.6

Closing comment (2017-10-10T14:37:02Z): This is tracked in #279.