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

CocoaPods could not find compatible versions for pod "GoogleDataTransport" #4013

Closed
1 of 10 tasks
ahwatts opened this issue Jul 28, 2020 · 5 comments
Closed
1 of 10 tasks

Comments

@ahwatts
Copy link

ahwatts commented Jul 28, 2020

Issue

When adding @react-native-firebase/crashlytics@8.1.2, I first added @react-native-firebase/app@8.2.0. The app built correctly (or at least built) on both iOS and Android after adding app. However, I tried adding crashlytics, and the pod install step failed:

[!] CocoaPods could not find compatible versions for pod "GoogleDataTransport":
  In snapshot (Podfile.lock):
    GoogleDataTransport (= 7.0.0, ~> 7.0)

  In Podfile:
    RNFBApp (from `../node_modules/@react-native-firebase/app`) was resolved to 8.2.0, which depends on
      Firebase/CoreOnly (~> 6.27.0) was resolved to 6.27.1, which depends on
        FirebaseCore (= 6.8.1) was resolved to 6.8.1, which depends on
          FirebaseCoreDiagnostics (~> 1.3) was resolved to 1.5.0, which depends on
            GoogleDataTransport (~> 7.0)

    RNFBCrashlytics (from `../node_modules/@react-native-firebase/crashlytics`) was resolved to 8.1.2, which depends on
      Firebase/Crashlytics (~> 6.27.0) was resolved to 6.27.1, which depends on
        FirebaseCrashlytics (~> 4.2.0) was resolved to 4.2.0, which depends on
          GoogleDataTransport (~> 6.1)


You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * changed the constraints of dependency `GoogleDataTransport` inside your development pod `RNFBCrashlytics`.
   You should run `pod update GoogleDataTransport` to apply changes you've made.

But running pod update GoogleDataTransport gives me this error:

[!] CocoaPods could not find compatible versions for pod "GoogleDataTransport":
  In Podfile:
    RNFBApp (from `../node_modules/@react-native-firebase/app`) was resolved to 8.2.0, which depends on
      Firebase/CoreOnly (~> 6.27.0) was resolved to 6.27.1, which depends on
        FirebaseCore (= 6.8.1) was resolved to 6.8.1, which depends on
          FirebaseCoreDiagnostics (~> 1.3) was resolved to 1.5.0, which depends on
            GoogleDataTransport (~> 7.0)

    RNFBCrashlytics (from `../node_modules/@react-native-firebase/crashlytics`) was resolved to 8.1.2, which depends on
      Firebase/Crashlytics (~> 6.27.0) was resolved to 6.27.1, which depends on
        FirebaseCrashlytics (~> 4.2.0) was resolved to 4.2.0, which depends on
          GoogleDataTransport (~> 6.1)

It looks like RNFBApp and RNFBCrashlytics depend on different versions of GoogleDataTransport. My next step is to try to downgrade app to 8.1.0 and see if that works.

Describe your issue here


Project Files

Javascript

Click To Expand

package.json:

# N/A

firebase.json for react-native-firebase v6:

# N/A

iOS

Click To Expand

ios/Podfile:

  • I'm not using Pods
  • I'm using Pods and my Podfile looks like:
# N/A

AppDelegate.m:

// N/A


Android

Click To Expand

Have you converted to AndroidX?

  • my application is an AndroidX application?
  • I am using android/gradle.settings jetifier=true for Android compatibility?
  • I am using the NPM package jetifier for react-native compatibility?

android/build.gradle:

// N/A

android/app/build.gradle:

// N/A

android/settings.gradle:

// N/A

MainApplication.java:

// N/A

AndroidManifest.xml:

<!-- N/A -->


Environment

Click To Expand

react-native info output:

 OUTPUT GOES HERE
  • Platform that you're experiencing the issue on:
    • iOS
    • Android
    • iOS but have not tested behavior on Android
    • Android but have not tested behavior on iOS
    • Both
  • react-native-firebase version you're using that has this issue:
    • e.g. 5.4.3
  • Firebase module(s) you're using that has the issue:
    • e.g. Instance ID
  • Are you using TypeScript?
    • Y/N & VERSION


@ahwatts
Copy link
Author

ahwatts commented Jul 28, 2020

Downgrading @react-native-firebase/app to 8.0.1 and @react-native-firebase/crashlytics to 8.0.3 gets around this issue, but obviously it would be nice to be able to be up-to-date.

@andersonaddo
Copy link
Contributor

Hm so both of those versions were before the SDK version bump of #3881.
But (according to the change logs here and here), there's been no other native changes since then; and this isn't a problem I've faced (and I use

"@react-native-firebase/crashlytics@^8.0.1":
  version "8.1.1"

and

"@react-native-firebase/app@^8.0.0":
  version "8.1.0"

So, I suspect this is a local environmental issue. Have you tried completely deleting your Podfile.lock and pod installing from scratch?

@sharc7
Copy link
Contributor

sharc7 commented Jul 29, 2020

I faced the same issue with
"@react-native-firebase/app": "^8.2.0"
"@react-native-firebase/crashlytics": "^8.1.2"
Solved this by removing Podfile.lock and running pod install again as suggested by @andersonaddo.

@andersonaddo
Copy link
Contributor

Yeah, just what I suspected.
I faced a similar problem (with a similar solution) myself when I upgraded to the version with the SDK version bump.

@ahwatts
Copy link
Author

ahwatts commented Jul 29, 2020

Yeah, I guess CocoaPods picked FirebaseCoreDiagnostics (1.5.0) when I installed the App package, and I guess that messed up Crashlytics. Updating both and then re-creating Podfile.lock appears to pick version 1.4.0 of FirebaseCoreDiagnostics which fixed this for me. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants