react-native icon indicating copy to clipboard operation
react-native copied to clipboard

PhaseScriptExecution [CP-User]\ Generate\ Specs

Open vachterberg1 opened this issue 3 years ago • 29 comments

Description

Hello, guys. I am currently having a problem running my app build on iOS. I've followed a few tutorials here on git about but none of them were effective. Every time I try to install the pods along the way:

cd ios > pod deintegrate && pod install --repo-update

There is an installation of only 87 of 89 pods, missing ExpoModulesCore and FBReactNativeSpec, the pod installation log will follow below.

After installing the pods and I try to run the command:

yarn run:ios:staging (project specific but would be the same as npx react-native run-ios), it returns the following error:

Build error:

`objc[24913]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x1edc1bb78) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1181302c8). One of the two will be used. Which one is undefined. objc[24913]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x1edc1bbc8) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x118130318). One of the two will be used. Which one is undefined. ** BUILD FAILED **

The following build commands failed: PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/viniciusachterberg/Library/Developer/Xcode/DerivedData/AgrinessPresence-aatyymmaxydmoqfhtgtytzoqepin/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-48ABC94909B35DCD398CB750635A0D8D.sh (1 failure)`

Pod install log: ⚠️ Cannot resolve the path to "@babel/plugin-syntax-typescript" package. ⚠️ Cannot resolve the path to "@babel/register" package. ⚠️ Cannot resolve the path to "@babel/preset-flow" package. ⚠️ Cannot resolve the path to "@babel/preset-typescript" package. ⚠️ Cannot resolve the path to "@babel/register" package. ⚠️ Cannot resolve the path to "babel-core" package. Using Expo modules Auto-linking React Native modules for target AgrinessPresence: BVLinearGradient, CodePush, RNCAsyncStorage, RNCCheckbox, RNCMaskedView, RNCPicker, RNDateTimePicker, RNFS, RNFileViewer, RNGestureHandler, RNImageCropPicker, RNReanimated, RNSVG, RNScreens, RNSentry, RNShare, RNVectorIcons, react-native-config, react-native-flipper, react-native-geolocation-service, react-native-get-random-values, react-native-netinfo, react-native-safe-area-context, and rn-fetch-blob Updating local specs repositories Analyzing dependencies Fetching podspec for DoubleConversion from ../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec Fetching podspec for RCT-Folly from ../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec Fetching podspec for glog from ../node_modules/react-native/third-party-podspecs/glog.podspec Downloading dependencies Installing Amplitude (6.0.0) Installing BVLinearGradient (2.5.6) Installing Base64 (1.1.2) Installing CocoaAsyncSocket (7.6.5) Installing CodePush (7.0.1) Installing DoubleConversion (1.1.6) Installing EXAmplitude (11.1.1) Installing EXApplication (4.0.2) Installing EXBarCodeScanner (11.2.1) Installing EXConstants (13.0.2) Installing EXFileSystem (13.1.4) Installing EXFont (10.0.5) Installing EXImageLoader (3.1.1) Installing EXImagePicker (12.0.2) Installing EXKeepAwake (10.0.2) Installing EXMediaLibrary (14.0.1) Installing EXNotifications (0.14.1) Installing EXSharing (10.1.1) Installing Expo (44.0.6) Installing ExpoLinearGradient (11.0.3) Installing ExpoModulesCore (0.6.5) Installing FBLazyVector (0.64.3) Installing FBReactNativeSpec (0.64.3) Installing Flipper (0.75.1) Installing Flipper-DoubleConversion (1.1.7) Installing Flipper-Folly (2.5.3) Installing Flipper-Glog (0.3.6) Installing Flipper-PeerTalk (0.0.4) Installing Flipper-RSocket (1.3.1) Installing FlipperKit (0.75.1) Installing JWT (3.0.0-beta.14) Installing OpenSSL-Universal (1.1.180) Installing RCT-Folly (2020.01.13.00) Installing RCTRequired (0.64.3) Installing RCTTypeSafety (0.64.3) Installing RNCAsyncStorage (1.15.17) Installing RNCCheckbox (0.5.8) Installing RNCMaskedView (0.1.10) Installing RNCPicker (1.16.8) Installing RNDateTimePicker (3.0.4) Installing RNFS (2.18.0) Installing RNFileViewer (2.1.4) Installing RNGestureHandler (1.8.0) Installing RNImageCropPicker (0.35.1) Installing RNReanimated (1.13.1) Installing RNSVG (12.1.0) Installing RNScreens (2.11.0) Installing RNSentry (2.6.0) Installing RNShare (7.2.1) Installing RNVectorIcons (8.1.0) Installing React (0.64.3) Installing React-Core (0.64.3) Installing React-CoreModules (0.64.3) Installing React-RCTActionSheet (0.64.3) Installing React-RCTAnimation (0.64.3) Installing React-RCTBlob (0.64.3) Installing React-RCTImage (0.64.3) Installing React-RCTLinking (0.64.3) Installing React-RCTNetwork (0.64.3) Installing React-RCTSettings (0.64.3) Installing React-RCTText (0.64.3) Installing React-RCTVibration (0.64.3) Installing React-callinvoker (0.64.3) Installing React-cxxreact (0.64.3) Installing React-jsi (0.64.3) Installing React-jsiexecutor (0.64.3) Installing React-jsinspector (0.64.3) Installing React-perflogger (0.64.3) Installing React-runtimeexecutor (0.64.3) Installing ReactCommon (0.64.3) Installing SSZipArchive (2.2.3) Installing Sentry (7.0.0) Installing TOCropViewController (2.6.1) Installing UMTaskManagerInterface (7.1.1) Installing Yoga (1.14.0) Installing YogaKit (1.18.1) Installing ZXingObjC (3.6.5) Installing boost-for-react-native (1.63.0) Installing glog (0.3.5) Installing libevent (2.1.12) Installing react-native-config (1.4.3) Installing react-native-flipper (0.104.0) Installing react-native-geolocation-service (5.3.0-beta.3) Installing react-native-get-random-values (1.5.0) Installing react-native-netinfo (5.9.7) Installing react-native-safe-area-context (3.2.0) Installing rn-fetch-blob (0.12.0) Generating Pods project Integrating client project ⚠️ Cannot resolve the path to "@babel/plugin-syntax-typescript" package. ⚠️ Cannot resolve the path to "@babel/register" package. ⚠️ Cannot resolve the path to "@babel/preset-flow" package. ⚠️ Cannot resolve the path to "@babel/preset-typescript" package. ⚠️ Cannot resolve the path to "@babel/register" package. ⚠️ Cannot resolve the path to "babel-core" package. ⚠️ Cannot resolve the path to "@babel/plugin-syntax-typescript" package. ⚠️ Cannot resolve the path to "@babel/register" package. ⚠️ Cannot resolve the path to "@babel/preset-flow" package. ⚠️ Cannot resolve the path to "@babel/preset-typescript" package. ⚠️ Cannot resolve the path to "@babel/register" package. ⚠️ Cannot resolve the path to "babel-core" package. ⚠️ Cannot resolve the path to "@babel/plugin-syntax-typescript" package. ⚠️ Cannot resolve the path to "@babel/register" package. ⚠️ Cannot resolve the path to "@babel/preset-flow" package. ⚠️ Cannot resolve the path to "@babel/preset-typescript" package. ⚠️ Cannot resolve the path to "@babel/register" package. ⚠️ Cannot resolve the path to "babel-core" package. expo_patch_react_imports! took 0.1672 seconds to transform files. Pod installation complete! There are 89 dependencies from the Podfile and 87 total pods installed.

