jeduan / cordova-plugin-facebook4

Use the latest Facebook SDK in your Cordova and Ionic projects
Other
767 stars 511 forks source link

Error pod: Command failed with exit code 31 #846

Closed globules-io closed 4 years ago

globules-io commented 4 years ago

Bug or feature request

[x] I'm reporting a reproducible issue with the code

Describe the Bug of feature request

Installation fails for iOS, work for android

 <plugin name="cordova-plugin-facebook4" spec="^6.2.0">
    <variable name="APP_ID" value="xxxxxxx" />
    <variable name="APP_NAME" value="xxxxxxx" />
    <variable name="FACEBOOK_HYBRID_APP_EVENTS" value="false" />
    <variable name="FACEBOOK_ANDROID_SDK_VERSION" value="5.5.2" />
</plugin>

 cordova platform add ios@5.1.1

 Failed to install 'cordova-plugin-facebook4': Error pod: Command failed with exit code 31

Plugin version, OS, devices, etc

cordova@9.0.0 (lib 9.0.1) cordova-ios@5.1.1 cordova-android@8.1.0

peterpeterparker commented 4 years ago

Checkout the iOS documentation or #833, #811, #812 or #795

globules-io commented 4 years ago

This was a working project with v5.x. Just did an upgrade. Install worked for Android. I do not see anywhere in the documentation for iOS about this related issue? We are talking about installing the plugin here, not building the app?

833 => build fail

811 => file not found

812 => other plugin override pod file

795 => file not found

None of these issues relates to my issue. I'm trying to install here, not build?

peterpeterparker commented 4 years ago

All these issues are Pod related as yours.

However if after trying the different solutions provided and documented you still do think it isn't an issue related to your project, fill free to provide a sample repo and list of commands to run to reproduce the error, I'll be happy to try these on my laptop.

globules-io commented 4 years ago

Well that's what I'm saying. There are no solutions because none of these issues are the same issue as mine. 1- cordova create TMP 2- add to config.xml

 <plugin name="cordova-plugin-facebook4" spec="^6.2.0">
    <variable name="APP_ID" value="xxxxxxx" />
    <variable name="APP_NAME" value="xxxxxxx" />
    <variable name="FACEBOOK_HYBRID_APP_EVENTS" value="false" />
    <variable name="FACEBOOK_ANDROID_SDK_VERSION" value="5.5.2" />
</plugin>

3- cordova platform add ios@5.1.1

same error, no other plugin install, brand new project

peterpeterparker commented 4 years ago

I do not face an errors (see logs). I guess you are facing a problem with your local POD installation, try to update it.

Good luck.

~/projects/lab 
❯ cordova create TMP
Creating a new cordova project.

~/projects/lab took 6s 
❯ cd TMP 

projects/lab/TMP is 📦 v1.0.0 via ⬢ v12.4.0 
❯ vim config.xml 

projects/lab/TMP is 📦 v1.0.0 via ⬢ v12.4.0 took 8s 
❯ cordova platform add ios@5.1.1
Using cordova-fetch for cordova-ios@5.1.1
Adding ios project...
Creating Cordova project for the iOS platform:
    Path: platforms/ios
    Package: io.cordova.hellocordova
    Name: HelloCordova
iOS project created with cordova-ios@5.1.1
Plugin 'cordova-plugin-whitelist' found in config.xml... Migrating it to package.json
Plugin 'cordova-plugin-facebook4' found in config.xml... Migrating it to package.json
Discovered saved plugin "cordova-plugin-whitelist". Adding it to the project
Installing "cordova-plugin-whitelist" for ios
Adding cordova-plugin-whitelist to package.json
Discovered saved plugin "cordova-plugin-facebook4". Adding it to the project
Installing "cordova-plugin-facebook4" for ios
Running command: pod install --verbose
     Cloning into '/var/folders/rb/6sy6s4156gn1k2r9nfjsx5mm0000gn/T/d20200112-4873-15zrk3c'...

     Note: checking out '003c46e80ad379bc1fc9748837c04dd57fbbbf50'.

     You are in 'detached HEAD' state. You can look around, make experimental
     changes and commit them, and you can discard any commits you make in this
     state without impacting any branches by performing another checkout.

     If you want to create a new branch to retain commits you create, you may

     do so (now or later) by using -b with the checkout command again. Example:

       git checkout -b <new-branch-name>

     Cloning into '/var/folders/rb/6sy6s4156gn1k2r9nfjsx5mm0000gn/T/d20200112-4873-1getr5p'...

     Note: checking out '003c46e80ad379bc1fc9748837c04dd57fbbbf50'.

     You are in 'detached HEAD' state. You can look around, make experimental
     changes and commit them, and you can discard any commits you make in this
     state without impacting any branches by performing another checkout.

     If you want to create a new branch to retain commits you create, you may
     do so (now or later) by using -b with the checkout command again. Example:

       git checkout -b <new-branch-name>

     Cloning into '/var/folders/rb/6sy6s4156gn1k2r9nfjsx5mm0000gn/T/d20200112-4873-1qn22ec'...

     Note: checking out '003c46e80ad379bc1fc9748837c04dd57fbbbf50'.

     You are in 'detached HEAD' state. You can look around, make experimental
     changes and commit them, and you can discard any commits you make in this
     state without impacting any branches by performing another checkout.

     If you want to create a new branch to retain commits you create, you may
     do so (now or later) by using -b with the checkout command again. Example:

       git checkout -b <new-branch-name>

[!] The `HelloCordova [Debug]` target overrides the `LD_RUNPATH_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-HelloCordova/Pods-HelloCordova.debug.xcconfig'. This can lead to problems with the CocoaPods installation

[!] The `HelloCordova [Release]` target overrides the `LD_RUNPATH_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-HelloCordova/Pods-HelloCordova.release.xcconfig'. This can lead to problems with the CocoaPods installation

Adding cordova-plugin-facebook4 to package.json

projects/lab/TMP is 📦 v1.0.0 via ⬢ v12.4.0 took 1m45s 
❯ 
peterpeterparker commented 4 years ago

Oh and also, see the iOS documentation https://github.com/jeduan/cordova-plugin-facebook4/tree/master/docs/ios

Chapter "Error: pod: Command failed with exit code 31"

peterpeterparker commented 4 years ago

Then your global POD installation, like sudo gem install cocoapods followed by pod setup like displayed in https://stackoverflow.com/a/41518456/5404186

In any case, as displayed above, you have a local issue none the plugin can solved. Good luck.

globules-io commented 4 years ago

Will keep digging Thanks for your time

kodeine commented 4 years ago

i am having the same issue. It happens when u install this plugin and some reason it cant install pod and it dies and kills the whole os add process too.

mlerena commented 4 years ago

cd project/platforms/ios then run pod install --repo-update

webkhushboo commented 3 years ago

I have followed all the above steps but I am still getting an error

Failed to install 'cordova-plugin-facebook4': Error: pod: Command failed with exit code 1
    at ChildProcess.whenDone (/Users/khushbooagrawal/desktop/work/projects/Raphael/app-customer/node_modules/cordova-common/src/superspawn.js:136:25)
    at ChildProcess.emit (events.js:315:20)
    at maybeClose (internal/child_process.js:1048:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
pod: Command failed with exit code 1
ir2pid commented 3 years ago

if you are using a recent pod version you need to update pod repo so the new versions can be installed.

pod repo update