After installing the package, the app crash on startup
xcode shows the following error:
libc++abi.dylib: terminating with uncaught exception of type NSException
my pod file is ass follows:
# Uncomment the next line to define a global platform for your project
platform :ios, '8.0'
target 'AppName' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for AppName
target 'AppNameTests' do
inherit! :search_paths
# Pods for testing
end
pod 'Firebase/Core'
pod 'RNFirebase', :path => '../node_modules/react-native-firebase'
pod 'Firebase/AdMob'
pod 'Firebase/Analytics'
pod 'Firebase/Auth'
pod 'Firebase/Crash'
pod 'Firebase/Database'
pod 'Firebase/DynamicLinks'
pod 'Firebase/Messaging'
pod 'Firebase/RemoteConfig'
pod 'Firebase/Storage'
pod "Yoga", :path => "../node_modules/react-native/ReactCommon/yoga"
pod 'React', :path => '../node_modules/react-native', :subspecs => [
#'BatchedBridge', # Required For React Native 0.45.0+
'Core',
# Add any other subspecs you want to use in your project
]
end
got it working, https://github.com/invertase/react-native-firebase/issues/247
looks like iOS pasting the file into the directory doesn't automatically add the file to the iOS project. You need to manually add it (which I only know how to do within XCode) by:
What plist
file did your import @barjas?
@simplenotezy Probably the GoogleService-Info.plist
I am getting the same error, did you solve it?
where could i fined GoogleService-Info.plist
@simplenotezy where can i find GoogleService-Info.plist file.
this is the error i am getting when try to run the app on device
2018-01-24 17:24:26.585 WS1.com[285:334004] * Assertion failure in -RCTBatchedBridge loadSource:, /Users/ws1/Code/mobile/node_modules/react-native/React/Base/RCTBatchedBridge.m:192
2018-01-24 17:24:26.592 WS1.com[285:334004] Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'bundleURL must be non-nil when not implementing loadSourceForBridge'
** First throw call stack:
(0x2531391b 0x24aaee17 0x253137f1 0x25af7583 0x161a85 0x16057f 0x1602e1 0x194ccd 0x194bc9 0x193fa1 0x193e11 0x1112d5 0xc8663 0x29903785 0x29b2b2d1 0x29b2f285 0x29b4383d 0x29b2c7b3 0x269b6c07 0x269b6ab9 0x269b6db9 0x252d5dff 0x252d59ed 0x252d3d5b 0x25223229 0x25223015 0x298fcc3d 0x298f7189 0xc8bc7 0x24ecb873)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
@abuammar /ios/your-app/GoogleService-Info.plist
have u guys found a solution to this problem ?
@gomezfe yes you need to add the file with xcode so it correctly links the file.
I'm getting this error. I've confirmed that GoogleServices-Info.plist
is added to the project (visible under "Link Binary with Libraries"). This is all xcode is telling me:
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Here's my podfile:
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'AppName' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for AppName
pod 'Fabric'
pod 'Crashlytics'
# Add new pods below this line
pod 'RNDeviceInfo', :path => '../node_modules/react-native-device-info'
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
pod 'Firebase'
pod 'Firebase/Core'
pod 'Firebase/Messaging'
pod 'React', :path => '../node_modules/react-native', :subspecs =>
[
'Core',
'RCTNetwork',
'DevSupport'
]
pod 'RNBackgroundGeolocation', :path => '../node_modules/react-native-background-geolocation-android'
pod 'RNBackgroundFetch', :path => '../node_modules/react-native-background-fetch'
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
target 'AppNameTests' do
inherit! :search_paths
# Pods for testing
end
end
And AppDelegate.m
:
#import "AppDelegate.h"
#import <Firebase.h>
#import "RNFirebaseNotifications.h"
#import "RNFirebaseMessaging.h"
#import <Fabric/Fabric.h>
#import <Crashlytics/Crashlytics.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[FIRApp configure];
[RNFirebaseNotifications configure];
NSURL *jsCodeLocation;
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
moduleName:@"AppName"
initialProperties:nil
launchOptions:launchOptions];
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
UIViewController *rootViewController = [UIViewController new];
rootViewController.view = rootView;
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
[Fabric with:@[[Crashlytics class]]];
return YES;
}
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification {
[[RNFirebaseNotifications instance] didReceiveLocalNotification:notification];
}
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(nonnull NSDictionary *)userInfo
fetchCompletionHandler:(nonnull void (^)(UIBackgroundFetchResult))completionHandler{
[[RNFirebaseNotifications instance] didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];
}
- (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings {
[[RNFirebaseMessaging instance] didRegisterUserNotificationSettings:notificationSettings];
}
@end
Hi
I am also facing the iOS crash issue.
My error log:
2018-09-14 16:43:20.806438+0530 LTJ Shopping[19023:184001] -[__NSArrayM fmToArray]: unrecognized selector sent to instance 0x604000456bf0
2018-09-14 16:43:20.878536+0530 LTJ Shopping[19023:184001] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayM fmToArray]: unrecognized selector sent to instance 0x604000456bf0'
* First throw call stack:
(
0 CoreFoundation 0x000000010e25212b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010d25ff41 objc_exception_throw + 48
2 CoreFoundation 0x000000010e2d3024 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x000000010e1d4f78 ___forwarding___ + 1432
4 CoreFoundation 0x000000010e1d4958 _CF_forwarding_prep_0 + 120
5 LTJ Shopping 0x0000000105dbc64b +[FMIceLinkAsn1Sequence parseContents:] + 269
6 LTJ Shopping 0x0000000105db7e4b +[FMIceLinkAsn1Any parseBytesInternalWithBytes:offset:byteCount:] + 547
7 LTJ Shopping 0x0000000105db7b52 +[FMIceLinkAsn1Any parseBuffer:offset:byteCount:] + 101
8 LTJ Shopping 0x0000000105db7ae7 +[FMIceLinkAsn1Any parseBuffer:] + 41
9 LTJ Shopping 0x0000000105ee8431 +[FMIceLinkRsaKey parseBuffer:] + 45
10 LTJ Shopping 0x0000000105e93a99 +[FMIceLinkLicense load] + 139
11 libobjc.A.dylib 0x000000010d26169b call_load_methods + 695
12 libobjc.A.dylib 0x000000010d2622f3 load_images + 70
13 ??? 0x0000000107799dac 0x0 + 4420378028
14 ??? 0x00000001077a66c5 0x0 + 4420429509
15 ??? 0x00000001077a5898 0x0 + 4420425880
16 ??? 0x00000001077a592c 0x0 + 4420426028
17 ??? 0x000000010779a17b 0x0 + 4420379003
18 ??? 0x000000010779dc98 0x0 + 4420394136
19 ??? 0x00000001077993d4 0x0 + 4420375508
20 ??? 0x000000010ef14510 0x0 + 4545660176
21 ??? 0x000000010ef12a39 0x0 + 4545653305
22 ??? 0x000000010ef0e249 0x0 + 4545634889
23 ??? 0x000000010ef0e036 0x0 + 4545634358
24 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
I too am getting this error. The plist file is present and linked. The error only began occurring after after upgrading to the latest 5.1.1 version.
Even more confusing, the Xcode terminal provides ZERO additional information. The more verbose react-native log-ios
maybe gives a teeny hint:
<Error>: assertion failed: 17C88 15F79: libxpc.dylib + 71445 [C070AA3B-6F2B-3D85-887C-5A00FAE39163]:0x7d
<Error>:
<Notice>: DEPRECATED USE in libdispatch client: Setting timer interval to 0 requests a 1ns timer, did you mean FOREVER (a one-shot timer)?
My Podfile looks like so:
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'OllieApp' do
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'Core',
'RCTText',
'RCTImage',
'RCTNetwork',
'RCTSettings',
'DevSupport',
'RCTAnimation',
'RCTWebSocket', # needed for localhost testing of your app
'CxxBridge',
# Add any other subspecs you want to use in your project
]
pod "yoga", :path => "../node_modules/react-native/ReactCommon/yoga"
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'Firebase/Core', '~> 5.11.0'
pod 'Firebase/Auth', '~> 5.11.0'
pod 'Firebase/Firestore', '~> 5.11.0'
pod 'Firebase/Storage', '~> 5.11.0'
pod 'react-native-splash-screen', :path => '../node_modules/react-native-splash-screen'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == "React"
target.remove_from_project
end
end
end
If I revert my Podfile to use 5.6.0 and my package.json to use 5.0.0 version of this package, everything works great as expected.
I am also getting this error. @scottmas is correct. I bumped my versions down and it fixed the issue. My googleservices.plist was definitely added to the project correctly and added to the target.
I was using
react-native-firebase 5.1.1
Firebase/Core 5.7.0
This would cause my iPhone device (real iPhone 8+) and my simulator to both crash with the error libc++abi.dylib: terminating with uncaught exception, and no other information or stack trace.
I tried many things to fix this but nothing worked. When I bumped down to react-native-firebase 5.0.0 and Firebase/Core 5.6.0 it all started working!
I have now added back in Firebase/Firestore, and Firebase/Auth, and it's still working.
Same error here. Bumped down to Firebase/Core 5.6.0 as suggested above. react-native-firebase is still version 5.1.1.
Works now.
Per the comments on the other thread, I tried upgrading to Firebase 5.14.0 in my Podfile, but I got a new error this time (with RN Firebase 5.1.1.):
Module AppRegistry is not a registered callable module (calling runApplication)
The error goes away after reverting back to RN Firebase 5.0.0 and Firebase 5.6.0 in my Podfile.
It would be helpful if someone could create an Exception Breakpoint
in Xcode; in Debug
-> Breakpoints
. The debugger should then hopefully stop on the line of code where the actual problem is located. A screenshot of this would be helpful.
Thanks
Screenshot from the error with Firebase 5.11.0 (e.g libc++abi.dylib: terminating with uncaught exception):
@scottmas interesting, looks like Analytics inside Firebase/Core potentially the issue, what does your Podfile.lock look like, specifically bits that mention Core / Analytics?
The relevant parts only of my Podfile.lock:
PODS:
- boost-for-react-native (1.63.0)
- BoringSSL-GRPC (0.0.2):
- BoringSSL-GRPC/Implementation (= 0.0.2)
- BoringSSL-GRPC/Interface (= 0.0.2)
- BoringSSL-GRPC/Implementation (0.0.2):
- BoringSSL-GRPC/Interface (= 0.0.2)
- BoringSSL-GRPC/Interface (0.0.2)
- DoubleConversion (1.1.6)
- Firebase/Auth (5.11.0):
- Firebase/CoreOnly
- FirebaseAuth (= 5.0.4)
- Firebase/Core (5.11.0):
- Firebase/CoreOnly
- FirebaseAnalytics (= 5.3.0)
- Firebase/CoreOnly (5.11.0):
- FirebaseCore (= 5.1.6)
- Firebase/Firestore (5.11.0):
- Firebase/CoreOnly
- FirebaseFirestore (= 0.13.6)
- Firebase/Storage (5.11.0):
- Firebase/CoreOnly
- FirebaseStorage (= 3.0.2)
- FirebaseAnalytics (5.3.0):
- FirebaseCore (~> 5.1)
- FirebaseInstanceID (~> 3.3)
- GoogleAppMeasurement (~> 5.3)
- GoogleUtilities/AppDelegateSwizzler (~> 5.2)
- GoogleUtilities/MethodSwizzler (~> 5.2)
- GoogleUtilities/Network (~> 5.2)
- "GoogleUtilities/NSData+zlib (~> 5.2)"
- nanopb (~> 0.3)
- FirebaseAuth (5.0.4):
- FirebaseAuthInterop (~> 1.0)
- FirebaseCore (~> 5.0)
- GoogleUtilities/Environment (~> 5.2)
- GTMSessionFetcher/Core (~> 1.1)
- FirebaseAuthInterop (1.0.0)
- FirebaseCore (5.1.6):
- GoogleUtilities/Logger (~> 5.2)
- FirebaseFirestore (0.13.6):
- FirebaseAuthInterop (~> 1.0)
- FirebaseCore (~> 5.1)
- FirebaseFirestore/abseil-cpp (= 0.13.6)
- "gRPC-C++ (~> 0.0.3)"
- gRPC-ProtoRPC (~> 1.0)
- leveldb-library (~> 1.20)
- nanopb (~> 0.3.8)
- Protobuf (~> 3.1)
- FirebaseFirestore/abseil-cpp (0.13.6):
- FirebaseAuthInterop (~> 1.0)
- FirebaseCore (~> 5.1)
- "gRPC-C++ (~> 0.0.3)"
- gRPC-ProtoRPC (~> 1.0)
- leveldb-library (~> 1.20)
- nanopb (~> 0.3.8)
- Protobuf (~> 3.1)
- FirebaseInstanceID (3.3.0):
- FirebaseCore (~> 5.1)
- GoogleUtilities/Environment (~> 5.3)
- GoogleUtilities/UserDefaults (~> 5.3)
- FirebaseStorage (3.0.2):
- FirebaseAuthInterop (~> 1.0)
- FirebaseCore (~> 5.0)
- GTMSessionFetcher/Core (~> 1.1)
@scottmas can you try force FirebaseAnalytics (= 5.3.0)
to version 5.4.0 by adding it to your Podfile with that version, pod installing and seeing how you get on?
@Salakar I am also encountering the issue, however I cannot add a version other than FirebaseAnalytics 5.3
. Getting
CocoaPods could not find compatible versions for pod "FirebaseAnalytics":
In Podfile:
Firebase/Core (~> 5.11.0) was resolved to 5.11.0, which depends on
FirebaseAnalytics (= 5.3.0)
@Salakar updating to Firebase/Core 5.15.0
(which led to an update to FirebaseAnalytics 5.4.0) solved the issue for me. Is there any danger that Firebase Core and Messaging in 5.15.0 will cause issues with react-native-firebease?
I'm trying to update to Firebase/Core ~> 5.15.0
but I get:
Specs satisfying the
Firebase/Core (~> 5.15.0)
dependency were found, but they required a higher minimum deployment target.
I've tried platform :ios, '9.0'
as well as 10.0
, 11.0
and 12.0
Update: Not sure what was wrong but I've been able to successfully install 5.15.0. My configuration might have been in a bad state; I've been working on it all day. It's possible that all Firebase/---
modules needed to be at the same version, e.g.:
pod 'Firebase/Core', '~> 5.15.0'
pod 'Firebase/Messaging', '~> 5.15.0'
Hello 馃憢, this issue has been automatically marked as stale because it has not had activity for quite some time. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.
I was facing the [RNFirebaseNotifications configure]: unrecognized selector sent to class
issue on react-native-firebase 5.1.1 with Firebase SDK at 5.15.0. After upgrading react-native-firebase to 5.2.1 ~the issue was resolved~ is still there...
@Salakar Maybe close this issue thread as it is old and the title libc++abi.dylib: terminating with uncaught exception
describes a generic native app startup crash. This issue will just pool things together that should be separate issues.
~Anyone looking for a resolution, this is my crash free dependencies from pods and npm:~
yarn.lock
...
[email protected]:
version "5.2.1"
resolved "https://registry.yarnpkg.com/react-native-firebase/-/react-native-firebase-5.2.1.tgz#2904ccc80880930ea72fa152eae3c7f53a0d5e1c"
integrity sha512-fwr4P7Bm0c2bHSwYnSyKZNW9BxXLqswff0yS5Fl6hzIf7hbGD85m06qzD/6JAFpX3Jk8r4PGtYintWm26LiZ/Q==
dependencies:
opencollective-postinstall "^2.0.0"
prop-types "^15.6.2"
...
Podfile.lock
...
- Firebase/Core (5.15.0):
- Firebase/CoreOnly
- FirebaseAnalytics (= 5.4.0)
- Firebase/CoreOnly (5.15.0):
- FirebaseCore (= 5.1.10)
- Firebase/Messaging (5.15.0):
- Firebase/CoreOnly
- FirebaseMessaging (= 3.2.2)
- FirebaseAnalytics (5.4.0):
- FirebaseCore (~> 5.1)
- FirebaseInstanceID (~> 3.3)
- GoogleAppMeasurement (= 5.4.0)
- GoogleUtilities/AppDelegateSwizzler (~> 5.2)
- GoogleUtilities/MethodSwizzler (~> 5.2)
- GoogleUtilities/Network (~> 5.2)
- "GoogleUtilities/NSData+zlib (~> 5.2)"
- nanopb (~> 0.3)
- FirebaseAnalyticsInterop (1.1.0)
- FirebaseCore (5.1.10):
- GoogleUtilities/Logger (~> 5.2)
- FirebaseInstanceID (3.3.0):
- FirebaseCore (~> 5.1)
- GoogleUtilities/Environment (~> 5.3)
- GoogleUtilities/UserDefaults (~> 5.3)
- FirebaseMessaging (3.2.2):
- FirebaseAnalyticsInterop (~> 1.1)
- FirebaseCore (~> 5.1)
- FirebaseInstanceID (~> 3.0)
- GoogleUtilities/Environment (~> 5.2)
- GoogleUtilities/Reachability (~> 5.2)
- Protobuf (~> 3.1)
...
Hello 馃憢, this issue has been automatically marked as stale because it has not had activity for quite some time. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.
I am trying to use 5.20.0 and I get the same error but 5.15.0 works fine
Hello 馃憢, this issue has been automatically marked as stale because it has not had activity for quite some time. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.
Closing this issue after a prolonged period of inactivity. If this is still present in the latest release, please feel free to create a new issue with up-to-date information.
Open Xcode and open AppDelagate.m
import this
#import
add in starting of didFinishLaunchingWithOptions [FIRApp configure];
for example
@implementation AppDelegate
Most helpful comment
got it working, https://github.com/invertase/react-native-firebase/issues/247
looks like iOS pasting the file into the directory doesn't automatically add the file to the iOS project. You need to manually add it (which I only know how to do within XCode) by: