Apollo-ios: Command PhaseScriptExecution failed with a nonzero exit code ( on version 0.23.2)

Created on 14 May 2020  路  8Comments  路  Source: apollographql/apollo-ios

@designatednerd I ran this script.

SCRIPT_PATH="${PODS_ROOT}/Apollo/scripts"
cd "${SRCROOT}/${TARGET_NAME}"
"${SCRIPT_PATH}"/check-and-run-apollo-cli.sh schema:download --endpoint=https://gql.comany.com schema.json

I am getting the error like

/Users/prathapreddy/Library/Developer/Xcode/DerivedData/REVOS-cpexwcvpnnnggrfnrowqfmgwulfo/Build/Intermediates.noindex/REVOS.build/Debug-iphoneos/REVOS.build/Script-FB846B2E246D0B7C00017CC8.sh: line 4: /Users/prathapreddy/Documents/REVOS/Pods/Apollo/scripts/check-and-run-apollo-cli.sh: No such file or directory
Command PhaseScriptExecution failed with a nonzero exit code

If I add echo $(pwd) line next to the schema.json. Now, the error is gone. but, Schama.json file is not downloading.

Can you please help me with this issue?

Most helpful comment

I ran into the same issue with the version 0.21.0 and had to to upgrade to 0.23.3 and that fixed it for me. The run-bundled-codegen.sh was trying to download the zip file and it was giving a 404 not found. Try and upgrade to 0.23.3 version like @designatednerd mentioned above.

All 8 comments

The /Users/prathapreddy/Documents/REVOS/Pods/Apollo/scripts/check-and-run-apollo-cli.sh: No such file or directory error indicates that the check-and-run-apollo-cli.sh file is missing - this is probably because this file was replaced by run-bundled-codegen.sh. Please see the instructions for setting up a code generation build script with CocoaPods for details on the updated script.

For unrelated reasons I would recommend using 0.23.3 rather than 0.23.2 - this works around the issue outlined in #1177, and that workaround is the only change.

I'm getting what would appear to be a similar error by using the Codegen library:
image

It seems like something broke

I ran into the same issue with the version 0.21.0 and had to to upgrade to 0.23.3 and that fixed it for me. The run-bundled-codegen.sh was trying to download the zip file and it was giving a 404 not found. Try and upgrade to 0.23.3 version like @designatednerd mentioned above.

I ran into the same issue with the version 0.21.0 and had to to upgrade to 0.23.3 and that fixed it for me. The run-bundled-codegen.sh was trying to download the zip file and it was giving a 404 not found. Try and upgrade to 0.23.3 version like @designatednerd mentioned above.

I tried pod "Apollo", '~> 0.23.3' but, cocoa pods was unable to find this.. any ideas? I'm also getting a 404 error not found

@kenny-numerade make sure you do pod update Apollo to get that new version.

@srayhunter Oops, silly mistake. Forgot about that thanks! Also, seem to have fixed my 404 error.

@danieljvdm Are you continuing to see this error?

The /Users/prathapreddy/Documents/REVOS/Pods/Apollo/scripts/check-and-run-apollo-cli.sh: No such file or directory error indicates that the check-and-run-apollo-cli.sh file is missing - this is probably because this file was replaced by run-bundled-codegen.sh. Please see the instructions for setting up a code generation build script with CocoaPods for details on the updated script.

For unrelated reasons I would recommend using 0.23.3 rather than 0.23.2 - this works around the issue outlined in #1177, and that workaround is the only change.

I did pod update Apollo It is updated to 0.27.1 and this is my script

SCRIPT_PATH="${PODS_ROOT}/Apollo/scripts"
cd "${SRCROOT}/${TARGET_NAME}"
"${SCRIPT_PATH}"/run-bundled-codegen.sh schema:download --endpoint=https://companyname.com schema.json

Thanks @designatednerd this solution works for me.

Was this page helpful?
0 / 5 - 0 ratings