Often times on the first attempt to build my plugins, Xcode gives an error: “Command PhaseScriptExecution failed with a nonzero exit code” that has something to do with Python script not finding something. Example:
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plistlib.py", line 406, in parse
parser.ParseFile(fileobj)
xml.parsers.expat.ExpatError: no element found: line 1, column 0
Command PhaseScriptExecution failed with a nonzero exit code
If I immediately click on Build a second time the project builds perfectly without any further errors.
Any idea what is causing that? Why does it fail the first time but then succeed immediately afterwards? Anyone else experienced this?
Copying resources …
copying slider-handle.png to /Library/Audio/Plug-Ins/VST/IPlugControls.vst/Contents/Resources
copying knob-rotate.png to /Library/Audio/Plug-Ins/VST/IPlugControls.vst/Contents/Resources
copying slider-track.png to /Library/Audio/Plug-Ins/VST/IPlugControls.vst/Contents/Resources
copying slider-track@2x.png to /Library/Audio/Plug-Ins/VST/IPlugControls.vst/Contents/Resources
copying hslider-track.svg to /Library/Audio/Plug-Ins/VST/IPlugControls.vst/Contents/Resources
copying switch@2x.png to /Library/Audio/Plug-Ins/VST/IPlugControls.vst/Contents/Resources
copying hslider-handle.svg to /Library/Audio/Plug-Ins/VST/IPlugControls.vst/Contents/Resources
copying slider-track.svg to /Library/Audio/Plug-Ins/VST/IPlugControls.vst/Contents/Resources
copying font@2x.png to /Library/Audio/Plug-Ins/VST/IPlugControls.vst/Contents/Resources
copying slider-handle@2x.png to /Library/Audio/Plug-Ins/VST/IPlugControls.vst/Contents/Resources
copying knob.png to /Library/Audio/Plug-Ins/VST/IPlugControls.vst/Contents/Resources
copying slider-handle.svg to /Library/Audio/Plug-Ins/VST/IPlugControls.vst/Contents/Resources
copying knob@2x.png to /Library/Audio/Plug-Ins/VST/IPlugControls.vst/Contents/Resources
copying font.png to /Library/Audio/Plug-Ins/VST/IPlugControls.vst/Contents/Resources
copying vector-knob.svg to /Library/Audio/Plug-Ins/VST/IPlugControls.vst/Contents/Resources
copying switch.png to /Library/Audio/Plug-Ins/VST/IPlugControls.vst/Contents/Resources
copying button@2x.png to /Library/Audio/Plug-Ins/VST/IPlugControls.vst/Contents/Resources
copying knob-rotate@2x.png to /Library/Audio/Plug-Ins/VST/IPlugControls.vst/Contents/Resources
copying button.png to /Library/Audio/Plug-Ins/VST/IPlugControls.vst/Contents/Resources
copying Roboto-Regular.ttf to /Library/Audio/Plug-Ins/VST/IPlugControls.vst/Contents/Resources
copying fontaudio.ttf to /Library/Audio/Plug-Ins/VST/IPlugControls.vst/Contents/Resources
copying forkawesome-webfont.ttf to /Library/Audio/Plug-Ins/VST/IPlugControls.vst/Contents/Resources
Processing Info.plist files…
Traceback (most recent call last):
File “…/scripts/prepare_resources-mac.py”, line 209, in
main()
File “…/scripts/prepare_resources-mac.py”, line 60, in main
vst3 = plistlib.readPlist(plistpath)
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plistlib.py”, line 78, in readPlist
rootObject = p.parse(pathOrFile)
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plistlib.py”, line 406, in parse
parser.ParseFile(fileobj)
xml.parsers.expat.ExpatError: no element found: line 1, column 0
Command PhaseScriptExecution failed with a nonzero exit code
SOLVED - the problem was that I had Xcode Advanced project settings “Build Location” set to “Xcode Default”. I changed that setting to “Legacy” and the problem does not occur. (In iPlug1 I had to use the opposite - Xcode Default - for some reason, Legacy caused issues).
This is a setting for all of Xcode. I also regularly see this issue on Xcode 9 - the python often fails. In the past of turned off parallel builds to reduce this error, but would be good if we could fix it.
Hallo everybody,
Ihm still new here and with iplug2.
Ive followed the Hints on 01_Getting_started_mac_ios but when I try to build, I got an error “Command PhaseScriptExecution failed with a nonzero exit code”
“plistlib.InvalidFileException: Invalid file”
Working an MacOS 12.7.3 and Xcode 14.2
What´s wrong?
Ette
The problem is with the plist files. If you have already built the plugin once before sometimes the existing plist files in those builds prevents writing new ones when you try to compile again. Go to wherever your plugin files are being created (Pro Tools Plugins folder, Plugins components folder, etc.) and DELETE the previously plugin(s) from the previous build. Also make sure to “Clean” your Xcode project between builds.