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

The following build commands failed: PhaseScriptExecution [CP-User] #32951

Closed
link-zh opened this issue Jan 22, 2022 · 23 comments
Closed

The following build commands failed: PhaseScriptExecution [CP-User] #32951

link-zh opened this issue Jan 22, 2022 · 23 comments
Labels
Needs: Triage 🔍 Resolution: Locked This issue was locked by the bot.

Comments

@link-zh
Copy link

link-zh commented Jan 22, 2022

Description

    export VERSION_INFO_FILE\=FBReactNativeSpec_vers.c
    export VERSION_INFO_STRING\=\"@\(\#\)PROGRAM:FBReactNativeSpec\ \ PROJECT:Pods-\"
    export WRAP_ASSET_PACKS_IN_SEPARATE_DIRECTORIES\=NO
    export XCODE_APP_SUPPORT_DIR\=/Applications/Xcode.app/Contents/Developer/Library/Xcode
    export XCODE_PRODUCT_BUILD_VERSION\=13C100
    export XCODE_VERSION_ACTUAL\=1321
    export XCODE_VERSION_MAJOR\=1300
    export XCODE_VERSION_MINOR\=1320
    export XPCSERVICES_FOLDER_PATH\=/XPCServices
    export YACC\=yacc
    export arch\=undefined_arch
    export variant\=normal
    /bin/sh -c /Users/link/Library/Developer/Xcode/DerivedData/rnApp-blqornskbkxcupglcsclzbmwefcw/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-5F4C70EF7D90A5A5BDAEB404279F232A.sh
Command PhaseScriptExecution failed with a nonzero exit code


objc[40706]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x1fc18ab90) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1040482c8). One of the two will be used. Which one is undefined.
objc[40706]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x1fc18abe0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x104048318). One of the two will be used. Which one is undefined.
** BUILD FAILED **


The following build commands failed:
	PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/link/Library/Developer/Xcode/DerivedData/rnApp-blqornskbkxcupglcsclzbmwefcw/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-5F4C70EF7D90A5A5BDAEB404279F232A.sh (in target 'FBReactNativeSpec' from project 'Pods')

Version

0.67.1

Output of npx react-native info

System:
    OS: macOS 12.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 105.55 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.0.0 - ~/.nvm/versions/node/v16.0.0/bin/node
    Yarn: 1.22.17 - ~/.nvm/versions/node/v16.0.0/bin/yarn
    npm: 7.10.0 - ~/.nvm/versions/node/v16.0.0/bin/npm
    Watchman: 2022.01.03.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.11.2 - /opt/homebrew/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
    Android SDK: Not Found
  IDEs:
    Android Studio: Not Found
    Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
  Languages:
    Java: Not Found
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.0 => 17.0.0
    react-native: 0.67.1 => 0.67.1
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

After creating a new project pod install, there are times of errors in executing yarn ios, but it can work by executing sudo yarn ios

Snack, code example, screenshot, or link to a repository

No response

@link-zh
Copy link
Author

link-zh commented Jan 22, 2022

I downgraded react-native to 0.66.0 and it works

@link-zh link-zh closed this as completed Jan 22, 2022
@ObidosDev
Copy link

Same for me. 0.67.1 can not run on iOS

@demedos
Copy link

demedos commented Jan 27, 2022

Same for me. Base on this SO post it seems to have something to do with nvm. Running from Xcode works fine

System:
    OS: macOS 11.6.1
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 129.87 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 12.21.0 - ~/.nvm/versions/node/v12.21.0/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 6.14.11 - ~/.nvm/versions/node/v12.21.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.11.2 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 15.0, DriverKit 20.4, macOS 11.3, tvOS 15.0, watchOS 8.0
    Android SDK: Not Found
  IDEs:
    Android Studio: 2020.3 AI-203.7717.56.2031.7784292
    Xcode: 13.0/13A233 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.10 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2 
    react-native: 0.65.1 => 0.65.1 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

@ObidosDev
Copy link

@demedos this is not the same errors

@demedos
Copy link

demedos commented Jan 31, 2022

I ultimately fixed it thanks to this SO answer, which basically says to run nvm unalias default. It's not optimal but it worked.

@waterbang
Copy link

I downgraded react-native to 0.66.0 and it works

me too

@azeezWebsultanate
Copy link

Is this issue been resolved now? because I am facing the same

@demedos
Copy link

demedos commented Apr 12, 2022

A colleague told me that it's fixed with 0.68 since the find_node script which causes the problem is no longer used, but I didn't have time to check it myself.
In the meantime, you can run nvm unalias default on your terminal as a workaround

@quantuminformation
Copy link
Contributor

just come across this today after a massive console dump

2022-05-26 11:56:06.195 xcodebuild[90365:1538443] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-05-26 11:56:06.195 xcodebuild[90365:1538443] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
** BUILD FAILED **


The following build commands failed:
	PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/nikos/Library/Developer/Xcode/DerivedData/AwesomeProject-enxqxdyscvglarhlexamhbnfswqg/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-46EB2E00014D80.sh (in target 'FBReactNativeSpec' from project 'Pods')