If I create a new project and run the default commands to start my project, everything works on.

Version

0.64.0

Output of npx react-native info

System: OS: macOS 11.6 CPU: (8) arm64 Apple M1 Memory: 149.36 MB / 8.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 14.20.0 - /opt/homebrew/opt/node@14/bin/node Yarn: 1.22.19 - /opt/homebrew/bin/yarn npm: 6.14.17 - /opt/homebrew/opt/node@14/bin/npm Watchman: 2022.07.04.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.3 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4 Android SDK: API Levels: 30 System Images: android-30 | Google Play ARM 64 v8a Android NDK: Not Found IDEs: Android Studio: Not Found Xcode: 12.5/12E262 - /usr/bin/xcodebuild Languages: Java: 1.8.0_292 - /Users/viniciusachterberg/.jenv/shims/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.1 => 17.0.1 react-native: 0.64.3 => 0.64.3 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Steps to reproduce

.

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

.

vachterberg1 avatar Jul 25 '22 13:07 vachterberg1

Same here! Did you find any solution yet?

shkumbinhasani avatar Aug 23 '22 20:08 shkumbinhasani

I'm facing same issue .

Output of npx react-native info

System: OS: macOS 12.5.1 CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz Memory: 988.41 MB / 16.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 16.15.0 - /usr/local/bin/node Yarn: 1.22.10 - /opt/local/bin/yarn npm: 8.19.2 - /usr/local/bin/npm Watchman: 2022.09.19.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.3 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0 Android SDK: API Levels: 29, 30, 31 Build Tools: 28.0.3, 29.0.2, 30.0.2, 30.0.3, 32.0.0 System Images: android-30 | Google APIs Intel x86 Atom, android-31 | Google APIs Intel x86 Atom_64 Android NDK: Not Found IDEs: Android Studio: 2021.1 AI-211.7628.21.2111.8139111 Xcode: 14.0/14A309 - /usr/bin/xcodebuild Languages: Java: 1.8.0_275 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.1 => 17.0.1 react-native: 0.64.2 => 0.64.2 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Solaimanx avatar Sep 20 '22 08:09 Solaimanx

