I am getting Error while running Project:
file:///Users/AVC/Documents/Simon%20Projects/DemoApp/bin/xcodeproj-checker-config-permissive.yml
ln: /Users/AVC/Documents/Simon Projects/DemoApp/.git/hooks/pre-commit: File exists
Command PhaseScriptExecution failed with a nonzero exit code
My XCode Version: 13.0
Swift Vdersion: 4.2
Tried lot of ways But cant find solution.
Remove .git/hooks/pre-commit
That is just a alias and the original file can not be created due to this. script creates new pre-commit file and it's alias at run time.
Related
After updating to Xcode 13.3.1 and updating comand line tools I cannot build my project. I get error:
Command PhaseScriptExecution failed with a nonzero exit code
python -mjson.tool ./someFileName.json
xargs: python: No such file or directory
Command PhaseScriptExecution failed with a nonzero exit code
The script that failes is:
python -mjson.tool "${TARGET_BUILD_DIR}/${WRAPPER_NAME}/assets/someFileName.json"
It was working fine before. Even if I checkout at the commit that was working I still get the same message. This is why I suspect Xcode update.
Does anyone know how to solve this? What does the error mean? What does No such file or directory refer to? Is Python missing (cannot be found)? what is mjson.tool and is it missing? Is someFileName.json missing?
Any help is appreciated :)
Let me answer my own question here :)
MacOS 12.3.1 Monterey dropped support for Python 2 and it is removed from the OS. That is what
xargs: python: No such file or directory
was trying to say to me - python is missing. Fortunately Python 3 is installed and you can access it by calling python3 instead of just python.
Be ware because python2 code is not always runnable on Python3. Chances are you will need to fix (update) the code.
I was lucky and I managed to fix this just by replacing python with python3.
Alternatively you could try to install python2 by hand but this is not recommended.
I'm making an app on flutter, but for some reason when i try to build my app and run it on my device i'm getting this error below.
/bin/sh: /Users/maps/Desktop/flutter/bin/packages/flutter_tools/bin/xcode_backend.sh: No such file or directory
Command PhaseScriptExecution failed with a nonzero exit code
I tried to:
Update sdk path because i transfer the project from a windows PC to my macbook
Cleaning and re-building the project
Deleting Pods folder and podfile.lock file and running pod install again
But none of these solutions worked for me.
Note: I'm beginner on Flutter development :-)
I am trying build an IOS app written in ReactNative. The application written using XCode 11.4. Then I got a new Macbook with XCode version 12.5 installed. So I cloned the project from the git and run npm install and tried to run the project using XCode. Then I got the following error.
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
I checked any issues as suggested by the accepted answer in this link,https://stackoverflow.com/questions/10373016/command-xcode-app-contents-developer-toolchains-xcodedefault-xctoolchain-usr-bi. But there is nothing wrong with it.
Also, I tried cleaning the project and building the project again. It did not solve the problem as well.
Then I tried deleting the project targets that are for tests well and tried to clean and build the project again. But it did not work either.
I tried deleting everything in the Derived Data folder and tried building the project again as well. It did not work either.
When expand the log, this is the error I am seeing.
In file included from /Users/xandasupport/Desktop/Wais/PCL/pcl-app/node_modules/react-native/ReactCommon/jsi/JSIDynamic.cpp:6:
In file included from /Users/xandasupport/Desktop/Wais/PCL/pcl-app/node_modules/react-native/ReactCommon/jsi/JSIDynamic.h:8:
/Users/xandasupport/Desktop/Wais/PCL/pcl-app/node_modules/react-native/React/../third-party/folly-2018.10.22.00/folly/dynamic.h:63:10: fatal error: 'boost/operators.hpp' file not found
#include <boost/operators.hpp>
^~~~~~~~~~~~~~~~~~~~~
1 error generated.
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
Why am I getting that error and I can I possibly fix it?
I'm installing a new project with a bunch of modules with React Native 0.64. I can do a pod install without troubles, but when I want to make my app running (with react-native run-ios or with XCode) this error occured on XCode :
/Users/thomas/Desktop/Dev/Mobile/appname/node_modules/react-native/scripts/generate-specs.sh: line 27: readlink: command not found
/Users/thomas/Desktop/Dev/Mobile/appname/node_modules/react-native/scripts/generate-specs.sh: line 27: dirname: command not found
/Users/thomas/Desktop/Dev/Mobile/appname/node_modules/react-native/scripts/generate-specs.sh: line 27: cd: : No such file or directory
Command PhaseScriptExecution failed with a nonzero exit code
This one on react-native run-ios :
The following build commands failed:
PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/thomas/Library/Developer/Xcode/DerivedData/appname-aqbmfgqjkshyqmaprdvggqaeqjrp/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/**FBReactNativeSpec**.build/Script-A319AA7F2B7AAE771AE63D66A0049241.sh
Note that I don't have a 'scripts' folder in my node_modules/react-native (I just have assets, normalize-color and polyfills folders). I've tried to remove node-modules and reinstall it.
My specs are :
iOS Big Sur v. 11.2.3
XCode v.12.3
React Native v.0.64
CocoaPods v. 1.10.1
Node v. 12.14.1
Any help ? Thanks.
I found the solution after hours of debugging you need to modify this file for now.
Edit this file /node_modules/react-native/React/FBReactNativeSpec/../../scripts/generate-specs.sh
Add this line export PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin
Then run the project using Xcode it will work 100%
The above answer is correct but in that case, you are editing the inside the node modules. So rather than just enter this command in your terminal
export PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin
Whenever I try to Create NSManagedObject Subclass for my Core Data Entity. However as soon as I do this I get this error:
Command
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc
failed with exit code 1
As you can see it talks about a swiftc file within Xcode itself. So I found this file and deleted it an tried to replace it but I still get the same error.
Here's what I've tried:
Deleting Xcode & Reinstalling
Removing the Command Line Tools & Reinstalling Xcode
Removing the File and Trying to recreate it
Is it because the file there has no code? What should I do?
swiftc is the swift compiler. That error is saying that the swift compiler encountered and error and failed returning an exit code of 1.
Go to the Report Navigator (cmd 9) and choose the build to see the whole error.