Pro packaging crashes with onesignal-cordova plugin error

Ionic pro packaging service has started to give errors regarding onesignal-cordova plugin for ios packages again. Our previous package was passed with no errors and we didn’t make any changes on the plugins.

Anybody facing this issue?

Fetching plugin “onesignal-cordova-plugin@^2.2.4” via npm
Installing “onesignal-cordova-plugin” for ios
Failed to install ‘onesignal-cordova-plugin’: Error: pod: Command failed with exit code 31
at ChildProcess.whenDone (/Users/ionic/builds/project-1/platforms/ios/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
Failed to restore plugin “onesignal-cordova-plugin” from config.xml. You might need to try adding it again. Error: Error: pod: Command failed with exit code 31
–save flag or autosave detected

1 Like

We are having the same problem.

Here’s the answer that I’ve received from Ionic official supoort;

Thanks for reaching out to the Ionic Pro support team.

Sorry you’re having trouble. OneSignal recommends sticking to version 2.1.0 when using Ionic Pro. As you can see there’s a problem with with cocoapods. Our team is looking into the issue but this appears to be a fundamental problem with cordova-ios.

https://issues.apache.org/jira/browse/CB-12582?jql=text%20~%20"lGoogleToolboxForMac"

In the near term I’d suggest reverting to 2.1.0. You can make the following changes to lock the version at 2.1.0.

package.json
replace:
“onesignal-cordova-plugin”: “^2.2.4”,
with:
“onesignal-cordova-plugin”: “2.1.0”,

config.xml
replace:

with:

2 Likes

I have the same problem right now.
Downgrading one-signal-cordova isn’t an option anymore. Building with newer android platform versions (7.0+) fails with version 2.1.0.

But i found this support posting:

But i am getting an other error:

[13:31:34]: ------------------------------------------------
[13:31:34]: --- Step: cordova platform add ios --nofetch ---
[13:31:34]: ------------------------------------------------
[13:31:34]: $ cordova platform add ios --nofetch
[13:31:36]: ▸ Running command: /Users/ionic/builds/project-1/update_pods.sh /Users/ionic/builds/project-1
[13:31:36]: ▸ Error: spawn EACCES
[13:31:37]: -------------------------
[13:31:37]: --- Step: upload_logs ---
[13:31:37]: -------------------------
[13:31:37]: ---------------------------
[13:31:37]: --- Step: shell command ---
[13:31:37]: ---------------------------
[13:31:37]: -----------------------------
[13:31:37]: --- Step: delete_keychain ---
[13:31:37]: -----------------------------
[13:31:37]: Exit status of command 'cordova platform add ios --nofetch' was 1 instead of 0.
Running command: /Users/ionic/builds/project-1/update_pods.sh /Users/ionic/builds/project-1
Error: spawn EACCES

// edit
my fault. the git permission flag wasn’t committed

I am having this issue but my package in ionic pro does not find the update_pods.sh that i reference in config.xml with this:

<platform name="ios">
    <hook src="update_pods.sh" type="before_platform_add" />
    <hook src="run_pods.sh" type="after_platform_add" />

i did:

update_pods.sh

#!/bin/bash
pod repo update

run_pods.sh

#!/bin/bash
pod install --project-directory='./platforms/ios/'

but the run_pods.sh and update_pods.sh are not in my project directory.

and this is what a i got:

Sending stats

Pod installation complete! There are 0 dependencies from the Podfile and 0 total pods installed.


[!] The Podfile does not contain any dependencies.

Updating ios build to use workspace.
Adding schemes
Error: Cannot find module '../../node_modules/xcode'

did you solve it ? I am still stucked !!

in appFlow its running but still pods issue arising

did you solve it ? I am still stucked !!

in appFlow its running but still pods issue arising

hummmmmmm