Any solutions yet?

Basir-PD avatar Oct 19 '22 18:10 Basir-PD

Any solutions yet?

i was able to solve by running $ nvm unalias default

StackOverflow - https://stackoverflow.com/a/74007424/15266718

Solaimanx avatar Oct 20 '22 02:10 Solaimanx

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Apr 18 '23 06:04 github-actions[bot]

Any working Solution on this ???

tdammy92 avatar May 28 '23 21:05 tdammy92

Any working Solution on this ???

did you found a solution bro ?

Youssef-Durgham avatar May 30 '23 08:05 Youssef-Durgham

+1

MuriloBarranco avatar Jun 05 '23 20:06 MuriloBarranco

I was able to solve this by deleting the .nvm folder because I don't need it in my project. restart xCode & rebuild my project.

If you still need nvm, try running this to check the version of nvm nvm --version

Note: Sometimes switching to older or newer versions might work for your project

Here's a reference on how to use nvm 🚀 https://www.linode.com/docs/guides/how-to-install-use-node-version-manager-nvm/

CyborgCodes avatar Jun 13 '23 03:06 CyborgCodes

I was able to solve this by deleting the .nvm folder because I don't need it in my project. restart xCode & rebuild my project.

If you still need nvm, try running this to check the version of nvm nvm --version

Note: Sometimes switching to older or newer versions might work for your project

Here's a reference on how to use nvm 🚀 https://www.linode.com/docs/guides/how-to-install-use-node-version-manager-nvm/

@CyborgCodes nvm folder inside a react-native project ?, am lost isnt that seating in system file ?

tdammy92 avatar Jun 16 '23 13:06 tdammy92

Yes in the system file, sorry for the confusion.

CyborgCodes avatar Jun 16 '23 13:06 CyborgCodes

Yes in the system file, sorry for the confusion.

I dont use nvm on my mac, but i still get the issue. works fine starting android , just ios i think it got to do with cocoapods installation, Will keep searching for a fix,

tdammy92 avatar Jun 16 '23 13:06 tdammy92

Hi, for me what it works was to review that my workspace folder don't have special characters or empty spaces, npx react-native don't like that

mikeangeloo avatar Jun 17 '23 17:06 mikeangeloo

