I\'m trying to upload my app that uses ARKit (Unity build) to iTunes Connect for TestFlight distribution. While both exporting and uploading to app store processes from Xc
I had been experiencing same frustating problem and it happen almost all day , Xcode 9 suddenly crashes in the middle of the archiving process, resulting in the same error report.
@dangercheng gave me insight about archive process in xcode 9, which is, it needs the xattr command , therefore I go check xattr command in my macbook and somehow xattr doesn't work. From the verbose message, it reveals that the error is related to file permission owned by folders/files inside /Library/Python/2.7 . Somehow a user other than root has no right to write (w/ 2) on those files/folders.
From above facts I concluded that I need to change file permission in this case chmod -R 775 and apply it to all folders and its content on /Library/Python/2.7. After that my xattr is running well and my Archive process in Xcode 9 is running smoothly, experiencing no crash.
Thanks for all of you guys
run 'xattr' command in mac terminal,if result like bellow:
python version 2.7.10 can't run /usr/bin/xattr. Try the alternative(s):
/usr/bin/xattr-2.6 (uses python 2.6)
/usr/bin/xattr-2.7 (uses python 2.7)
Run "man python" for more information about multiple version support in
Mac OS X.
you should creat a new soft link to '/usr/bin/xattr-2.7' run bellow commands:
cd /usr/bin
sudo rm xattr
sudo ln -s xattr-2.7 xattr
this solve my problem!
I've had to uncheck all checkboxes and use manual managing signing, then it was possible to proceed in the wizard.
Does the xattr command line tool work? It's possible your python installation is damaged, or if you've replaced the installed xattr module then you may need to reinstall the system provided one.
In my case, it was due to permissions issues with python.
When running xattr from terminal I had the following error:
IOError: [Errno 13] Permission denied: '/Users/cb/Library/Python/2.7/lib/python/site-packages/zc.buildout-1.5.2-py2.7.egg-info/namespace_packages.txt'
Taking a look inside the /Users/cb/Library folder I found that all of the folders were owned by cb:staff (my currently logged in user and group) but the /Users/cb/Library/Python folder was owned by root:wheel
Running the following will eliminate the error:
sudo chown -R $USER:$(id -g) /Users/$USER/Library/Python
After the sudo chown you can run xattr again to verify. There should be no errors or other output from the xattr command.
I solved my problem following @dangercheng's answer.
I upgraded my python to python 3.6 two days ago.And it seems that the xattr command was executed under python3.6 .
However, when I execute xattr in terminal.
File "/usr/bin/xattr", line 31
continue
^
TabError: inconsistent use of tabs and spaces in indentation
Something bad happened!
So I edit the source code of xattr.
for i in g:
vers = vpat.search(i)
if vers is None:
continue //add 4 space
sys.stderr.write("%s (uses python %s)\n" % (i, i[vers.start():vers.end()]))
n = 1
``` python version 3.6.3 can't run /usr/bin/xattr. Try the alternative(s):
(Error: no alternatives found)
Run "man python" for more information about multiple version support in Mac OS X. ``` another error!
I guess the xattr command should judge the version of python and execute suitable codes and the code of python3 contains some error.
Finally I change the default version of python to python2.7 and replace softlink of xattr to xattr-2.7. It works.
Attention, when xcodebuild execute xattr command the path of python was "/usr/bin/python".
The path "/usr/bin/python" was softlink too.
So, I resolved this problem following this step.
Step1:
cd /usr/bin
Step2:
sudo rm python
sudo ln -s python2.7 python
Step3:
sudo rm xattr
sudo ln -s xattr-2.7 xattr
If you can not found python2.7 under "/usr/bin", please find another suitable python path such as "/Library/Frameworks/Python.framework/Versions/2.7" etc.