Xcode - "Command PhaseScriptExecution failed with a nonzero exit code"

Hey guys,

Brand new aspiring audio programmer here.

I’m developing a plugin and for the last two weeks it’s been building and running perfectly. However, out of nowhere I started getting this “PhaseScriptExecution nonzero edit code” error:

Running codesign --verbose=4 --force --sign - "/Users/juan.guevara/Developer/JUCEProjects/JX11/Builds/MacOSX/build/Debug/NewProject.vst3"
/Users/xxx/Developer/JUCEProjects/JX11/Builds/MacOSX/build/Debug/NewProject.vst3: replacing existing signature
/Users/xxx/Developer/JUCEProjects/JX11/Builds/MacOSX/build/Debug/NewProject.vst3: signed bundle with Mach-O thin (arm64) [com.yourcompany.JX11]
JUCE v8.0.8
/Users/xxx/Library/Developer/Xcode/DerivedData/JX11-atyrjdproegffqexuezwnzrocyyd/Build/Intermediates.noindex/JX11.build/Debug/JX11 - VST3.build/Script-EADED7F6888A539DFEE803FC.sh: line 8: 56691 Trace/BPT trap: 5       "${CONFIGURATION_BUILD_DIR}/juce_vst3_helper" -create -version "1.0.0" -path "${CONFIGURATION_BUILD_DIR}/${WRAPPER_NAME}" -output "${CONFIGURATION_BUILD_DIR}/${WRAPPER_NAME}/Contents/Resources/moduleinfo.json"
Command PhaseScriptExecution failed with a nonzero exit code

Code-wise, the plugin seems to be building perfectly fine.

Hopefully one of you can help. This is all Chinese to me. Thanks a lot!

Currently using JUCE v8.0.8, Xcode 16.4 on MacOS Sequoia.

This is a little program that runs after the build completes and is used to add a JSON file to the VST3 bundle. This program has failed, which is why you get the error message.

Usually the reason this program fails is because there is a problem with your VST3. juce_vst3_helper tries to load it and scan it and something in your VST3 causes it to crash.

The way to solve this is to run juce_vst3_helper manually on your plug-in in the debugger and see where it goes wrong.

if you go to the build menu on Xcode and look at the log for the build, you should get output from the vst helper which should give you an indication as to where the crash occurred.