Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PhaseScriptExecution FAILED on iOS Build #33

Closed
frederiko-famobi opened this issue May 3, 2023 · 4 comments
Closed

PhaseScriptExecution FAILED on iOS Build #33

frederiko-famobi opened this issue May 3, 2023 · 4 comments

Comments

@frederiko-famobi
Copy link

While trying to build the version 0.7.9 on iOS, the following error appears:

▸ ** ARCHIVE FAILED **
▸ The following build commands failed:
▸ 	PhaseScriptExecution [CP-User]\ Build\ native\ dependencies /Users/expo/Library/Developer/Xcode/DerivedData/APP-epnliplejavjuvczkxfzgbxaosev/Build/Intermediates.noindex/ArchiveIntermediates/APP/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/dr-pogodin-react-native-static-server.build/Script-46EB2E00026A10.sh (in target 'dr-pogodin-react-native-static-server' from project 'Pods')
▸ (1 failure)
** ARCHIVE FAILED **
The following build commands failed:
	PhaseScriptExecution [CP-User]\ Build\ native\ dependencies /Users/expo/Library/Developer/Xcode/DerivedData/APP-epnliplejavjuvczkxfzgbxaosev/Build/Intermediates.noindex/ArchiveIntermediates/APP/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/dr-pogodin-react-native-static-server.build/Script-46EB2E00026A10.sh (in target 'dr-pogodin-react-native-static-server' from project 'Pods')
(1 failure)
Exit status: 65

I ran pod install and installed cmake while building with EAS Build.

Is there any reason why this error is happening?

@birdofpreyru
Copy link
Owner

birdofpreyru commented May 3, 2023

I don't know @frederiko-famobi , was it working for you before with previous library versions? Do you know at what version it broke? I guess, if you run the build & run without archiving, you should be able to see more info regarding the failed build step. Then, if it is an issue with EAS Build per se, we have #19 open, and on hold, because I don't officially support Expo yet; and if it is an issue with CMake detection, then we have #29 open, and on hold, because from all inputs I got on it so far, and what I see on my machine, I don't understand why ppl having such problem, and somebody should help explaining me it. And if it is a new issue, then let's discuss it further here.

@exotexot
Copy link

exotexot commented May 3, 2023

Must be an expo thing.
Building, archiving and submission to AppStore works fine for me on iOS.

@frederiko-famobi
Copy link
Author

Thanks for the reply @birdofpreyru and @exotexot, I will try to build locally and will let you know if the problem persists.
I am documenting every step for the Expo installation so I can contribute to the documentation of the library as soon as it's working fine.

@frederiko-famobi
Copy link
Author

frederiko-famobi commented May 4, 2023

A quick update: the reason why this error occurs was because of the cmake installation on EAS Build.

I had to change some config and this is how it should be done:

First I created a eas build pre install script, and add it on my package.json scripts:

  "scripts": {
    "eas-build-pre-install": "./pre-install",
    ...

And added the script file pre-install to my root folder with the following content:

#!/usr/bin/env bash

# This script will follow the script eas-build-pre-install located in package.json and will be executed before EAS Build runs npm install on the EAS Build platform.
echo "running pre install..."

if [[ "$EAS_BUILD_PLATFORM" == "android" ]]; then
 sudo apt-get install --yes cmake
elif [[ "$EAS_BUILD_PLATFORM" == "ios" ]]; then
 HOMEBREW_NO_AUTO_UPDATE=1 brew install cmake
fi

Also run: chmod 755 pre-install so the file can run on Expo servers.

And then, when running eas build, it will execute an extra step called "Pre-install Hook".
I also had to run the expo prebuild in my project so I expose the ios and android folders to modify it as required by the library.

So the EAS Build will skip the step Prebuild and use my local files depending on the platform.

I tested the local build and it was working fine too, with: eas build --platform ios --local

I can now build on EAS for both iOS and Android. Maybe it also solves #19.

Thank you and soon I will be adding all of this information and other ones to guide other users that wants to use Expo / EAS Build with this library in their projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants