🔥 Version mismatch causing app termination
Issue
After upgrading from 4.3.7 to 5.0.0, I'm receiving the below version mismatch error on iOS when the app launches. My Podfile was also updated to the latest versions and is shared below.
*** Terminating app due to uncaught exception 'FIRAnalyticsVersionMismatch', reason: 'Google Analytics for Firebase version (50200000) does not match with Google App Measurement (50300000) version. Please update.'
Project Files
iOS
ios/Podfile:
- [ ] I'm not using Pods
- [x] I'm using Pods and my Podfile looks like:
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'MyApp' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for MyApp
pod 'Firebase/Core', '~> 5.9.0'
pod 'Firebase/Messaging', '~> 5.9.0'
end
ios/Podfile.lock - To share lib versions:
PODS:
- Firebase/Core (5.9.0):
- Firebase/CoreOnly
- FirebaseAnalytics (= 5.2.0)
- Firebase/CoreOnly (5.9.0):
- FirebaseCore (= 5.1.4)
- Firebase/Messaging (5.9.0):
- Firebase/CoreOnly
- FirebaseMessaging (= 3.1.2)
- FirebaseAnalytics (5.2.0):
- FirebaseCore (~> 5.1)
- FirebaseInstanceID (~> 3.2)
- GoogleAppMeasurement (~> 5.2)
- GoogleUtilities/AppDelegateSwizzler (~> 5.2)
- GoogleUtilities/MethodSwizzler (~> 5.2)
- GoogleUtilities/Network (~> 5.2)
- "GoogleUtilities/NSData+zlib (~> 5.2)"
- nanopb (~> 0.3)
- FirebaseCore (5.1.4):
- GoogleUtilities/Logger (~> 5.2)
- FirebaseInstanceID (3.3.0):
- FirebaseCore (~> 5.1)
- GoogleUtilities/Environment (~> 5.3)
- GoogleUtilities/UserDefaults (~> 5.3)
- FirebaseMessaging (3.1.2):
- FirebaseCore (~> 5.0)
- FirebaseInstanceID (~> 3.0)
- GoogleUtilities/Reachability (~> 5.2)
- Protobuf (~> 3.1)
- GoogleAppMeasurement (5.3.0):
- GoogleUtilities/AppDelegateSwizzler (~> 5.2)
- GoogleUtilities/MethodSwizzler (~> 5.2)
- GoogleUtilities/Network (~> 5.2)
- "GoogleUtilities/NSData+zlib (~> 5.2)"
- nanopb (~> 0.3)
- GoogleUtilities/AppDelegateSwizzler (5.3.4):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
- GoogleUtilities/Network
- GoogleUtilities/Environment (5.3.4)
- GoogleUtilities/Logger (5.3.4):
- GoogleUtilities/Environment
- GoogleUtilities/MethodSwizzler (5.3.4):
- GoogleUtilities/Logger
- GoogleUtilities/Network (5.3.4):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
- GoogleUtilities/Reachability
- "GoogleUtilities/NSData+zlib (5.3.4)"
- GoogleUtilities/Reachability (5.3.4):
- GoogleUtilities/Logger
- GoogleUtilities/UserDefaults (5.3.4):
- GoogleUtilities/Logger
- Intercom (5.1.8)
- nanopb (0.3.8):
- nanopb/decode (= 0.3.8)
- nanopb/encode (= 0.3.8)
- nanopb/decode (0.3.8)
- nanopb/encode (0.3.8)
- Protobuf (3.6.1)
DEPENDENCIES:
- Firebase/Core (~> 5.9.0)
- Firebase/Messaging (~> 5.9.0)
- Intercom
SPEC REPOS:
https://github.com/cocoapods/specs.git:
- Firebase
- FirebaseAnalytics
- FirebaseCore
- FirebaseInstanceID
- FirebaseMessaging
- GoogleAppMeasurement
- GoogleUtilities
- Intercom
- nanopb
- Protobuf
SPEC CHECKSUMS:
Firebase: 383fa29aca93e371cab776b48a5c66544d3c2003
FirebaseAnalytics: 831f1f127f4a75698e9875a87bf7e2668730d953
FirebaseCore: 2a84b6b325792a4319ef71ee18819dcba08d2fd7
FirebaseInstanceID: e2fa4cb35ef5558c200f7f0ad8a53e212215f93e
FirebaseMessaging: d6feeb06218d2675b4149b0ada925a6b707a74cf
GoogleAppMeasurement: 5029d78f2b438bd30ffb44e6c558b57c21622727
GoogleUtilities: abb092d2c12e817fa3e0e7b274987dd72fb86ec3
Intercom: 9f5cfd46a58c6ed146bd46d9df1920f82bbddc42
nanopb: 5601e6bca2dbf1ed831b519092ec110f66982ca3
Protobuf: 1eb9700044745f00181c136ef21b8ff3ad5a0fd5
PODFILE CHECKSUM: 34333d36de73abc7f746adbc32dfb888b1d71cc1
COCOAPODS: 1.5.2
AppDelegate.m - Modified to show only relevant code:
#import "AppDelegate.h"
@import Firebase;
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[FIRApp configure];
[self.window makeKeyAndVisible];
return YES;
}
@end
Environment
- Platform that you're experiencing the issue on:
- [x] iOS
- [ ] Android
- [ ] iOS but have not tested behavior on Android
- [ ] Android but have not tested behavior on iOS
- [ ] Both
- If known, the version of the platform are you experiencing the issue on:
iOS 11
- Operating System:
- [x] MacOS, version:
N/A - [ ] Windows, version:
N/A - [ ] Other, please specify:
N/A
- [x] MacOS, version:
React Nativeversion:0.56.0
React Native Firebaselibrary version:5.0.0
Firebasemodule(s) you're using that has the issue:- [ ] Authentication
- [x] Analytics
- [ ] Cloud Firestore
- [x] Cloud Messaging (FCM)
- [ ] Crashlytics
- [ ] Dynamic Links
- [ ] Functions Callable
- [ ] Invites
- [ ] Instance ID
- [ ] Notifications
- [ ] Performance Monitoring
- [ ] Realtime Database
- [ ] Remote Config
- [ ] Storage
- Are you using
TypeScript?- [x] No
- [ ] Yes, version:
N/A
- Are you using Expo, e.g.
ExpoKit?- [x] No
- [ ] Yes, I've not ejected
- [ ] Yes, but I have ejected to
ExpoKit - [ ] Yes, but I have ejected to vanilla React Native
- Expo version:
N/A
Looks like GoogleAppMeasurement gets imported as a dependency with version 5.3.0. A simple addition to the Podfile like below fixed the problem.
pod 'GoogleAppMeasurement', '~> 5.2.0'
Same here. CocoaPods is becoming totally unreliable in Xcode 10 now! Way too many dependancies and I'm spending way too much time trying to find versions that work now, totally defeats the purpose of using it all together.
Same issue, strangely this only happens on one of our dev's computers. Even after removing node_modules & Pods and reinstalling everything. Pointing GoogleAppMeasurement to 5.2.0 worked
Works fine if you commit Podfile.lock pointing to 5.2.0 (what you'd expect)
This did not work for me. Do I need to clean or something?
Actually now it works, maybe I didn't save the podfile.
@a-koka .. THANK YOU!
You saved my night !! thanks . !!
Version 5.4.1 - November 5, 2018
Analytics
(iOS) Fixed issue with Google Analytics and Google App Measurement mismatch.
Ran into this issue as well except I wasn't even getting the FIRAnalyticsVersionMismatch error message. There was only one line in the log libc++abi.dylib: terminating with uncaught exception of type NSException.
Similar to the above, including Pod 'GoogleAppMeasurement', '~> 5.3.0' in my podfile fixed it for me (as I'm currently on 5.11.0 of the iOS SDK).
Should be fixed more permanently in version 5.14.0 of the iOS SDK (see https://github.com/firebase/firebase-ios-sdk/issues/2151).
@projectpublius Thank you, I had to use 5.3.0.
I had to use 5.3.0 as well. Thank you!
Error:
Terminating app due to uncaught exception 'FIRAnalyticsVersionMismatch', reason: 'Google Analytics for Firebase version (70000000) does not match with Google App Measurement (80901000) version. Please update
Podfile.lock:
- FirebaseAnalytics/AdIdSupport (8.10.0):
- FirebaseCore (~> 8.0)
- FirebaseInstallations (~> 8.0)
- GoogleAppMeasurement (= 8.10.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.6)
- GoogleUtilities/MethodSwizzler (~> 7.6)
- GoogleUtilities/Network (~> 7.6)
- "GoogleUtilities/NSData+zlib (~> 7.6)"
- nanopb (~> 2.30908.0)
- GoogleAppMeasurement (8.10.0):
- GoogleAppMeasurement/AdIdSupport (= 8.10.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.6)
- GoogleUtilities/MethodSwizzler (~> 7.6)
- GoogleUtilities/Network (~> 7.6)
- "GoogleUtilities/NSData+zlib (~> 7.6)"
- nanopb (~> 2.30908.0)
I have the same error with @react-native-firebase 14.2.1
@Brageanth you have posted insufficient information to troubleshoot your problem, on an issue that was closed in 2019, 3 years ago. Your problem will in the end be project-specific, and you can prove these things work if you try https://github.com/mikehardy/rnfbdemo/blob/master/make-demo.sh which will do a fully automated build of a react-native app from scratch, with the analytics module included, in various ways, and run it on android and ios.