question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Expo-firebase-analytics not compatible with react-native-firebase with EAS on IOS

See original GitHub issue

Summary

There is a podspec version incompatibility between Expo’s Firebase analytics React-native-firebase when using EAS. I am using react-native-firebase as a plugin from in EAS managed.

The error appears to be because expo-firebase-analytics is using Firebase/CoreOnly (= 8.14.0) whereas react-native-firebase requires Firebase/CoreOnly (= 8.15.0).

I tried to use an older version of react-native-firebase but I can only go back several patch versions to where Expo 45 compatibility was introduced.

The simple fix seems to be to upgrade expo-firebase-analytics to v8.15.0. As side note Android is working perfectly.

⚠️ Something went wrong running pod install in the ios directory. Command pod install failed. └─ Cause: CocoaPods could not find compatible versions for pod “Firebase/CoreOnly”: In Podfile: EXFirebaseAnalytics (from ../node_modules/expo-firebase-analytics/ios) was resolved to 7.0.0, which depends on Firebase/Core (= 8.14.0) was resolved to 8.14.0, which depends on Firebase/CoreOnly (= 8.14.0)

RNFBApp (from `../node_modules/@react-native-firebase/app`) was resolved to 14.9.1, which depends on
  Firebase/CoreOnly (= 8.15.0)

Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!

managed

What platform(s) does this occur on?

iOS

SDK Version (managed workflow only)

45

Environment

expo-env-info 1.0.3 environment info: System: OS: macOS 11.6.5 Shell: 3.2.57 - /bin/bash Binaries: Node: 14.17.3 - /usr/local/bin/node Yarn: 1.22.11 - /usr/local/bin/yarn npm: 8.3.1 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.10.1 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 15.0, DriverKit 20.4, macOS 11.3, tvOS 15.0, watchOS 8.0 Android SDK: API Levels: 23, 25, 26, 27, 28, 29 Build Tools: 27.0.3, 28.0.2, 28.0.3, 29.0.2 System Images: android-28 | Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom, android-29 | Google Play Intel x86 Atom IDEs: Android Studio: 3.5 AI-191.8026.42.35.5791312 Xcode: 13.0/13A233 - /usr/bin/xcodebuild npmPackages: babel-preset-expo: ~9.1.0 => 9.1.0 expo: ^45.0.0 => 45.0.4 react: 17.0.2 => 17.0.2 react-dom: 17.0.2 => 17.0.2 react-native: 0.68.2 => 0.68.2 react-native-web: 0.17.7 => 0.17.7 react-navigation: ^4.4.4 => 4.4.4 npmGlobalPackages: eas-cli: 0.52.0 expo-cli: 5.4.4 Expo Workflow: managed

Reproducible demo

install expo firebase analytics

expo install expo-firebase-analytics

https://rnfirebase.io/#expo

yarn add @react-native-firebase/app yarn add @react-native-firebase/crashlytics

do local prebuild produces same result as eas build

expo prebuild --clean

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
90dycommented, Aug 17, 2022

Using @react-native-firebase/analytics solved the issue

1reaction
TowhidKashemcommented, Jul 15, 2022

Ha I came back to comment nevermind cause I just saw this:

https://github.com/invertase/react-native-firebase/issues/5629#issuecomment-903172565

Removing it from the pugins array in app config worked like a charm, thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

FirebaseAnalytics - Expo Documentation
Learn how to migrate to React Native Firebase. This is the only Firebase Analytics package for React Native that has universal platform support...
Read more >
Use Firebase In-App-Messaging in Expo Project
I find the solution,expo build:android took onli js file but not file from directory like android/ios,ia manage to solve this problem using eas, ......
Read more >
expo-firebase-analytics - npm
A universal module that interfaces with the native firebase analytics API. Latest version: 8.0.0, last published: 2 months ago.
Read more >
Bartłomiej Klocek (@barthap10) / Twitter
Please upgrade your apps and test if it does not introduce any bugs both on old ... using 'expo-firebase-analytics' together with 'react-native-firebase'?
Read more >
Getting error when building iOS app by using EAS : r/expo
Did I setup the plugins part of the file right? "plugins": ["@react-native-firebase/app", "expo-build-properties"].
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found