transistorsoft / cordova-background-geolocation-lt

The most sophisticated background location-tracking & geofencing module with battery-conscious motion-detection intelligence for iOS and Android.
http://www.transistorsoft.com/shop/products/cordova-background-geolocation
Other
655 stars 277 forks source link

Plugin fails to install with Error: pod: Command failed with exit code 31 #1381

Closed kevinmcody closed 1 year ago

kevinmcody commented 1 year ago

Your Environment

Expected Behavior

Plugin should not generate an error on install

Actual Behavior

plugin generates the following error:

Running command: pod install --verbose Failed to install 'cordova-background-geolocation-lt': Error: pod: Command failed with exit code 31 at ChildProcess.whenDone (/Users/bcgadmin/Documents/MobileResponder/DlanMobileResponder/node_modules/cordova-common/src/superspawn.js:136:25) at ChildProcess.emit (events.js:310: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 31

Steps to Reproduce

  1. Terminal: cordova plugin add cordova-background-geolocation-lt

Context

Install the plugin

Debug logs

Logs ``` bcgadmin@BCGs-Mac-mini DlanMobileResponder % cordova plugin add cordova-background-geolocation-lt Installing "cordova-background-geolocation-lt" for android Plugin dependency "cordova-plugin-background-fetch@7.1.2" already fetched, using that version. Dependent plugin "cordova-plugin-background-fetch" already installed on android. Subproject Path: CordovaLib Subproject Path: app Installing "cordova-background-geolocation-lt" for ios Plugin dependency "cordova-plugin-background-fetch@7.1.2" already fetched, using that version. Dependent plugin "cordova-plugin-background-fetch" already installed on ios. "framework" tag with type "podspec" is deprecated and will be removed. Please use the "podspec" tag. Running command: pod install --verbose Failed to install 'cordova-background-geolocation-lt': Error: pod: Command failed with exit code 31 at ChildProcess.whenDone (/Users/bcgadmin/Documents/MobileResponder/DlanMobileResponder/node_modules/cordova-common/src/superspawn.js:136:25) at ChildProcess.emit (events.js:310: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 31 ```
christocracy commented 1 year ago

The error is due to your build environment. Have you googled your error “ pod: Command failed with exit code 31”?

kevinmcody commented 1 year ago

I have. I actually ran across this closed Transistorsoft issue: https://github.com/transistorsoft/cordova-background-geolocation-lt/issues/1359

But alas, the suggestions there (restoring ffi and upgrading Ruby) did not fix the problem.

Do you know if there is a way to get more details on the exact failure? This error message is pretty generic.

christocracy commented 1 year ago

The error is related to you cocoapods version, I believe.

what is your pod —version?

kevinmcody commented 1 year ago

1.11.3

christocracy commented 1 year ago

Have you tried pod repo update?

Have you tried removing / re-adding your ios platform (cordova platform remove ios / cordova platform add ios)?

christocracy commented 1 year ago

What version XCode?

kevinmcody commented 1 year ago

I had not tried pod repo update

That seems to have worked, thank you!