(1 failure)```

pretty clueless atm how to fix, the expo project was working fine but not this new RN one

@Raphael2001
Copy link

just come across this today after a massive console dump

2022-05-26 11:56:06.195 xcodebuild[90365:1538443] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-05-26 11:56:06.195 xcodebuild[90365:1538443] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
** BUILD FAILED **


The following build commands failed:
	PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/nikos/Library/Developer/Xcode/DerivedData/AwesomeProject-enxqxdyscvglarhlexamhbnfswqg/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-46EB2E00014D80.sh (in target 'FBReactNativeSpec' from project 'Pods')
(1 failure)```

pretty clueless atm how to fix, the expo project was working fine but not this new RN one

Same Problem here

@quantuminformation
Copy link
Contributor

I switched back to expo lol

@taylorkline
Copy link

Cherry-picking 802b3f7 fixed the issue for a dev on my team who was stuck with this issue.

@Eronred
Copy link

Eronred commented Jun 7, 2022

I switched back to expo lol

I'm thinking to switch to Flutter bc of React native errors at the M1 chip lol

@quantuminformation
Copy link
Contributor

quantuminformation commented Jun 7, 2022 via email

@damusix
Copy link

damusix commented Jun 23, 2022

I switched back to expo lol

I'm thinking to switch to Flutter bc of React native errors at the M1 chip lol

Man I'm so close to diving into Flutter to see the difference it's not even funny. Making a consistently stable app is virtually impossible.

@mojvan
Copy link

mojvan commented Jul 12, 2022

I downgraded react-native to 0.66.0 and it works

It worked for me. Thank you so much

@michaelessiet
Copy link

I switched back to expo lol

I'm thinking to switch to Flutter bc of React native errors at the M1 chip lol

I'm already on flutter. I wanted to get on react native after a while of being away but these errors are starting to make me wish I never came back to react native

@hpardess
Copy link

hpardess commented Aug 25, 2022

Any fix to this issue..

cp: /Users/xyz/Documents/GitHub/myapp/ios/Pods/../../node_modules/react-native/React/FBReactNativeSpec/../../React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec.h: Permission denied
cp: /Users/xyz/Documents/GitHub/myapp/ios/Pods/../../node_modules/react-native/React/FBReactNativeSpec/../../React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec-generated.mm: Permission denied
Command PhaseScriptExecution failed with a nonzero exit code

** BUILD FAILED **
The following build commands failed:
        PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/xyz/Library/Developer/Xcode/DerivedData/myapp-fovgevrtkdlpficmruwfdufzlrwe/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-DC40985B772F29091C73F4E839633D55.sh
(1 failure)

@hpardess
Copy link

Any fix to this issue..

cp: /Users/xyz/Documents/GitHub/myapp/ios/Pods/../../node_modules/react-native/React/FBReactNativeSpec/../../React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec.h: Permission denied
cp: /Users/xyz/Documents/GitHub/myapp/ios/Pods/../../node_modules/react-native/React/FBReactNativeSpec/../../React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec-generated.mm: Permission denied
Command PhaseScriptExecution failed with a nonzero exit code

** BUILD FAILED **
The following build commands failed:
        PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/xyz/Library/Developer/Xcode/DerivedData/myapp-fovgevrtkdlpficmruwfdufzlrwe/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-DC40985B772F29091C73F4E839633D55.sh
(1 failure)

Finally I could solve this issue.

sudo chmod -R 775 ./node_modules
sudo chmod -R 775 ./ios
react-native link
react-native run-ios --simulator="iPhone 12"

@AzranAzwer
Copy link

nvm unalias default

This fixed my issue 👍
follow this : https://stackoverflow.com/a/63760780/10360166

@TonyFTannous
Copy link

TonyFTannous commented Sep 16, 2022

Hello, i need help

in my mac using xcode, everything go well, but when publishing using azure/pipeline, the build failed
before the vm in azure update (Updating readme file for macOS-11 version 20220906.1)
everything go well and no build failed

The following build commands failed:
PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/runner/Library/Developer/Xcode/DerivedData/myproject-hfznzxvrsqgfuzajavqfcfjkopph/Build/Intermediates.noindex/myproject.build/Dev-iphoneos/myproject-IOS.build/Script-00DD1BFF1BD5951E006B06BC.sh

**
in my xcode -> build phases -> bundle react native code and images:

export NODE_BINARY=node
../node_modules/react-native/scripts/react-native-xcode.sh
**

please any help

@shahidyousafxai
Copy link

I ultimately fixed it thanks to this SO answer, which basically says to run nvm unalias default. It's not optimal but it worked.

It solves my problem.

@omerkocer
Copy link

For my case:
If your project folder name called like "Example Project"
You must change it to "Example_Project"
Spaces are causen this error.

@facebook facebook locked as resolved and limited conversation to collaborators Jan 22, 2023
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jan 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Needs: Triage 🔍 Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests