cordova-plugin-fcm-with-dependecy-updated icon indicating copy to clipboard operation
cordova-plugin-fcm-with-dependecy-updated copied to clipboard

Failed install 'cordova-plugin-fcm-with-dependecy-updated' IOS

Open felixdiaz opened this issue 4 years ago • 10 comments

Hi, I have a problem with this component. When I try to generate platform in IOS. I catch this error

Using cordova-fetch for cordova-ios@^5.0.0
Adding ios project...
Creating Cordova project for the iOS platform:
	Path: platforms/iOS
iOS project created with [email protected]
Installing "cordova-custom-config" for ios
Installing "cordova-plugin-device" for ios
Installing "cordova-plugin-fcm-with-dependecy-updated" for ios
Running command: pod install --verbose
Failed to install 'cordova-plugin-fcm-with-dependecy-updated': Error: pod: Command failed with exit code 1
    at ChildProcess.whenDone (/Users/felix/Desktop/Apps/appBase/node_modules/cordova-common/src/superspawn.js:135:23)
    at ChildProcess.emit (events.js:315:20)
    at maybeClose (internal/child_process.js:1048:16)
    at Socket.<anonymous> (internal/child_process.js:439:11)
    at Socket.emit (events.js:315:20)
    at Pipe.<anonymous> (net.js:673:12)
pod: Command failed with exit code 1
node -v.  14.15.0
Cordova -version 10.0.0
ioni info 5.4.16

I have a new MacBookAir M1. I followed this steps:

to install completely cocoapods on Mac with M1 chip (Apple Silicon), please follow those steps:

-Duplicate the Terminal application in the Utilities folder.
-Right click on the app and choose Get Info.
-Rename the other version of the app as you like.
-Check the option "open with Rosetta".
-Install Cocoapods with the command "sudo gem install cocoapods"
-Type the command line "gem install ffi" to fix the ffi bundle problem. Now you can do a "pod install" without problem.

this is not working for me

Thanks in advance

felixdiaz avatar Nov 25 '20 15:11 felixdiaz

I have the exact same error. Cordova 10.0.0, and Node 12.18.3.

its-dlh avatar Dec 08 '20 17:12 its-dlh

The error reported was when executing the pod install command.

What happen if you run pod --version?

andrehtissot avatar Dec 11 '20 05:12 andrehtissot

When I execute pod--version. 1.10.0

felixdiaz avatar Dec 14 '20 07:12 felixdiaz

I had the same problem here with Cordova v. 10.0.0, Node v13.12.0 and Pod version 1.10.0. Here's the complete verbose output (sorry for the formatting). As suggested, I ran "pod repo update" and now the script seems to be working correctly.


Installing plugin "cordova-plugin-fcm-with-dependecy-updated" following successful platform add of ios Found variables for "cordova-plugin-fcm-with-dependecy-updated". Processing as cli_variables. Installing "cordova-plugin-fcm-with-dependecy-updated" for ios Finding scripts for "before_plugin_install" hook from plugin cordova-plugin-fcm-with-dependecy-updated on ios platform only. No scripts found for hook "before_plugin_install". Install start for "cordova-plugin-fcm-with-dependecy-updated" on ios. Beginning processing of action stack for ios project... Action stack processing complete. pods.json found in platforms/ios Podfile found in platforms/ios Adding pods since the plugin contained Set pods.json for sources - https://github.com/CocoaPods/Specs.git Added source line for https://github.com/CocoaPods/Specs.git Set pods.json for libraries - Firebase/Messaging Added pod line for Firebase/Messaging Wrote to pods.json. Wrote to Podfile. Running pod install (to install plugins) Running command: pod --version Command finished with error code 0: pod --version Running command: pod install --verbose ==== pod install start ====

Preparing

Analyzing dependencies

Inspecting targets to integrate Using ARCHS setting to build architectures of target Pods-Hem: (``)

Resolving dependencies of Podfile CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only perfomed in repo update

[!] CocoaPods could not find compatible versions for pod "Firebase/Messaging": In Podfile: Firebase/Messaging (~> 7.0.0)

None of your spec sources contain a spec satisfying the dependency: Firebase/Messaging (~> 7.0.0).

You have either:

  • out-of-date source repos which you can update with pod repo update or with pod install --repo-update.
  • mistyped the name or version.
  • not added the source repo that hosts the Podspec to your Podfile.

/Users/mikkoville/.rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:328:in raise_error_unless_state' /Users/mikkoville/.rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:310:in block in unwind_for_conflict' internal:kernel:90:in tap' /Users/mikkoville/.rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in unwind_for_conflict' /Users/mikkoville/.rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:257:in process_topmost_state' /Users/mikkoville/.rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:182:in resolve' /Users/mikkoville/.rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in resolve' /Users/mikkoville/.rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/cocoapods-1.10.0/lib/cocoapods/resolver.rb:94:in resolve' /Users/mikkoville/.rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/analyzer.rb:1074:in block in resolve_dependencies' /Users/mikkoville/.rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/cocoapods-1.10.0/lib/cocoapods/user_interface.rb:64:in section' /Users/mikkoville/.rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/analyzer.rb:1072:in resolve_dependencies' /Users/mikkoville/.rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/analyzer.rb:124:in analyze' /Users/mikkoville/.rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:414:in analyze' /Users/mikkoville/.rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:239:in block in resolve_dependencies' /Users/mikkoville/.rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/cocoapods-1.10.0/lib/cocoapods/user_interface.rb:64:in section' /Users/mikkoville/.rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:238:in resolve_dependencies' /Users/mikkoville/.rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:160:in install!' /Users/mikkoville/.rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/cocoapods-1.10.0/lib/cocoapods/command/install.rb:52:in run' /Users/mikkoville/.rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/claide-1.0.3/lib/claide/command.rb:334:in run' /Users/mikkoville/.rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/cocoapods-1.10.0/lib/cocoapods/command.rb:52:in run' /Users/mikkoville/.rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/cocoapods-1.10.0/bin/pod:55:in <top (required)>' /Users/mikkoville/.rubies/ruby-3.0.0/bin/pod:23:in load' /Users/mikkoville/.rubies/ruby-3.0.0/bin/pod:23:in `

'

Command finished with error code 31: pod install,--verbose Failed to install 'cordova-plugin-fcm-with-dependecy-updated': Error: pod: Command failed with exit code 31 at ChildProcess.whenDone (/Users/mikkoville/project/hem/node_modules/cordova-common/src/superspawn.js:136:25) at ChildProcess.emit (events.js:315:20) at maybeClose (internal/child_process.js:1026:16) at Socket. (internal/child_process.js:441:11) at Socket.emit (events.js:315:20) at Pipe. (net.js:674:12) pod: Command failed with exit code 31 Error: pod: Command failed with exit code 31 at ChildProcess.whenDone (/Users/mikkoville/project/hem/node_modules/cordova-common/src/superspawn.js:136:25) at ChildProcess.emit (events.js:315:20) at maybeClose (internal/child_process.js:1026:16) at Socket. (internal/child_process.js:441:11) at Socket.emit (events.js:315:20) at Pipe. (net.js:674:12)

mvaljento avatar Jan 01 '21 11:01 mvaljento

The iOS notifications are not coming through, though..

mvaljento avatar Jan 01 '21 17:01 mvaljento

Hi, same problem for me:

Installing "cordova-plugin-fcm-with-dependecy-updated" for ios Running command: pod install --verbose Failed to install 'cordova-plugin-fcm-with-dependecy-updated': Error: pod: Command failed with exit code 1 at ChildProcess.whenDone (/Users/xb/Documents/_xb/lab-editor/projects/dir1/lab_fcm_updated/app-mobile/node_modules/cordova-common/src/superspawn.js:135:23) at ChildProcess.emit (events.js:314:20) at maybeClose (internal/child_process.js:1051:16) at Socket. (internal/child_process.js:442:11) at Socket.emit (events.js:314:20) at Pipe. (net.js:673:12) pod: Command failed with exit code 1

On a fresh new project with only platform [email protected] added I tried with cordova 9 and 10 cocoapods 1.9.0 and 1.9.1 pod repo update, pod install

Always same error.

This works with ios@6 and higher, but I need 5.1.1 for this project.

any help?

xavax31 avatar Jan 27 '21 14:01 xavax31

What worked for me was adding version 7.5.0 manually before adding the platform ios. So:

ionic cordova plugin add [email protected]

and then add the platform

ionic cordova platform add ios

However v. 7.7.0 still fails, only works for 7.5.0 for some reason

On Wed, 27 Jan 2021, 15:21 xavax31, [email protected] wrote:

Hi, same problem for me:

Installing "cordova-plugin-fcm-with-dependecy-updated" for ios Running command: pod install --verbose Failed to install 'cordova-plugin-fcm-with-dependecy-updated': Error: pod: Command failed with exit code 1 at ChildProcess.whenDone (/Users/xb/Documents/_xb/lab-editor/projects/dir1/lab_fcm_updated/app-mobile/node_modules/cordova-common/src/superspawn.js:135:23) at ChildProcess.emit (events.js:314:20) at maybeClose (internal/child_process.js:1051:16) at Socket. (internal/child_process.js:442:11) at Socket.emit (events.js:314:20) at Pipe. (net.js:673:12) pod: Command failed with exit code 1

On a fresh new project with only platform [email protected] added I tried with cordova 9 and 10 cocoapods 1.9.0 and 1.9.1 pod repo update, pod install

Always same error.

This works with ios@6 and higher, but I need 5.1.1 for this project.

any help?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/andrehtissot/cordova-plugin-fcm-with-dependecy-updated/issues/202#issuecomment-768317293, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASE22SSU556VWANETRLMUVTS4AONRANCNFSM4UCSN6QQ .

fleerdayo avatar Jan 27 '21 14:01 fleerdayo

Yes, in fact, it works for me too with version 7.5.0, and fails since the 7.6.0. It seems to be related to a problem with this change in version 7.6.0: Added IOS_FIREBASE_MESSAGING_VERSION plugin variable to force a fixed Firebase/Messaging pod version

If I manually exec pod install --verbose after the error mentioned in my last post, I get this error about Podfile:

ArgumentError - Illformed requirement "$IOS_FIREBASE_MESSAGING_VERSION"``

If I changed $IOS_FIREBASE_MESSAGING_VERSION in Podfile by ~> 7.0.0, pod install --verbose works.

As PodFile is erased and created each time I install the plugin, the only solution for me today is to stay at version 7.5.0

Any solution to force to use last version ?

xavax31 avatar Jan 27 '21 14:01 xavax31

@icemycoffee even with 7.5.0 we got the same problem here. pod --version 1.10.1

Florian-crg avatar Mar 22 '21 15:03 Florian-crg

I submitted a pull request which solved the pod error for me: https://github.com/andrehtissot/cordova-plugin-fcm-with-dependecy-updated/pull/241

Installing the newest version from my repository works without errors: ionic cordova plugin add https://github.com/icemycoffee/cordova-plugin-fcm-with-dependecy-updated

As @xavax31 mentioned already there's a problem with receiving the value of "$IOS_FIREBASE_MESSAGING_VERSION" in the plugin.xml file (introduced here: https://github.com/andrehtissot/cordova-plugin-fcm-with-dependecy-updated/commit/7a3558bb1257c86c0f4f888f8b37321cb3673ba6#diff-6813833f33103dfcaa583d4f09e06dc84c0ce8ddd34c8b567b56c9728be58389)

Moving the value from a <reference> tag directly to the <pod> tag solves that problem.

fleerdayo avatar Mar 27 '21 12:03 fleerdayo