Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

std::__1::bad_function_call (crash when using RN >= 0.48) #279

Closed
pdavid0 opened this issue Sep 15, 2017 · 80 comments
Closed

std::__1::bad_function_call (crash when using RN >= 0.48) #279

pdavid0 opened this issue Sep 15, 2017 · 80 comments

Comments

@pdavid0
Copy link

pdavid0 commented Sep 15, 2017

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",

@rotemmiz
Copy link
Member

@LeoNatan , @silyevsk can you help taking a look at this issue ?

@rotemmiz rotemmiz assigned LeoNatan and unassigned LeoNatan Sep 19, 2017
@LeoNatan
Copy link
Contributor

Does this reproduce consistently? If so, please add an exception breakpoint in Xcode and provide the backtrace of the exception. Thanks.

@pdavid0
Copy link
Author

pdavid0 commented Sep 19, 2017

Yes, every run this happens. I will post an update soon.

Thanks

@heuism
Copy link

heuism commented Sep 22, 2017

hey @pdavid0, can i ask if there anything new? Thanks

@pdavid0
Copy link
Author

pdavid0 commented Sep 22, 2017

Xcode 9 was released, now fbsimctl is not happy.

fbsimctl --json "iPhone 6" --first 1 --simulators list
{"event_type":"discrete","timestamp":1506096591,"subject":"Error Domain=com.facebook.FBControlCore Code=0 \"Attempting to load a file at path '\/Applications\/Xcode.app\/Contents\/Developer\/Library\/PrivateFrameworks\/CoreSimulator.framework', but it does not exist\" UserInfo={NSLocalizedDescription=Attempting to load a file at path '\/Applications\/Xcode.app\/Contents\/Developer\/Library\/PrivateFrameworks\/CoreSimulator.framework', but it does not exist}","event_name":"failure"}

An iPhone 6 sim is running with iOS 11.0

I updated to "detox": "^5.7.0", and detox-cli

@heuism
Copy link

heuism commented Sep 26, 2017

@pdavid0, you can download version 8.3.3 of Xcode using the web instead, and name the current 'Xcode.app' (which is 9 in the case) to for example 'Xcode_9.0.app' and the downloaded version be 'Xcode.app'. Then you can test normally. (This is just the workaround in my case). However, the issue of std::__1::bad_function_call is still not resolved for me. Hope this help you.

@xcarpentier
Copy link
Contributor

Is this issue fixed with last release 5.8.1?

@pdavid0
Copy link
Author

pdavid0 commented Sep 27, 2017

Will try tomorrow ! Thanks

@rotemmiz
Copy link
Member

Detox 5.8.1 does not rely on fbsimctl (for the most part... if you use device.setLocation() you would still need it). Issues related to fbsimctl are solved now.

@LeoNatan
Copy link
Contributor

5.8.1 has not yet been fixed to support 0.48.X issues. We’ll be investigating soon.

@heuism
Copy link

heuism commented Sep 28, 2017

@LeoNatan, can I ask how about .47? Thanks

@LeoNatan
Copy link
Contributor

I’m not familiar with any problems there. Try it and let me know.

@akuschqa
Copy link

akuschqa commented Oct 2, 2017

@LeoNatan
I have the same problem - Detox closes the app after launching and then waits for timeout of 12000ms and finishes with an error. Interesting that the app will work without any problems if you open it again manually during the timeout
Here is a part of logs:

2017-10-02 13:05:33.374 spacenation_reactnative[1455:78373] ☣️ DETOX:: Detox Action Received: loginSuccess
2017-10-02 13:05:33.439 [info][tid:main][RCTCxxBridge.mm:187] Initializing <RCTCxxBridge: 0x6080001aaaa0> (parent: <RCTBridge: 0x6000000a7e00>, executor: (null))
2017-10-02 13:05:33.458 [warn][tid:main][RCTBridge.m:114] Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?
libc++abi.dylib: terminating with unexpected exception of type std::__1::bad_function_call: std::exception
Signal caught: Abort trap: 6
0   EarlGrey                            0x0000000123896649 grey_signalHandler + 249
1   libsystem_platform.dylib            0x000000011425eb3a _sigtramp + 26
2   libsystem_pthread.dylib             0x000000011427c2c8 _pthread_keys + 9720

