Mike Darling
Mike Darling

Reputation: 177

Failed to install 'cordova-plugin-firebase-authentication': Error: pod: Command failed with exit code 1

I've seen a lot of posts related to similar errors, have tried all of the suggestions, but still no joy! Can someone explain the reason for this (apparently common) Cocoapod error when trying to install an ionic cordova plugin? (seems it's not specific to any one plugin, this same error pops up for lots of them). What is the process to troubleshoot this and what is the likely cause?

ionic cordova plugin add cordova-plugin-firebase-authentication
> cordova plugin add cordova-plugin-firebase-authentication
Installing "cordova-plugin-firebase-authentication" for ios
Running command: pod install --verbose
Failed to install 'cordova-plugin-firebase-authentication': Error: pod: Command failed with exit code 1
    at ChildProcess.whenDone (/Users/mike/Documents/APPNAME/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 Socket.<anonymous> (internal/child_process.js:443:11)
    at Socket.emit (events.js:311:20)
    at Pipe.<anonymous> (net.js:668:12)
pod: Command failed with exit code 1
[ERROR] An error occurred while running subprocess cordova.

    cordova plugin add cordova-plugin-firebase-authentication exited with exit code 1.

I have tried the various suggestions:

And I'm using the .xcworkspace file not the .xcodeproj file for xCode.

Help appreciated!!!

Upvotes: 3

Views: 2571

Answers (2)

crg
crg

Reputation: 4557

On MAC M1 I had the same issue, it was kind of random and it happened with some other plugins but not all plugins.

I installed 2 times cocapods to make it work. I had initially installed cocapods with homebrew and I installed it again with gem (ruby).

I hope this will help someone I spent 1 full day finding what it was.

Upvotes: 1

Vaibhav Singh
Vaibhav Singh

Reputation: 71

I tried installing Firebase Auth via the pod file and it worked.

Upvotes: 0

Related Questions