I was using nodenv, so I uninstall it. And install node via HomeBrew. That changes an error, and it works.

RyutoYoko avatar Jun 21 '23 00:06 RyutoYoko

I'm facing the same issue I have tried to remove nvm but still I'm not able to build

roo12312 avatar Aug 30 '23 20:08 roo12312

Me to, not working in even after removing nvm and delete all folders

Manikanta-GEP avatar Sep 12 '23 10:09 Manikanta-GEP

Me to, not working in even after removing nvm and delete all folders

Make sure to not have any spaces in the directory name.. it worked for me

roo12312 avatar Sep 12 '23 11:09 roo12312

For me it worked with brew uninstall nvm

Manikanta-GEP avatar Sep 12 '23 11:09 Manikanta-GEP

I removed spaces and special characters from the path of my RN project. After that, I succeeded in running the iOS app.

Good luck!

WayneKim92 avatar Oct 24 '23 15:10 WayneKim92

I was getting the same error and the solution was to replace ios/.xcode.env.local contents, which in my case was:

export NODE_BINARY=/private/var/folders/3y/swkjq1x101b76mzjgt4pm2d80000gp/T/xfs-9b9b4fa3/node

with ios/.xcode.env contents:

export NODE_BINARY=$(command -v node)

after which the errors magically disappeared.

wojtekmaj avatar Dec 19 '23 14:12 wojtekmaj

I'm using nvm and I had this issue in two of my projects. For both the issue went away after I changed the Node binary to the absolute path:

export NODE_BINARY=/Users/MyUser/.nvm/versions/node/v18.15.0/bin/node

I'm using node 18.15.0, you'll have separate folders for all other node versions you have installed through nvm.

L3VU5 avatar Jan 24 '24 22:01 L3VU5

@wojtekmaj you saved my day🥹

riyapa401 avatar Mar 28 '24 11:03 riyapa401

I almost gave up react native and went to flutter because of this issue lol. The fixed I did was when setting up react-native project, one of the question is "Do you want to install CocoaPods now? Only needed if you run your project in Xcode directly". I answered no. Then it tells you how to run the project for ios and android

naeemthanvir avatar Apr 28 '24 18:04 naeemthanvir

Yes in the system file, sorry for the confusion.

I dont use nvm on my mac, but i still get the issue. works fine starting android , just ios i think it got to do with cocoapods installation, Will keep searching for a fix,

bro did you find any working solution?

qsales2022 avatar May 05 '24 12:05 qsales2022

PhaseScriptExecution [CP-User]\ Generate\ Specs ..../Pods.build/Debug-iphonesimulator/React-Codegen.build/Script-46EB2E00012AD0.sh (in target 'React-Codegen' from project 'Pods')

Tried all the possible solutions above, still get this error.

abhaypithadiya avatar May 19 '24 09:05 abhaypithadiya

PhaseScriptExecution [CP-User]\ Generate\ Specs ..../Pods.build/Debug-iphonesimulator/React-Codegen.build/Script-46EB2E00012AD0.sh (in target 'React-Codegen' from project 'Pods')

Tried all the possible solutions above, still get this error.

I am facing same issue . i am trying to build app in xcode cloud. i find node path issue. anyone find any working solution

vyasashutosh avatar May 23 '24 14:05 vyasashutosh

Do we have any solution for this. Tried every thing but in the end same issue..

ShivalThakur avatar Jun 07 '24 11:06 ShivalThakur

I was getting the same error and the solution was to replace ios/.xcode.env.local contents, which in my case was:

export NODE_BINARY=/private/var/folders/3y/swkjq1x101b76mzjgt4pm2d80000gp/T/xfs-9b9b4fa3/node

with ios/.xcode.env contents:

export NODE_BINARY=$(command -v node)

after which the errors magically disappeared.

additonal information, try check your node path which node then replace ios/.xcode.env.local contents export NODE_BINARY="YOUR NODE PATH"

yosafatkesuma avatar Jul 01 '24 04:07 yosafatkesuma