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

IOS - Command PhaseScriptExecution failed with a nonzero exit code #311

Closed
9t96 opened this issue May 24, 2023 · 23 comments
Closed

IOS - Command PhaseScriptExecution failed with a nonzero exit code #311

9t96 opened this issue May 24, 2023 · 23 comments

Comments

@9t96
Copy link

9t96 commented May 24, 2023

I get "Command PhaseScriptExecution failed with a nonzero exit code" on Strip unused archs phase when building on Xcode 14.3.

sentry-cordova: v1.1.5

I check this and its ok: https://docs.sentry.io/platforms/javascript/guides/cordova/troubleshooting/?original_referrer=https%3A%2F%2Fwww.npmjs.com%2F

I tried the following workaround but doesnt work for me:
Originally posted by @RedEars in #160 (comment)

Also tried replacing the script to the suggestes on this issue, but only work for installing on devices, keeps failing when tryuing to Archive for example:
#29 (comment)

image

@9t96
Copy link
Author

9t96 commented Jun 13, 2023

There's something i could do about it? Thanks!

@pivalig
Copy link

pivalig commented Jun 16, 2023

Any updates?

@github-actions
Copy link

github-actions bot commented Jul 8, 2023

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@mayainle
Copy link

I have the same issue. Did you find a solution?

@igorsantos07
Copy link

This is happening to us as well...

Somewhere around the error output, it says this phase can be skipped by using SENTRY_SKIP_FRAMEWORK_PATCH=true before the build command you're running (which seems to have been originated at getsentry/sentry-wizard#39). This did the trick for me, but I'm unsure if this will cause trouble when we submit the app to iTunes Connect.

Thus, also waiting for a final solution from maintainers.

@northkode
Copy link

same issue
Sentry.framework/Sentry: No such file or directory
Command PhaseScriptExecution failed with a nonzero exit code

@igorsantos07
Copy link

Funny, that file indeed doesn't seem to exist after the build fails, but during it, it exists: adding if [ -f "$FRAMEWORK_EXECUTABLE_PATH" ] inside the for has no effect.

@northkode
Copy link

northkode commented Jul 14, 2023

Have you been able to successfully archive a build?
My build works to run it, but i can't archive it to submit to apple. @igorsantos07

@igorsantos07
Copy link

I don't have the privileges in the company to do it, so I didn't reach this step hahah
However, given the links I posted in the previous comment, I guess it indeed wouldn't work. I think we'll need to sit and wait for some Sentry staff to find this issue. Maybe it's worth opening a support ticket mentioning this issue?

@lucas-zimerman
Copy link
Collaborator

lucas-zimerman commented Jul 26, 2023

sorry for the late response, I will take a look at it.

@9t96 are you facing this issue on a Mac M1 or X86/X64?

@9t96
Copy link
Author

9t96 commented Jul 26, 2023

sorry for the late response, I will take a look at it.

@9t96 are you facing this issue on a Mac M1 or X86/X64?

No, im using Macbook Pro 2020 with Intel chip

@northkode
Copy link

I'm on m1 and this happens

@fbfdsouza
Copy link

fbfdsouza commented Jul 31, 2023

any updates on here?

I don't know if this can shed some light on the issue, but for me in relation to these two paths.

lipo -extract arm64 myproject_folder/platforms/ios/ProjectName/Plugins/sentry-cordova/Sentry.xcframework/ios-arm64/Sentry.framework/Sentry -output ~/Desktop/arm64_file

this I get the error: must be a fat file when the -extract option is specified

lipo -extract arm64 myproject_folder/platforms/ios/ProjectName/Plugins/sentry-cordova/Sentry.xcframework/ios-arm64_x86_64-simulator/Sentry.framework/Sentry -output ~/Desktop/arm64_file

image

and this works.

but the second one seems to be related to the binaries that are meant to the simulator since the folder is named ios-arm64_x86_64-simulator and the first one for the device build with folder name guess ios-arm64?

OBS: I couldn't find the ones related to the xcode path, these are from my local cordova react project after runing the build command.

@northkode
Copy link

Any updates? This blocks any Apple submission..

@lucas-zimerman
Copy link
Collaborator

Still checking it.

@mafikes
Copy link

mafikes commented Aug 10, 2023

The same problem. M1. cordova 12 ios: 7.0.0

@igorsantos07
Copy link

I was also facing this issue from an Intel Mac Mini 2020 (2019?).

@HappyTepid
Copy link

@lucas-zimerman do you have any update on this? I'm facing the possibility of having to remove Sentry from an iOS app just to be able to make releases

@northkode
Copy link

northkode commented Sep 4, 2023

We have already removed sentry, the lack of support and change on this thread as made us lose confidence in there solutions.
It completely stops any IOS building to the app store and they seem to not really care.

@lucas-zimerman
Copy link
Collaborator

lucas-zimerman commented Sep 4, 2023

@lucas-zimerman do you have any update on this? I'm facing the possibility of having to remove Sentry from an iOS app just to be able to make releases

Does previous versions works for you? There's a fix being worked on it but lots of changes internally so it was being validated.

EDIT: are you able to build it by altering the last lines on Sentry strip unused archs from framework

for:
rm "$FRAMEWORK_EXECUTABLE_PATH" || true mv "$FRAMEWORK_EXECUTABLE_PATH-merged" "$FRAMEWORK_EXECUTABLE_PATH" || true
?

@gabn88
Copy link

gabn88 commented Nov 3, 2023

@lucas-zimerman

I changed the lines and the build did continue.

But now I have:

Failed to verify code signature of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.ujoouV/extracted/My.app/Frameworks/Sentry.framework : 0xe800801c (No code signature found.

@lucas-zimerman
Copy link
Collaborator

@gabn88 have you tried the latest release of Sentry Cordova?

@lucas-zimerman
Copy link
Collaborator

closing as completed, if the same persist, feel free to open a new issue.

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

No branches or pull requests