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

Crash after upgrading to 0.49 & CxxBridge #342

Closed
almostintuitive opened this issue Oct 17, 2017 · 4 comments
Closed

Crash after upgrading to 0.49 & CxxBridge #342

almostintuitive opened this issue Oct 17, 2017 · 4 comments

Comments

@almostintuitive
Copy link

Description

Detox causes the app to crash after upgrading to react-native 0.49 & to use CxxBridge.

Steps to Reproduce

  1. have a working react-native 0.48.4. project that runs perfectly with detox (using Cocoapods)
  2. upgrade to react-native 0.49, use CxxBridge in your Podfile
  3. run detox build & detox test

The app is crashing when detox tries to start it (attached stacktrace below), but it's completely fine if I manually open it in the simulator.

Node, Device, Xcode and macOS Versions

Environment:
OS: macOS High Sierra 10.13
Node: 8.7.0
Yarn: 1.2.1
npm: 5.4.2
Watchman: 4.9.0
Xcode: Xcode 9.0 Build version 9A235
Android Studio: 2.3 AI-162.4069837

Packages: (wanted => installed)
react: 16.0.0-beta.5 => 16.0.0-beta.5
react-native: 0.49.3 => 0.49.3

Stack trace:
2017-10-17 13:19:51.356 Drops[66168:6870808] Crash handler setup started.
2017-10-17 13:19:51.356 Drops[66168:6870808] Crash handler setup completed.
2017-10-17 13:19:51.356 Drops[66168:6870808] Enabling accessibility for automation on Simulator.
2017-10-17 13:19:51.972 Drops[66168:6870808] ☣️ DETOX:: Detox Action Sent: login
2017-10-17 13:19:52.183 Drops[66168:6870808] ☣️ DETOX:: Detox Action Received: loginSuccess
2017-10-17 13:19:52.191 Drops[66168:6870808] You've implemented -[ application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist.
2017-10-17 13:19:52.213 Drops[66168:6870808] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.AccessibilityManagerQueue>
libc++abi.dylib: terminating with unexpected exception of type std::__1::bad_function_call: std::exception
Signal caught: Abort trap: 6
0 EarlGrey 0x0000000123d43cc9 grey_signalHandler + 249
1 libsystem_platform.dylib 0x000000010cc18f5a _sigtramp + 26
2 ??? 0x0000ffff00001fa0 0x0 + 281470681751456
3 libsystem_c.dylib 0x000000010c8b2107 abort + 127
4 libc++abi.dylib 0x000000010ad1a91f __cxa_bad_cast + 0
5 libc++abi.dylib 0x000000010ad1aaa3 _ZL25default_terminate_handlerv + 241
6 libobjc.A.dylib 0x000000010a0671c6 _ZL15_objc_terminatev + 105
7 libc++abi.dylib 0x000000010ad36159 _ZSt11__terminatePFvvE + 8
8 libc++abi.dylib 0x000000010ad361d3 _ZSt9terminatev + 51
9 libc++abi.dylib 0x000000010ad36124 _ZSt12__unexpectedPFvvE + 6
10 libc++abi.dylib 0x000000010ad36967 __cxa_call_unexpected + 137
11 Drops 0x0000000102bb4df6 _ZN8facebook5react11JSCExecutor16initOnJSVMThreadEv + 766
12 Drops 0x0000000102bb49a7 _ZN8facebook5react11JSCExecutorC2ENSt3__110shared_ptrINS0_16ExecutorDelegateEEENS3_INS0_18MessageQueueThreadEEERKN5folly7dynamicE + 267
13 Drops 0x0000000102bb4e47 _ZN8facebook5react11JSCExecutorC1ENSt3__110shared_ptrINS0_16ExecutorDelegateEEENS3_INS0_18MessageQueueThreadEEERKN5folly7dynamicE + 9
14 Drops 0x0000000102bb483e _ZN8facebook5react18JSCExecutorFactory16createJSExecutorENSt3__110shared_ptrINS0_16ExecutorDelegateEEENS3_INS0_18MessageQueueThreadEEE + 126
15 Drops 0x0000000102bc0049 _ZN8facebook5react16NativeToJsBridgeC2EPNS0_17JSExecutorFactoryENSt3__110shared_ptrINS0_14ModuleRegistryEEENS5_INS0_18MessageQueueThreadEEENS5_INS0_16InstanceCallbackEEE + 185
16 Drops 0x0000000102bb46b6 _ZNSt3__110__function6__funcIZN8facebook5react8Instance16initializeBridgeENS_10unique_ptrINS3_16InstanceCallbackENS_14default_deleteIS6_EEEENS_10shared_ptrINS3_17JSExecutorFactoryEEENSA_INS3_18MessageQueueThreadEEENSA_INS3_14ModuleRegistryEEEE3$_0NS_9allocatorISH_EEFvvEEclEv + 146
17 Drops 0x0000000102beac6c _ZN8facebook5react17tryAndReturnErrorERKNSt3__18functionIFvvEEE + 15
18 Drops 0x0000000102c0b6fe _ZN8facebook5react16RCTMessageThread7tryFuncERKNSt3__18functionIFvvEEE + 18
19 Drops 0x0000000102c0b8b7 _ZN8facebook5react16RCTMessageThread14runOnQueueSyncEONSt3__18functionIFvvEEE + 143
20 Drops 0x0000000102bb3d13 _ZN8facebook5react8Instance16initializeBridgeENSt3__110unique_ptrINS0_16InstanceCallbackENS2_14default_deleteIS4_EEEENS2_10shared_ptrINS0_17JSExecutorFactoryEEENS8_INS0_18MessageQueueThreadEEENS8_INS0_14ModuleRegistryEEE + 253
21 Drops 0x0000000102be1eba -[RCTCxxBridge _initializeBridge:] + 433
22 Drops 0x0000000102be0af6 __21-[RCTCxxBridge start]_block_invoke.150 + 72
23 Drops 0x0000000102beac6c _ZN8facebook5react17tryAndReturnErrorERKNSt3__18functionIFvvEEE + 15
24 Drops 0x0000000102bdfac8 -[RCTCxxBridge _tryAndHandleError:] + 86
25 Foundation 0x0000000108f19948 __NSThreadPerformPerform + 334
26 CoreFoundation 0x000000010b0b32b1 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
27 CoreFoundation 0x000000010b152d31 __CFRunLoopDoSource0 + 81
28 CoreFoundation 0x000000010b097c19 __CFRunLoopDoSources0 + 185
29 CoreFoundation 0x000000010b0971ff __CFRunLoopRun + 1279
30 CoreFoundation 0x000000010b096a89 CFRunLoopRunSpecific + 409
31 Drops 0x0000000102bdfa1e +[RCTCxxBridge runRunLoop] + 277
32 Foundation 0x0000000108ee18ac NSThread__start + 1197
33 libsystem_pthread.dylib 0x000000010cc2a6c1 _pthread_body + 340
34 libsystem_pthread.dylib 0x000000010cc2a56d _pthread_body + 0
35 libsystem_pthread.dylib 0x000000010cc29c5d thread_start + 13

@almostintuitive almostintuitive changed the title Detox cras Crash after upgrading to 0.49 & CxxBridge Oct 17, 2017
@almostintuitive
Copy link
Author

I'm currently trying to reproduce this issue while using BatchedBridge, which was deprecated in 0.49.

@almostintuitive
Copy link
Author

almostintuitive commented Oct 17, 2017

Confirmed, it's only happening with using CxxBridge, which is mandatory (at least there's a deprecation warning when using 0.49 or newer).
I can run the app with detox when using RCTBatchedBridge.

Is anyone using detox with Rn 0.49 (+ CxxBridge) successfully?

@LeoNatan
Copy link
Contributor

Please use the search functionality so you can avoid opening duplicate issues. #279

Please add your details there, such as what Detox version you are using.

@LeoNatan
Copy link
Contributor

LeoNatan commented Oct 18, 2017

Our own running of the latest Detox with RN 0.49 seems to work (CC @rotemmiz ). Bear in mind, we don’t use CocoaPods. Maybe you have made some strange combination. For instance, CxxBridge has been the default in a while on installs using npm but it seems it’s not the case with CocoaPods?

@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

2 participants