Detox: Detox incompatibility with Firebase SDK

When I run detox test, my app is installed and launched but immediately exits, moving to the home screen. The bundling process then starts and if I open up the app, it does work fine, but the tests are not run.

THIS PROBLEM DOES NOT HAPPEN WITH react-native run-ios

I have the basic detox configuration as bellow:

"detox": {
    "configurations": {
      "ios.sim.debug": {
        "binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/myapp.app",
        "build": "xcodebuild -project ios/myapp.xcodeproj -scheme myapp -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build",
        "type": "ios.simulator",
        "name": "iPhone 7"
      }
    }
  }

The stdout and stderr logs have the following content:

objc[15328]: Class PLBuildVersion is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices (0x1196a7cc0) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices (0x1194be6f0). One of the two will be used. Which one is undefined.
2017-09-10 12:53:01.406 myapp[15328:496906] Crash handler setup started.
2017-09-10 12:53:01.406 myapp[15328:496906] Crash handler setup completed.
2017-09-10 12:53:01.406 myapp[15328:496906] Enabling accessibility for automation on Simulator.
2017-09-10 12:53:01.675 myapp[15328] <Notice> [Firebase/Analytics][I-ACS023007] Firebase Analytics v.40003000 started
2017-09-10 12:53:01.676 myapp[15328] <Notice> [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/RfcP7r)
2017-09-10 12:53:01.683 myapp[15328] <Notice> [Firebase/Messaging][I-FCM001000] FIRMessaging Remote Notifications proxy enabled, will swizzle remote notification receiver handlers. Add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO
2017-09-10 12:53:01.695 [info][tid:main][RCTBatchedBridge.m:77] Initializing <RCTBatchedBridge: 0x6180001ba320> (parent: <RCTBridge: 0x6100002c3cd0>, executor: RCTJSCExecutor)
2017-09-10 12:53:01.714 myapp[15328:496906] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.JSCExecutorQueue[0x6000000e6800]>
2017-09-10 12:53:01.720 [warn][tid:com.facebook.react.JavaScript][RCTModuleData.mm:220] RCTBridge required dispatch_sync to load RCTDevSettings. This may lead to deadlocks
2017-09-10 12:53:01.735 myapp[15328:496906] ☣️ DETOX:: Detox Action Sent: login
2017-09-10 12:53:01.815 myapp[15328:496906] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.SourceCodeQueue[0x6180000e7b00]>
2017-09-10 12:53:01.816 myapp[15328:496906] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.AccessibilityManagerQueue[0x6000000e4e80]>
2017-09-10 12:53:01.816 myapp[15328:496906] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.DevLoadingViewQueue[0x6180000e7d00]>
2017-09-10 12:53:01.817 myapp[15328:496906] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.PlatformConstantsQueue[0x6080000f0200]>
2017-09-10 12:53:01.817 myapp[15328:496906] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.I18nManagerQueue[0x6080000f0180]>
2017-09-10 12:53:01.822 myapp[15328:496906] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.SettingsManagerQueue[0x6080000f0280]>
2017-09-10 12:53:01.822 myapp[15328:496906] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.SplashScreenQueue[0x6100000e3480]>
2017-09-10 12:53:01.823 myapp[15328:496906] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.CodePushQueue[0x6100000e3400]>
2017-09-10 12:53:01.826 myapp[15328:496906] ☣️ DETOX:: Detox Action Received: loginSuccess
Signal caught: Segmentation fault: 11
0   EarlGrey                            0x0000000120ea3009 grey_signalHandler + 249
1   libsystem_platform.dylib            0x00000001146ceb3a _sigtramp + 26
2   CoreFoundation                      0x000000010fe8fe41 _CFRuntimeCreateInstance + 529
3   Detox                               0x000000010e453cbb __29+[DetoxAppDelegateProxy load]_block_invoke + 331
4   myapp                   0x000000010dec3e3f +[FIRAAppDelegateProxy createSubclassWithObject:] + 1617
5   myapp                   0x000000010dec36c2 +[FIRAAppDelegateProxy proxyOriginalDelegate:] + 82
6   myapp                   0x000000010df07242 __38+[FIRAnalytics createAppDelegateProxy]_block_invoke + 103
7   libdispatch.dylib                   0x000000011434c792 _dispatch_client_callout + 8
8   libdispatch.dylib                   0x0000000114337a8d dispatch_once_f + 69
9   EarlGrey                            0x0000000120ea02b4 __60-[GREYDispatchQueueTracker grey_dispatchAsyncCallWithBlock:]_block_invoke + 36
10  libdispatch.dylib                   0x000000011432b585 _dispatch_call_block_and_release + 12
11  libdispatch.dylib                   0x000000011434c792 _dispatch_client_callout + 8
12  libdispatch.dylib                   0x0000000114334247 _dispatch_main_queue_callback_4CF + 1041
13  CoreFoundation                      0x000000010ff43909 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
14  CoreFoundation                      0x000000010ff09ae4 __CFRunLoopRun + 2164
15  CoreFoundation                      0x000000010ff09016 CFRunLoopRunSpecific + 406
16  GraphicsServices                    0x0000000115b5ea24 GSEventRunModal + 62
17  UIKit                               0x00000001128a4134 UIApplicationMain + 159
18  myapp                   0x000000010dd0b87f main + 111
19  libdyld.dylib                       0x000000011439565d start + 1

The error says to Add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO and I did so, but the problem persists

I’m using react-native 0.44.0 node v7.8.0

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 4
  • Comments: 42 (23 by maintainers)

Commits related to this issue

Most upvoted comments

I think I found the issue, or at least an issue that could solve this. Will push a fix for this in a few. @rotemmiz Do you plan a release soon?

Fixed. Will be integrated in the next version.

Any progress on this?

I’ll look at this issue today. Hopefully, I can solve it.

@maggialejandro your issue is discussed here