Node, Device, Xcode and macOS Versions

  • node v8.5.0
  • ios emulator - iPhone 7 iOS11
  • xcode 9
  • macOS 10.12.6

"react": "16.0.0-alpha.12",
"react-native": "0.48.3",
"detox": "^5.6.2"

@LeoNatan
Copy link
Contributor

LeoNatan commented Oct 2, 2017

It works again because when you launch the app using the icon, Detox is not injected in the app.

Sorry guys, I have not had time to look into this—working hard on DetoxInstruments. Hopefully, will have some time soon.

@ice-chillios
Copy link
Contributor

ice-chillios commented Oct 3, 2017

I have the same problem and error. App hangs on black screen or opened and immediately closed. Even if i've clicked on app and open it by my self detox hangs on first spec.

2017-10-03 21:11:00.728 projectName[8020:2569322] Crash handler setup started.
2017-10-03 21:11:00.728 projectName[8020:2569322] Crash handler setup completed.
2017-10-03 21:11:00.728 projectName[8020:2569322] Enabling accessibility for automation on Simulator.
2017-10-03 21:11:01.135 projectName[8020:2569322] ☣️ DETOX:: Detox Action Sent: login
2017-10-03 21:11:01.369 projectName[8020:2569322] ☣️ DETOX:: Detox Action Received: loginSuccess
2017-10-03 21:11:01.422 [info][tid:main][RCTCxxBridge.mm:187] Initializing <RCTCxxBridge: 0x60c0001b9a60> (parent: <RCTBridge: 0x6040000b9c20>, executor: (null))
2017-10-03 21:11:01.438 [warn][tid:main][RCTBridge.m:121] Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-03 21:11:01.455 [warn][tid:main][RCTModuleData.mm:69] Module A0Auth0 requires main queue setup since it overrides `constantsToExport` but doesn't implement `requiresMainQueueSetup. In a future release React Native will default to initializing all native modules on a background thread unless explicitly opted-out of.
2017-10-03 21:11:01.461 projectName[8020:2569322] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.AccessibilityManagerQueue>
2017-10-03 21:11:01.462 [info][tid:main][RCTRootView.m:301] Running application projectName ({
    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                            0x0000000126680b49 grey_signalHandler + 249
1   libsystem_platform.dylib            0x0000000114dedf5a _sigtramp + 26
2   libsystem_kernel.dylib              0x0000000114dad480 libsystem_kernel.dylib + 1152
3   libsystem_c.dylib                   0x0000000114a87107 abort + 127
4   libc++abi.dylib                     0x000000011482191f __cxa_bad_cast + 0
5   libc++abi.dylib                     0x0000000114821aa3 _ZL25default_terminate_handlerv + 241
6   libobjc.A.dylib                     0x000000010e97a1c6 _ZL15_objc_terminatev + 105
7   libc++abi.dylib                     0x000000011483d159 _ZSt11__terminatePFvvE + 8
8   libc++abi.dylib                     0x000000011483d1d3 _ZSt9terminatev + 51
9   libc++abi.dylib                     0x000000011483d124 _ZSt12__unexpectedPFvvE + 6
10  libc++abi.dylib                     0x000000011483d967 __cxa_call_unexpected + 137
11  projectName                    0x000000010ddb1b74 _ZN8facebook5react11JSCExecutor16initOnJSVMThreadEv + 1876
12  projectName                    0x000000010ddb1181 _ZN8facebook5react11JSCExecutorC2ENSt3__110shared_ptrINS0_16ExecutorDelegateEEENS3_INS0_18MessageQueueThreadEEERKN5folly7dynamicE + 1025
13  projectName                    0x000000010ddb1ded _ZN8facebook5react11JSCExecutorC1ENSt3__110shared_ptrINS0_16ExecutorDelegateEEENS3_INS0_18MessageQueueThreadEEERKN5folly7dynamicE + 29
14  projectName                    0x000000010ddb0918 _ZN8facebook5react18JSCExecutorFactory16createJSExecutorENSt3__110shared_ptrINS0_16ExecutorDelegateEEENS3_INS0_18MessageQueueThreadEEE + 440
15  projectName                    0x000000010ddc9174 _ZN8facebook5react16NativeToJsBridgeC2EPNS0_17JSExecutorFactoryENSt3__110shared_ptrINS0_14ModuleRegistryEEENS5_INS0_18MessageQueueThreadEEENS5_INS0_16InstanceCallbackEEE + 580
16  projectName                    0x000000010ddc929d _ZN8facebook5react16NativeToJsBridgeC1EPNS0_17JSExecutorFactoryENSt3__110shared_ptrINS0_14ModuleRegistryEEENS5_INS0_18MessageQueueThreadEEENS5_INS0_16InstanceCallbackEEE + 29
17  projectName                    0x000000010ddc8aac _ZZN8facebook5react8Instance16initializeBridgeENSt3__110unique_ptrINS0_16InstanceCallbackENS2_14default_deleteIS4_EEEENS2_10shared_ptrINS0_17JSExecutorFactoryEEENS8_INS0_18MessageQueueThreadEEENS8_INS0_14ModuleRegistryEEEEN3$_0clEv + 636
18  projectName                    0x000000010ddc881d _ZNSt3__128__invoke_void_return_wrapperIvE6__callIJRZN8facebook5react8Instance16initializeBridgeENS_10unique_ptrINS4_16InstanceCallbackENS_14default_deleteIS7_EEEENS_10shared_ptrINS4_17JSExecutorFactoryEEENSB_INS4_18MessageQueueThreadEEENSB_INS4_14ModuleRegistryEEEE3$_0EEEvDpOT_ + 45
19  projectName                    0x000000010ddc8549 _ZNSt3__110__function6__funcIZN8facebook5react8Instance16initializeBridgeENS_10unique_ptrINS3_16InstanceCallbackENS_14default_deleteIS6_EEEENS_10shared_ptrINS3_17JSExecutorFactoryEEENSA_INS3_18MessageQueueThreadEEENSA_INS3_14ModuleRegistryEEEE3$_0NS_9allocatorISH_EEFvvEEclEv + 41
20  projectName                    0x000000010dc5d7ab _ZNKSt3__18functionIFvvEEclEv + 123
21  projectName                    0x000000010dc5d498 _ZN8facebook5react17tryAndReturnErrorERKNSt3__18functionIFvvEEE + 24
22  projectName                    0x000000010dc4bce1 _ZN8facebook5react16RCTMessageThread7tryFuncERKNSt3__18functionIFvvEEE + 33
23  projectName                    0x000000010dc5194f _ZZN8facebook5react16RCTMessageThread14runOnQueueSyncEONSt3__18functionIFvvEEEENK3$_2clEv + 175
24  projectName                    0x000000010dc5188d _ZNSt3__128__invoke_void_return_wrapperIvE6__callIJRZN8facebook5react16RCTMessageThread14runOnQueueSyncEONS_8functionIFvvEEEE3$_2EEEvDpOT_ + 45
25  projectName                    0x000000010dc51649 _ZNSt3__110__function6__funcIZN8facebook5react16RCTMessageThread14runOnQueueSyncEONS_8functionIFvvEEEE3$_2NS_9allocatorIS9_EES6_EclEv + 41
26  projectName                    0x000000010dc5d7ab _ZNKSt3__18functionIFvvEEclEv + 123
27  projectName                    0x000000010dc4bb4b _ZN8facebook5react16RCTMessageThread7runSyncENSt3__18functionIFvvEEE + 91
28  projectName                    0x000000010dc4c08b _ZN8facebook5react16RCTMessageThread14runOnQueueSyncEONSt3__18functionIFvvEEE + 315
29  projectName                    0x000000010ddc207e _ZN8facebook5react8Instance16initializeBridgeENSt3__110unique_ptrINS0_16InstanceCallbackENS2_14default_deleteIS4_EEEENS2_10shared_ptrINS0_17JSExecutorFactoryEEENS8_INS0_18MessageQueueThreadEEENS8_INS0_14ModuleRegistryEEE + 1182
30  projectName                    0x000000010dbf47cf -[RCTCxxBridge _initializeBridge:] + 3423
31  projectName                    0x000000010dbf0f99 __21-[RCTCxxBridge start]_block_invoke.182 + 153
32  projectName                    0x000000010dc0debc _ZNSt3__128__invoke_void_return_wrapperIvE6__callIJRU8__strongU13block_pointerFvvEEEEvDpOT_ + 60
33  projectName                    0x000000010dc0dcf9 _ZNSt3__110__function6__funcIU8__strongU13block_pointerFvvENS_9allocatorIS4_EES2_EclEv + 41
34  projectName                    0x000000010dc5d7ab _ZNKSt3__18functionIFvvEEclEv + 123
35  projectName                    0x000000010dc5d498 _ZN8facebook5react17tryAndReturnErrorERKNSt3__18functionIFvvEEE + 24
36  projectName                    0x000000010dbee4e0 -[RCTCxxBridge _tryAndHandleError:] + 80
37  Foundation                          0x000000010e3bb948 __NSThreadPerformPerform + 334
38  CoreFoundation                      0x000000010fcea2b1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
39  CoreFoundation                      0x000000010fd89d31 __CFRunLoopDoSource0 + 81
40  CoreFoundation                      0x000000010fccec19 __CFRunLoopDoSources0 + 185
41  CoreFoundation                      0x000000010fcce1ff __CFRunLoopRun + 1279
42  CoreFoundation                      0x000000010fccda89 CFRunLoopRunSpecific + 409
43  projectName                    0x000000010dbee24b +[RCTCxxBridge runRunLoop] + 1035
44  Foundation                          0x000000010e3838ac __NSThread__start__ + 1197
45  libsystem_pthread.dylib             0x0000000114dff6c1 _pthread_body + 340
46  libsystem_pthread.dylib             0x0000000114dff56d _pthread_body + 0
47  libsystem_pthread.dylib             0x0000000114dfec5d thread_start + 13
  • node v8.5.0
  • ios emulator - iPhone 6 iOS11
  • Xcode 9
  • macOS 10.13
  • react 16.0.0
  • react-native 0.49.0
  • detox 5.8.1

@sonianin
Copy link

sonianin commented Oct 4, 2017

I've got the same error as well:

2017-10-04 14:10:46.407 AwesomeProject[82179:1638688] Crash handler setup completed.
2017-10-04 14:10:46.407 AwesomeProject[82179:1638688] Enabling accessibility for automation on Simulator.
2017-10-04 14:10:46.910 AwesomeProject[82179:1638688] ☣️ DETOX:: Detox Action Sent: login
2017-10-04 14:10:47.016 AwesomeProject[82179:1638688] ☣️ DETOX:: Detox Action Received: loginSuccess
2017-10-04 14:10:47.071 [info][tid:main][RCTCxxBridge.mm:187] Initializing <RCTCxxBridge: 0x6000001af6c0> (parent: <RCTBridge: 0x60c0000a4920>, executor: (null))
2017-10-04 14:10:47.095 [warn][tid:main][RCTBridge.m:114] Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-10-04 14:10:47.114 AwesomeProject[82179:1638688] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.AccessibilityManagerQueue>
2017-10-04 14:10:47.116 [info][tid:main][RCTRootView.m:301] Running application AwesomeProject ({
    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                            0x000000011e163689 grey_signalHandler + 249
1   libsystem_platform.dylib            0x0000000112a59b3a _sigtramp + 26
2   libsystem_pthread.dylib             0x0000000112a772c8 _pthread_keys + 9720
3   libsystem_c.dylib                   0x00000001126f7107 abort + 127
4   libc++abi.dylib                     0x00000001124a091f __cxa_bad_cast + 0
5   libc++abi.dylib                     0x00000001124a0aa3 _ZL25default_terminate_handlerv + 241
6   libobjc.A.dylib                     0x000000010c99e1c6 _ZL15_objc_terminatev + 105
7   libc++abi.dylib                     0x00000001124bc159 _ZSt11__terminatePFvvE + 8
8   libc++abi.dylib                     0x00000001124bc1d3 _ZSt9terminatev + 51
9   libc++abi.dylib                     0x00000001124bc124 _ZSt12__unexpectedPFvvE + 6
10  libc++abi.dylib                     0x00000001124bc967 __cxa_call_unexpected + 137
2017-10-04 14:10:47.126 AwesomeProject[82179:1638688] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.WebSocketModuleQueue>
2017-10-04 14:10:47.127 AwesomeProject[82179:1638688] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.SourceCodeQueue>
2017-10-04 14:10:47.127 AwesomeProject[82179:1638688] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.DevLoadingViewQueue>
2017-10-04 14:10:47.128 AwesomeProject[82179:1638688] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.PlatformConstantsQueue>
2017-10-04 14:10:47.128 AwesomeProject[82179:1638688] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.I18nManagerQueue>
2017-10-04 14:10:47.130 AwesomeProject[82179:1638688] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.SettingsManagerQueue>
11  AwesomeProject                      0x000000010bdee3f4 _ZN8facebook5react11JSCExecutor16initOnJSVMThreadEv + 1876
12  AwesomeProject                      0x000000010bdeda01 _ZN8facebook5react11JSCExecutorC2ENSt3__110shared_ptrINS0_16ExecutorDelegateEEENS3_INS0_18MessageQueueThreadEEERKN5folly7dynamicE + 1025
13  AwesomeProject                      0x000000010bdee66d _ZN8facebook5react11JSCExecutorC1ENSt3__110shared_ptrINS0_16ExecutorDelegateEEENS3_INS0_18MessageQueueThreadEEERKN5folly7dynamicE + 29
14  AwesomeProject                      0x000000010bded198 _ZN8facebook5react18JSCExecutorFactory16createJSExecutorENSt3__110shared_ptrINS0_16ExecutorDelegateEEENS3_INS0_18MessageQueueThreadEEE + 440
15  AwesomeProject                      0x000000010be04e74 _ZN8facebook5react16NativeToJsBridgeC2EPNS0_17JSExecutorFactoryENSt3__110shared_ptrINS0_14ModuleRegistryEEENS5_INS0_18MessageQueueThreadEEENS5_INS0_16InstanceCallbackEEE + 580
16  AwesomeProject                      0x000000010be04f9d _ZN8facebook5react16NativeToJsBridgeC1EPNS0_17JSExecutorFactoryENSt3__110shared_ptrINS0_14ModuleRegistryEEENS5_INS0_18MessageQueueThreadEEENS5_INS0_16InstanceCallbackEEE + 29
17  AwesomeProject                      0x000000010be047ac _ZZN8facebook5react8Instance16initializeBridgeENSt3__110unique_ptrINS0_16InstanceCallbackENS2_14default_deleteIS4_EEEENS2_10shared_ptrINS0_17JSExecutorFactoryEEENS8_INS0_18MessageQueueThreadEEENS8_INS0_14ModuleRegistryEEEEN3$_0clEv + 636
18  AwesomeProject                      0x000000010be0451d _ZNSt3__128__invoke_void_return_wrapperIvE6__callIJRZN8facebook5react8Instance16initializeBridgeENS_10unique_ptrINS4_16InstanceCallbackENS_14default_deleteIS7_EEEENS_10shared_ptrINS4_17JSExecutorFactoryEEENSB_INS4_18MessageQueueThreadEEENSB_INS4_14ModuleRegistryEEEE3$_0EEEvDpOT_ + 45
19  AwesomeProject                      0x000000010be04249 _ZNSt3__110__function6__funcIZN8facebook5react8Instance16initializeBridgeENS_10unique_ptrINS3_16InstanceCallbackENS_14default_deleteIS6_EEEENS_10shared_ptrINS3_17JSExecutorFactoryEEENSA_INS3_18MessageQueueThreadEEENSA_INS3_14ModuleRegistryEEEE3$_0NS_9allocatorISH_EEFvvEEclEv + 41
20  AwesomeProject                      0x000000010bca6f6b _ZNKSt3__18functionIFvvEEclEv + 123
21  AwesomeProject                      0x000000010bca6c58 _ZN8facebook5react17tryAndReturnErrorERKNSt3__18functionIFvvEEE + 24
22  AwesomeProject                      0x000000010bc954a1 _ZN8facebook5react16RCTMessageThread7tryFuncERKNSt3__18functionIFvvEEE + 33
23  AwesomeProject                      0x000000010bc9b10f _ZZN8facebook5react16RCTMessageThread14runOnQueueSyncEONSt3__18functionIFvvEEEENK3$_2clEv + 175
24  AwesomeProject                      0x000000010bc9b04d _ZNSt3__128__invoke_void_return_wrapperIvE6__callIJRZN8facebook5react16RCTMessageThread14runOnQueueSyncEONS_8functionIFvvEEEE3$_2EEEvDpOT_ + 45
25  AwesomeProject                      0x000000010bc9ae09 _ZNSt3__110__function6__funcIZN8facebook5react16RCTMessageThread14runOnQueueSyncEONS_8functionIFvvEEEE3$_2NS_9allocatorIS9_EES6_EclEv + 41
26  AwesomeProject                      0x000000010bca6f6b _ZNKSt3__18functionIFvvEEclEv + 123
27  AwesomeProject                      0x000000010bc9530b _ZN8facebook5react16RCTMessageThread7runSyncENSt3__18functionIFvvEEE + 91
28  AwesomeProject                      0x000000010bc9584b _ZN8facebook5react16RCTMessageThread14runOnQueueSyncEONSt3__18functionIFvvEEE + 315
29  AwesomeProject                      0x000000010bdfddbe _ZN8facebook5react8Instance16initializeBridgeENSt3__110unique_ptrINS0_16InstanceCallbackENS2_14default_deleteIS4_EEEENS2_10shared_ptrINS0_17JSExecutorFactoryEEENS8_INS0_18MessageQueueThreadEEENS8_INS0_14ModuleRegistryEEE + 1182
30  AwesomeProject                      0x000000010bc36dbf -[RCTCxxBridge _initializeBridge:] + 3423
31  AwesomeProject                      0x000000010bc33f69 __21-[RCTCxxBridge start]_block_invoke.172 + 153
32  AwesomeProject                      0x000000010bc4fdac _ZNSt3__128__invoke_void_return_wrapperIvE6__callIJRU8__strongU13block_pointerFvvEEEEvDpOT_ + 60
33  AwesomeProject                      0x000000010bc4fbe9 _ZNSt3__110__function6__funcIU8__strongU13block_pointerFvvENS_9allocatorIS4_EES2_EclEv + 41
34  AwesomeProject                      0x000000010bca6f6b _ZNKSt3__18functionIFvvEEclEv + 123
35  AwesomeProject                      0x000000010bca6c58 _ZN8facebook5react17tryAndReturnErrorERKNSt3__18functionIFvvEEE + 24
36  AwesomeProject                      0x000000010bc315b0 -[RCTCxxBridge _tryAndHandleError:] + 80
37  Foundation                          0x000000010c3df948 __NSThreadPerformPerform + 334
38  CoreFoundation                      0x000000010dd0e2b1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
39  CoreFoundation                      0x000000010ddadd31 __CFRunLoopDoSource0 + 81
40  CoreFoundation                      0x000000010dcf2c19 __CFRunLoopDoSources0 + 185
41  CoreFoundation                      0x000000010dcf21ff __CFRunLoopRun + 1279
42  CoreFoundation                      0x000000010dcf1a89 CFRunLoopRunSpecific + 409
43  AwesomeProject                      0x000000010bc3131b +[RCTCxxBridge runRunLoop] + 1035
44  Foundation                          0x000000010c3a78ac __NSThread__start__ + 1197
45  libsystem_pthread.dylib             0x0000000112a6b93b _pthread_body + 180
46  libsystem_pthread.dylib             0x0000000112a6b887 _pthread_body + 0
47  libsystem_pthread.dylib             0x0000000112a6b08d thread_start + 13

My package.json contains the following:

  • react: 16.0.0-alpha.12
  • react-native: 0.48.4
  • babel-jest: 21.0.2
  • babel-preset-react-native: 4.0.0
  • detox: 5.8.1
  • jest: 21.1.0
  • react-test-renderer: 16.0.0-alpha.12

@jliebrand
Copy link

jliebrand commented Oct 6, 2017

+1 getting the exact same error

  "dependencies": {
    "react": "16.0.0-beta.5",
    "react-native": "0.49.1"
  },
  "devDependencies": {
    "babel-jest": "21.2.0",
    "babel-polyfill": "^6.26.0",
    "babel-preset-react-native": "4.0.0",
    "detox": "^5.8.1",
    "eslint": "^4.8.0",
    "eslint-config-react-native": "^1.6.0",
    "jest": "21.2.1",
    "mocha": "^4.0.1",
    "react-test-renderer": "16.0.0-beta.5"
  },

using node v7.10.1

@jliebrand
Copy link

jliebrand commented Oct 6, 2017

In case it helps: tried both iOS 11.0 and 10.3, same results

@kubens
Copy link

kubens commented Oct 7, 2017

+1 Same here

 "dependencies": {
    "@types/react": "^16.0.7",
    "@types/react-native": "^0.48.9",
    "i18n-js": "^3.0.1",
    "react": "16.0.0",
    "react-native": "0.48.4"
  },
  "devDependencies": {
    "@types/jest": "^21.1.1",
    "@types/react-test-renderer": "^15.5.4",
    "babel-jest": "21.2.0",
    "babel-preset-react-native": "4.0.0",
    "detox": "^5.8.1",
    "jest": "21.2.1",
    "mocha": "^4.0.1",
    "react-test-renderer": "16.0.0",
    "rimraf": "^2.6.2",
    "ts-jest": "^21.0.1",
    "tslint": "^5.7.0",
    "tslint-react": "^3.2.0",
    "typescript": "^2.5.3"
  }

@rotemmiz
Copy link
Member

rotemmiz commented Oct 7, 2017

Guys, we’re in the process of adding a test suite for modern RN versions (48,49). There currently is no support for these versions on Detox iOS. There’s no more need for examples, I think we have enough of them.

Stay tuned...

@kacgrzes
Copy link

@rotemmiz sir, when can we expect this patch?

@rotemmiz
Copy link
Member

@kacgrzes , 5.8.2 is out

@heuism
Copy link

heuism commented Oct 13, 2017

@rotemmiz Is issue resolved? I tried with 5.8.0 and .48.1. But the app is still terminated. Thanks

@heuism
Copy link

heuism commented Oct 13, 2017

Btw, I am not to sure why or how. But just to test what is wrong with RN and Detox, I initialise a whole new simple app with react-native init. And the put the ID to the first screen ever. The app is still showing the message: 'terminated' but the app will still be running and thus the testing example is still executed.

detox info 16:49:40: server listening on localhost:57332...
detox info 1: Searching for device matching iPhone 7... 
detox info 3: Uninstalling org.reactjs.native.example.DetoxTestingApp... 
detox info 3: org.reactjs.native.example.DetoxTestingApp uninstalled 
detox info 4: Installing /Users/hientran/Desktop/React_Native/testDetox/DetoxTestingApp/ios/build/Build/Products/Debug-iphonesimulator/DetoxTestingApp.app... 
detox info 4: /Users/hientran/Desktop/React_Native/testDetox/DetoxTestingApp/ios/build/Build/Products/Debug-iphonesimulator/DetoxTestingApp.app installed 
detox info 5: Terminating org.reactjs.native.example.DetoxTestingApp... 
detox info 5: org.reactjs.native.example.DetoxTestingApp terminated 
detox info 6: Launching org.reactjs.native.example.DetoxTestingApp... 
detox info 6: org.reactjs.native.example.DetoxTestingApp launched. The stdout and stderr logs were recreated, you can watch them with:
        tail -F $HOME/Library/Developer/CoreSimulator/Devices/DD9F5E50-3786-421A-A1BF-B86D937162D7/data/tmp/detox.last_launch_app_log.{out,err} 
  Example
    ✓ should have welcome screen (697ms)


  1 passing (5s)

I attached the terminal log here. Hope this could help anything

@rotemmiz @LeoNatan

@kacgrzes
Copy link

kacgrzes commented Oct 13, 2017

@rotemmiz thank you! 🙇

@simonracz
Copy link
Contributor

We ran into this ourselves too on RN 0.47.1!!

We used latest detox, version 5.8.4.

I didn't spent much time on it yet, just wanted you to know.

Downgrading to detox 5.6.0 solves the issue. But, that was just a quick test.

@LeoNatan
Copy link
Contributor

Hmm something strange is going on. On latest RN (> 0.48), the new version works, but it may have gotten broken on older versions?

@compojoom
Copy link

as I posted in #270 - I get the same.
The strange thing is that people here are talking about RN 48, 49, but I'm on 47.0.2
XCode 9
Iphone 8 Simulator

@LeoNatan
Copy link
Contributor

There may have been a regression for older RN versions.

@LeoNatan
Copy link
Contributor

Upgrade your RN. I am not sure it is a priority for us to debug this. If anyone wants to help debug, that would be great.

@compojoom
Copy link

Okay. Will try it later today/tomorrow. Updating RN is 99% a pain in the .... :)

@alexcfaber
Copy link

What @simonracz said ;-) Will continue debugging with him today hopefully; so far I managed to create this;

RN 0.47.1 & Detox 5.6.0 -> Works with Xcode 8.3.2 -> DOESN’T work with Xcode 9.0.1
RN 0.47.1 & Detox 5.7.0 -> Works with Xcode 8.3.3 -> DOESN’T work with Xcode 8.3.2 && Xcode 9.0.1
RN 0.47.1 & Detox 5.8.4 -> DOESN’T work with Xcode 8.3.2 && Xcode 8.3.3 & Xcode 9.0.1

So for now we're stuck on Detox 5.6.0 in combination with Xcode 8.3.2 or 5.7.0 in combination with 8.3.3.

@LeoNatan
Copy link
Contributor

LeoNatan commented Oct 18, 2017

If you guys want to debug at the source level, drop me a line here and I will try to help.

@alexcfaber
Copy link

Ok, we just verified some extra versions.

Basically with Xcode 8.3.3 and RN 0.47.1 the following works too;

Detox@5.8.0
Detox@5.8.1
Detox@5.8.2
Detox@5.8.3

Currently pinpointing what difference between Detox@5.8.3 and Detox@5.8.4 could make the difference with @simonracz

@simonracz
Copy link
Contributor

It can be reproduced on a fresh new RN project with version 0.47.1.

Created via react-native init v47 --version react-native@0.47.1

It had dummy views and tests, like in react-native-demo.

It crashed the same way.

detox_err.txt

@simonracz
Copy link
Contributor

Update:

Fresh dummy project does NOT work with 0.47.1 and 0.48.0

However, it works with 0.49.0!

@LeoNatan
Copy link
Contributor

LeoNatan commented Nov 7, 2017

@simonracz @alexcfaber I have just pushed a proposed fix for 0.48. Could you please test? It’s not included in 5.9.3 release.

@simonracz
Copy link
Contributor

What a timing. I just started to work on this again. I’ll test it today.

@LeoNatan
Copy link
Contributor

LeoNatan commented Nov 7, 2017

The issue was very interesting. My attribute constructor function was causing +initialize to run before the C++ default constructor, which caused their default to override something.

@simonracz
Copy link
Contributor

👍

@LeoNatan @rotemmiz I didn't do an extensive testing, but it works where it consistently failed before. (RN v0.47.2)

@simonracz
Copy link
Contributor

CI failed though in relaunchApp.

@LeoNatan
Copy link
Contributor

LeoNatan commented Nov 7, 2017

Hmm. Why would that fail? Are you also seeing it? Could be Travis flakiness.

@simonracz
Copy link
Contributor

simonracz commented Nov 7, 2017

It passed for me locally.

@simonracz
Copy link
Contributor

It failed again in CI, on XCode8.

I built/ran the local tests with XCode9.

@LeoNatan
Copy link
Contributor

LeoNatan commented Nov 7, 2017

Yes we saw. Not sure why yet.

@LeoNatan
Copy link
Contributor

Found the issue. It’s a slight difference of how runloops run in iOS 10 and iOS 11.
I am looking for an alternative solution.

@LeoNatan
Copy link
Contributor

Fixed. @rotemmiz Could you please release a new version? 😙

@wix wix locked and limited conversation to collaborators Jul 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests