andrehtissot / cordova-plugin-fcm-with-dependecy-updated

Google FCM Push Notifications Cordova Plugin
MIT License
210 stars 279 forks source link

Failed to install 'cordova-plugin-fcm-with-dependecy-updated': Error: pod: Command failed with exit code 1 #271

Open jerryxks opened 3 years ago

jerryxks commented 3 years ago

Unable to add ios using command ionic cordova platform add ios@5.1.0

Failed to install 'cordova-plugin-fcm-with-dependecy-updated': Error: pod: Command failed with exit code 1 at ChildProcess.whenDone (/Users/abhishek/Documents/pal-app/node_modules/cordova-common/src/superspawn.js:135:23) at ChildProcess.emit (events.js:400:28) at maybeClose (internal/child_process.js:1055:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) pod: Command failed with exit code 1

Also, tried to clear cache, but nothing happened.

node --version v14.17.5

npm --version 6.14.14

npm install --loglevel error --no-progress `audited 1582 packages in 14.971s

88 packages are looking for funding run npm fund for details

found 52 vulnerabilities (3 low, 46 moderate, 3 high) run npm audit fix to fix them, or npm audit for details`

ionic info `Ionic:

Ionic CLI : 6.17.0 (/usr/local/lib/node_modules/@ionic/cli) Ionic Framework : @ionic/angular 5.7.0 @angular-devkit/build-angular : 0.1000.8 @angular-devkit/schematics : 10.0.8 @angular/cli : 10.0.8 @ionic/angular-toolkit : 2.3.3

Cordova:

Cordova CLI : 10.0.0 Cordova Platforms : android broken, ios 5.1.0 Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 15 other plugins)

Utility:

cordova-res : 0.15.3 native-run : not installed globally

System:

ios-sim : 8.0.2 NodeJS : v14.17.5 (/usr/local/bin/node) npm : 6.14.14 OS : macOS Big Sur Xcode : Xcode 12.4 Build version 12D4e`

sudo gem which cocoapods /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.0/lib/cocoapods.rb

erickm32 commented 3 years ago

I had the same problem just now.

Running the ´pod install´ manually it also fails. It looks like the version (´$IOS_FIREBASE_MESSAGING_VERSION´) wasnt´t set (maybe because I run it manually 😅 ...)

Ionic Info Ionic:

Ionic CLI : 6.17.0 (/Users/erickmoreira/.nvm/versions/node/v12.22.5/lib/node_modules/@ionic/cli) Ionic Framework : ionic-angular 3.9.6 @ionic/app-scripts : 3.2.4

Cordova:

Cordova CLI : 10.0.0 Cordova Platforms : ios 5.1.1 Cordova Plugins : cordova-plugin-ionic-keyboard 2.0.5, cordova-plugin-ionic-webview 4.1.3, (and 19 other plugins)

Utility:

cordova-res : not installed globally native-run : not installed globally

System:

ios-sim : 8.0.2 NodeJS : v12.22.5 (/Users/erickmoreira/.nvm/versions/node/v12.22.5/bin/node) npm : 6.14.14 OS : macOS Big Sur Xcode : Xcode 13.0 Build version 13A233

sudo gem which cocoapods /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0/lib/cocoapods.rb

FiReBlUe45 commented 3 years ago

I had the same problem. Any news ???

erickm32 commented 3 years ago

Apparently, with cordova-ios@6.x.x it finishes the build process.

I dont remember right now if everything went fine, I'm not with the mac right now, but it looked ok.

But, by upgrading cordova-ios to 6, I had another problem with in-app-browser requiring the version ~5, so I'll have to come back to this issue later this week haha

ahaneef29 commented 2 years ago

@erickm32 any workaround ?

alitalaee commented 2 years ago

Apparently, with cordova-ios@6.x.x it finishes the build process.

I dont remember right now if everything went fine, I'm not with the mac right now, but it looked ok.

But, by upgrading cordova-ios to 6, I had another problem with in-app-browser requiring the version ~5, so I'll have to come back to this issue later this week haha

i had the same isuue for ios 6.2.0 and after spend many hours i can fix it. steps:: 1-remove ios platform ionic cordova platform rm ios 2- update cocopod --> open terminal and run sudo gem install cocoapods

Pod Version pod --version 1.11.2

3-add ios platform without fcm ionic cordova platform add ios 4-prepare and build ios and run on xcode and worked perfectly ionic cordova prepare ios ionic cordova build ios --prod 5- run on iphone simulator 6- close xcode app and try to add fcm again

7- install fcm with specific version like below code npm install @ionic-native/fcm@5.36.0 --save ionic cordova plugin add cordova-plugin-fcm-with-dependecy-updated@6.4.3 --save

I hope it can help

jagatb880 commented 2 years ago

ionic cordova plugin add cordova-plugin-fcm-with-dependecy-updated@4.1.1 --save

after build you will find a error

after that go to platform/ios

check the pod file

change the code to

pod 'Firebase/Analytics', '>= 6.3.0'
pod 'Firebase/Messaging', '>= 6.3.0'

do pod update in platform/ios

exit from folder. and. in main folder do run ionic cordova builld ios.

100% working

matrixnamankakkar commented 2 years ago

All the above shit is not working and all for this proper environments are needed i have stucked to the same issue almost 15 days. At last i have downgrade my cocoapods to 1.10 and every pod or plugin installed in ios successfully. All thanks to me and my fifteen days.

ukaleem commented 2 years ago

I had the same issue any updates or solutions!?

sombatos commented 1 year ago

Failed to install 'cordova-plugin-fcm-with-dependecy-updated': Error: pod: Command failed with exit code 1

Exactly the same error. It looks like it happens after CocoaPods 1.11.3 has been released in March (https://github.com/CocoaPods/CocoaPods/releases). Before it worked fine.

Maybe last working version of CocoaPods (1.11.2) can be specified somehow in https://github.com/andrehtissot/cordova-plugin-fcm-with-dependecy-updated/blob/master/plugin.xml#L121.

sombatos commented 1 year ago

Here are the results. The problem is in Firebase pods. firebase-ios-sdk is released quite often https://github.com/firebase/firebase-ios-sdk/releases, and some of it's releases are simply causing this error: Error: pod: Command failed with exit code 1

So you may play with cocoapods versions or you can wait for a week or two while some other Firebase release will be published and it will work for you. But the most reliable way is to find the version of Firebase which works for your configuration like this:

# Specify your ios version in the next line
cordova platform add ios@6.2.0

cd platforms/ios

# Change 8.12.1 in the next command to some other versions from https://github.com/firebase/firebase-ios-sdk/releases
# which will work for your configuration

echo "# DO NOT MODIFY -- auto-generated by Apache Cordova
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '11.0'
target 'ProjectName' do
    project 'ProjectName.xcodeproj'
    pod 'Firebase/Analytics', '8.12.1'
    pod 'Firebase/Messaging', '8.12.1'
end" > Podfile

# Install pods according to the new content of Podile
pod update

# Finish cordova-plugin-fcm-with-dependecy-updated installation
cd ../../
plugins/cordova-plugin-fcm-with-dependecy-updated/scripts/install_ionic_dependencies.bat