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?: Cocoa Pods Conflict? #373

Closed
EinfachHans opened this issue Apr 20, 2020 · 14 comments
Closed

bug?: Cocoa Pods Conflict? #373

EinfachHans opened this issue Apr 20, 2020 · 14 comments
Labels
Firebase SDK Relates to the Firebase SDK library which this plugin wraps plugin conflict An issue caused by a conflict with another Cordova plugin

Comments

@EinfachHans
Copy link

Bug report

Current behavior:

I just added your Plugin to a new App and get this Error:

Failed to install 'cordova-plugin-firebasex': Error: pod: Command failed with exit code 1
    at ChildProcess.whenDone (/Users/hanskrywalsky/IdeaProjects/beat-the-virus/node_modules/cordova-common/src/superspawn.js:135:23)
    at ChildProcess.emit (events.js:311:20)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
pod: Command failed with exit code 1

After run pod install, i get this Error:

CocoaPods could not find compatible versions for pod "GoogleAppMeasurement":
  In snapshot (Podfile.lock):
    GoogleAppMeasurement (= 6.4.0, ~> 6.0)

  In Podfile:
    Firebase/Core (= 6.18.0) was resolved to 6.18.0, which depends on
      FirebaseAnalytics (= 6.3.0) was resolved to 6.3.0, which depends on
        GoogleAppMeasurement (= 6.3.0)

    Google-Mobile-Ads-SDK (~> 7.57) was resolved to 7.58.0, which depends on
      GoogleAppMeasurement (~> 6.0)

Specs satisfying the `GoogleAppMeasurement (= 6.4.0, ~> 6.0), GoogleAppMeasurement (~> 6.0), GoogleAppMeasurement (= 6.3.0)` dependency were found, but they required a higher minimum deployment target.

I have set my Deployment Min Target to 11:
<preference name="deployment-target" value="11.0" />

Google-Mobile-Ads-SDK comes from this Plugin: https://github.com/admob-plus/admob-plus

Can you help me out with this? Is there a Way i can handle this Issue?

@dpa99c
Copy link
Owner

dpa99c commented Apr 20, 2020

This is a Pods version conflict between Google Mobile Ads SDK and Firebase SDK components pulled in by each plugin, as you can see from the error.

Google-Mobile-Ads-SDK (~> 7.57) (resolved to 7.58.0)  
	=> GoogleAppMeasurement (~> 6.0) 
		=> 6.4.0

Firebase/Core (= 6.18.0)
	=> FirebaseAnalytics (= 6.3.0)
    	=> GoogleAppMeasurement (= 6.3.0)
    		=> 6.3.0

So the loose version specification in Google-Mobile-Ads-SDK is pulling in 6.4.0 which conflicts with the exact version specification of Firebase as 6.3.0

Since the latest iOS release version of the Firebase SDK is 6.0.22, you can try forking this plugin and editing the plugin.xml to bump all teh 6.18.0 versions to 6.0.22 in the hope that a newer version of Firebase SDK pulls in a new version of GoogleAppMeasurement.

If this works, feel free to submit a PR and I'll merge the changes to this plugin to go out in the next release.

@dpa99c dpa99c added Firebase SDK Relates to the Firebase SDK library which this plugin wraps plugin conflict An issue caused by a conflict with another Cordova plugin support Support is being requested but not a necessarily a bug labels Apr 20, 2020
@EinfachHans
Copy link
Author

Thanks for your quick answer and explanation. I think i don't need to test this by forking. I found this where you can see that Version 6.22.0 depends on FirebaseAnalytics@6.4.1, which, as you can see here, depends on GoogleAppMeasurement@6.4.1.

So will this work then? Because one is 6.4.0 and one is 6.4.1?

@dpa99c
Copy link
Owner

dpa99c commented Apr 20, 2020

~> 6.0 will resolve to the latest 6.x version so if you run pod repo update on your local machine to pull in the latest podspecs then bump to 6.22.0, it should work.

@EinfachHans
Copy link
Author

should i create a pr for upgrading to 6.22.0 or do you?

@dpa99c dpa99c added ready for release Something has been implemented and is awaiting release to npm and removed support Support is being requested but not a necessarily a bug labels Apr 20, 2020
@askona
Copy link

askona commented Apr 23, 2020

@dpa99c please increase version of plugin after pods update

@dpa99c
Copy link
Owner

dpa99c commented Apr 23, 2020

@askona the plugin version will be increased when the next release is tagged and released to npm

@askona
Copy link

askona commented Apr 23, 2020

@dpa99c just FYI, for now 9.1.0 contains old pods - 6.18.0, which are conflicts with most of recent other plugins, whos using firebase

@EinfachHans
Copy link
Author

Wait for the next Release, i think it will be published soon. As a alternative you can go into the plugins Folder and edit the Plugin.xml youtself. Remove the Platform and readd it

@askona
Copy link

askona commented Apr 23, 2020

Maybe this will be usefull for someone, I'm using npm command
"fix_firebasex_issue": "sed -i -e 's/6.18.0/6.22.0/' plugins/cordova-plugin-firebasex/plugin.xml",

@remisture
Copy link

When will the fix be released?

@dpa99c
Copy link
Owner

dpa99c commented Apr 26, 2020

cordova-plugin-firebasex@9.1.1 has been published which resolves this

@dpa99c dpa99c closed this as completed Apr 26, 2020
@dpa99c dpa99c removed the ready for release Something has been implemented and is awaiting release to npm label Apr 26, 2020
@stickoutapp
Copy link

Hello, I believe this bug is present again with new higher versions. I get identical errors as initially reported, just with higher versions:
CocoaPods could not find compatible versions for pod "GoogleAppMeasurement":
In snapshot (Podfile.lock):
GoogleAppMeasurement (< 9.0, = 8.10.0, >= 7.0)

In Podfile:
Firebase/Core (= 8.4.0) was resolved to 8.4.0, which depends on
FirebaseAnalytics (~> 8.4.0) was resolved to 8.4.0, which depends on
FirebaseAnalytics/AdIdSupport (= 8.4.0) was resolved to 8.4.0, which depends on
GoogleAppMeasurement (= 8.4.0)

Specs satisfying the GoogleAppMeasurement (< 9.0, = 8.10.0, >= 7.0), GoogleAppMeasurement (= 8.4.0) dependency were found, but they required a higher minimum deployment target.

@stickoutapp
Copy link

By the way, will the fix also be available for the CLI version?

@stickoutapp
Copy link

Good news is that I have forked the plugin and bumped firebase version in plugin.xml from 8.4.0 to 8.10.0 and my project builds and works fine. Or more precisely firebasex functionality still works fine.. I have not tested admob yet. I have modified and tested CLI branch.

here is the change:
stickoutapp@129cc46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Firebase SDK Relates to the Firebase SDK library which this plugin wraps plugin conflict An issue caused by a conflict with another Cordova plugin
Projects
None yet
Development

No branches or pull requests

5 participants