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

bug: CocoaPods compatibility error with "GoogleUtilities/Environment" #55

Closed
ghonche opened this issue Jan 21, 2022 · 3 comments
Closed
Assignees

Comments

@ghonche
Copy link

ghonche commented Jan 21, 2022

Plugin version:
1.2.0

Platform(s):
ios

Current behavior:
After installing @capacitor-community/firebase-crashlytics , running npx cap sync generates this error:

✖ Updating iOS native dependencies with pod install - failed!
✖ update ios - failed!
[error] Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod
"GoogleUtilities/Environment":
In Podfile:
CapacitorCommunityFirebaseCrashlytics (from
../../node_modules/@capacitor-community/firebase-crashlytics) was
resolved to 1.2.0, which depends on
Firebase/Crashlytics (= 8.4.0) was resolved to 8.4.0, which depends on
FirebaseCrashlytics ( ~> 8.4.0) was resolved to 8.4.0, which depends on
GoogleUtilities/Environment ( ~> 7.4)
CordovaPluginsStatic (from ../capacitor-cordova-ios-plugins) was
resolved to 3.3.3, which depends on
GoogleUtilities ( ~> 7.2.2) was resolved to 7.2.2, which depends on
GoogleUtilities/Environment (= 7.2.2)

Steps to reproduce:
On a capacitor project run:

npm install @capacitor/ios

npx cap add ios

npm install @capacitor-community/firebase-crashlytics

npx cap sync

Capacitor doctor:

💊   Capacitor Doctor  💊 
Latest Dependencies:
  @capacitor/cli: 3.4.0
  @capacitor/core: 3.4.0
  @capacitor/android: 3.4.0
  @capacitor/ios: 3.4.0
Installed Dependencies:
  @capacitor/cli: 3.3.3
  @capacitor/core: 3.3.3
  @capacitor/ios: 3.3.4
  @capacitor/android: 3.3.3
[success] iOS looking great! 👌
[success] Android looking great! 👌
@robingenz
Copy link
Member

Hi @ghonche,
thank you for your request.
I cannot reproduce the issue with my demo app: https://github.com/robingenz/capacitor-firebase-plugin-demo

CordovaPluginsStatic (from ../capacitor-cordova-ios-plugins) was resolved to 3.3.3, which depends on GoogleUtilities ( ~> 7.2.2) was resolved to 7.2.2, which depends on GoogleUtilities/Environment (= 7.2.2)

I assume from this output that you are using a different Firebase plugin that uses an older version of GoogleUtilities/Environment.
To be sure, I need a Minimal, Reproducible Example (see How to create a Minimal, Reproducible Example) that I can debug.

@ghonche
Copy link
Author

ghonche commented Jan 27, 2022

Hi @robingenz
I found out that the problem is with cordova-plugin-googleplus .
Take a look at this reproducible example.
Just clone the repository, run ionic cap sync to see the error.
By the way, I'm reporting this to google plus repository as well. But I really appreciate if you could help too.
thanks in advance.

✖ Updating iOS native dependencies with pod install - failed!
✖ update ios - failed!
[error] Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "FirebaseCore":
In Podfile:
CapacitorCommunityFirebaseCrashlytics (from ../../node_modules/@capacitor-community/firebase-crashlytics) was
resolved to 1.2.1, which depends on
Firebase/Crashlytics (= 8.4.0) was resolved to 8.4.0, which depends on
Firebase/CoreOnly (= 8.4.0) was resolved to 8.4.0, which depends on
FirebaseCore (= 8.4.0)
CapacitorCommunityFirebaseCrashlytics (from ../../node_modules/@capacitor-community/firebase-crashlytics) was
resolved to 1.2.1, which depends on
Firebase/Crashlytics (= 8.4.0) was resolved to 8.4.0, which depends on
FirebaseCrashlytics (~ > 8.4.0) was resolved to 8.4.0, which depends on
FirebaseCore (~ > 8.0)
CocoaPods could not find compatible versions for pod "GoogleUtilities/Logger":
In Podfile:
CapacitorCommunityFirebaseCrashlytics (from ../../node_modules/@capacitor-community/firebase-crashlytics) was
resolved to 1.2.1, which depends on
Firebase/Crashlytics (= 8.4.0) was resolved to 8.4.0, which depends on
Firebase/CoreOnly (= 8.4.0) was resolved to 8.4.0, which depends on
FirebaseCore (= 8.4.0) was resolved to 8.4.0, which depends on
GoogleUtilities/Logger (~ > 7.4)
CordovaPluginsStatic (from ../capacitor-cordova-ios-plugins) was resolved to 3.4.0, which depends on
GoogleUtilities (~ > 7.2.2) was resolved to 7.2.2, which depends on
GoogleUtilities/Logger (= 7.2.2)

@robingenz
Copy link
Member

Hi @ghonche,
as far as I know, the versions must match. So the other project should install a newer version of the dependency.
Maybe you can also force a version locally, but I don't see how.
If anyone else is more familiar with this, I would appreciate any tips.
I also checked out your project and tried to find a solution but didn't come up with any ideas on the fly.
Since it is not a bug in this project from my point of view and reducing the version of the dependency would not be productive, I close this issue.

Please let me know if you think otherwise.

My suggestion: Fork the project in the meantime and increase the version in your fork until the other issue is resolved.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants