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

PhaseScriptExecution [CP-User]\ Generate\ Specs..in target 'React-rncore' from project 'Pods'

Open dfsfyt opened this issue 11 months ago • 16 comments

Description

when I build a ios enviroment, has an error, like below: image

I have no idea, what's wrong , I followed the instructions step by step.

Really need help

Steps to reproduce

  1. brew install node
  2. brew install watchman
  3. sudo gem install cocoapods
  4. npx react-native@latest init AwesomeProject
  5. yarn start
  6. yarn ios

React Native Version

0.73.6

Affected Platforms

Runtime - iOS

Output of npx react-native info

(node:92067) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
System:
  OS: macOS 14.4
  CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  Memory: 162.29 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 21.6.2
    path: /usr/local/bin/node
  Yarn:
    version: 1.22.22
    path: /usr/local/bin/yarn
  npm:
    version: 10.2.4
    path: /usr/local/bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.15.2
    path: /usr/local/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.4
      - iOS 17.4
      - macOS 14.4
      - tvOS 17.4
      - visionOS 1.1
      - watchOS 10.4
  Android SDK: Not Found
IDEs:
  Android Studio: 2023.2 AI-232.10227.8.2321.11479570
  Xcode:
    version: 15.3/15E204a
    path: /usr/bin/xcodebuild
Languages:
  Java: Not Found
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.73.6
    wanted: ^0.73.6
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

Stacktrace or Logs

PhaseScriptExecution [CP]\ Copy\ XCFrameworks /Users/venus/Library/Developer/Xcode/DerivedData/LunarCalendar-gdgarmrdxrkqsmgszzfrqshwimzy/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper-Glog.build/Script-46EB2E0001DA10.sh (in target 'Flipper-Glog' from project 'Pods')
    cd /Users/venus/Downloads/Code/learn/react\ native/LunarCalendar/ios/Pods
    /bin/sh -c /Users/venus/Library/Developer/Xcode/DerivedData/LunarCalendar-gdgarmrdxrkqsmgszzfrqshwimzy/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper-Glog.build/Script-46EB2E0001DA10.sh

PhaseScriptExecution [CP]\ Copy\ XCFrameworks /Users/venus/Library/Developer/Xcode/DerivedData/LunarCalendar-gdgarmrdxrkqsmgszzfrqshwimzy/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper-DoubleConversion.build/Script-46EB2E0001DA00.sh (in target 'Flipper-DoubleConversion' from project 'Pods')
    cd /Users/venus/Downloads/Code/learn/react\ native/LunarCalendar/ios/Pods
    /bin/sh -c /Users/venus/Library/Developer/Xcode/DerivedData/LunarCalendar-gdgarmrdxrkqsmgszzfrqshwimzy/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper-DoubleConversion.build/Script-46EB2E0001DA00.sh

RegisterExecutionPolicyException /Users/venus/Library/Developer/Xcode/DerivedData/LunarCalendar-gdgarmrdxrkqsmgszzfrqshwimzy/Build/Products/Debug-iphonesimulator/React-Core/RCTI18nStrings.bundle (in target 'React-Core-RCTI18nStrings' from project 'Pods')
    cd /Users/venus/Downloads/Code/learn/react\ native/LunarCalendar/ios/Pods
    builtin-RegisterExecutionPolicyException /Users/venus/Library/Developer/Xcode/DerivedData/LunarCalendar-gdgarmrdxrkqsmgszzfrqshwimzy/Build/Products/Debug-iphonesimulator/React-Core/RCTI18nStrings.bundle

warning: Run script build phase 'Bundle React Native code and images' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'LunarCalendar' from project 'LunarCalendar')
warning: Run script build phase '[CP-User] [Hermes] Replace Hermes for the right configuration, if needed' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'hermes-engine' from project 'Pods')

** BUILD FAILED **


The following build commands failed:
        PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/venus/Library/Developer/Xcode/DerivedData/LunarCalendar-gdgarmrdxrkqsmgszzfrqshwimzy/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-rncore.build/Script-46EB2E0001DA30.sh (in target 'React-rncore' from project 'Pods')
(1 failure)

error Command failed with exit code 1.

Reproducer

https://github.com/dfsfyt/reactnativelearn

Screenshots and Videos

No response

dfsfyt avatar Mar 18 '24 14:03 dfsfyt

@dfsfyt, it seems that you're using cocoapods versions 1.15.2.

This is Gemfile from 0.73.6 versions of react-native:

# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
# bound in the template on Cocoapods with next React Native release.
gem 'cocoapods', '>= 1.13', '< 1.15'

Please, try using cocoapods below 1.15.

vshkl avatar Mar 20 '24 12:03 vshkl

i still getting this issue even with react-native 0.73.6

The following build commands failed:
	PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/aaaaa/Library/Developer/Xcode/DerivedData/aaa-aojxrcyogtlcdqbbahkazvblxzhl/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/React-rncore.build/Script-46EB2E00031A00.sh (in target 'React-rncore' from project 'Pods')
(1 failure)

my gemfil

source 'https://rubygems.org'

# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby ">= 3.3.0"

gem 'cocoapods', '~> 1.15.2'
gem 'activesupport', '>= 6.1.7.3', '< 7.1.0'
gem "fastlane"

any fix please ? i'm stuck since 2 days, thanks

alainib avatar Mar 27 '24 09:03 alainib

@dfsfyt, it seems that you're using cocoapods versions 1.15.2.

This is Gemfile from 0.73.6 versions of react-native:

# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
# bound in the template on Cocoapods with next React Native release.
gem 'cocoapods', '>= 1.13', '< 1.15'

Please, try using cocoapods below 1.15.

I tried use cocoapods below 1.15, It doesn't work

dfsfyt avatar Mar 29 '24 15:03 dfsfyt

i still getting this issue even with react-native 0.73.6

The following build commands failed:
	PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/aaaaa/Library/Developer/Xcode/DerivedData/aaa-aojxrcyogtlcdqbbahkazvblxzhl/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/React-rncore.build/Script-46EB2E00031A00.sh (in target 'React-rncore' from project 'Pods')
(1 failure)

my gemfil

source 'https://rubygems.org'

# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby ">= 3.3.0"

gem 'cocoapods', '~> 1.15.2'
gem 'activesupport', '>= 6.1.7.3', '< 7.1.0'
gem "fastlane"

any fix please ? i'm stuck since 2 days, thanks

haven't fixed yet, crazy!!!

dfsfyt avatar Mar 29 '24 15:03 dfsfyt

i have same issue with my project

System:
  OS: macOS 14.4.1
  CPU: (10) arm64 Apple M1 Max
  Memory: 1.55 GB / 64.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.11.1
    path: ~/.nvm/versions/node/v20.11.1/bin/node
  Yarn:
    version: 1.22.19
    path: ~/.nvm/versions/node/v20.11.1/bin/yarn
  npm:
    version: 10.2.4
    path: ~/.nvm/versions/node/v20.11.1/bin/npm
  Watchman:
    version: 2024.01.22.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.14.2
    path: /Users/boo/.rvm/gems/ruby-3.0.0/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.4
      - iOS 17.4
      - macOS 14.4
      - tvOS 17.4
      - visionOS 1.1
      - watchOS 10.4
  Android SDK:
    API Levels:
      - "31"
      - "33"
      - "33"
      - "34"
    Build Tools:
      - 30.0.3
      - 33.0.0
      - 33.0.1
      - 33.0.2
      - 34.0.0
      - 34.0.0
    System Images:
      - android-33 | Google Play ARM 64 v8a
      - android-UpsideDownCake | Google APIs ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: Not Found
  Xcode:
    version: 15.3/15E204a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.3
    path: /Users/boo/.sdkman/candidates/java/current/bin/javac
  Ruby:
    version: 3.0.0
    path: /Users/boo/.rvm/rubies/ruby-3.0.0/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.73.6
    wanted: 0.73.6
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

imtiendat0311 avatar Apr 01 '24 16:04 imtiendat0311

I've the same issue too, I've tried to reinstall node, watchman, update ruby to newer version compared to the 2.6 coming originally with MacOs, trying cocoapods below v1.15 and so on; dealing with that since many days

System: OS: macOS 14.4.1 CPU: (11) arm64 Apple M3 Pro Memory: 691.63 MB / 18.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 20.11.1 path: /usr/local/bin/node Yarn: Not Found npm: version: 10.2.4 path: /usr/local/bin/npm Watchman: version: 2024.04.08.00 path: /usr/local/bin/watchman Managers: CocoaPods: version: 1.14.3 path: /Users/usuario/.rvm/gems/ruby-3.2.0/bin/pod SDKs: iOS SDK: Platforms: - DriverKit 23.4 - iOS 17.4 - macOS 14.4 - tvOS 17.4 - visionOS 1.1 - watchOS 10.4 Android SDK: API Levels: - "34" Build Tools: - 30.0.3 - 34.0.0 System Images: - android-34 | Google APIs ARM 64 v8a - android-34 | Google APIs Intel x86_64 Atom - android-TiramisuPrivacySandbox | Google APIs ARM 64 v8a - android-TiramisuPrivacySandbox | Google APIs Intel x86_64 Atom - android-VanillaIceCream | Google APIs ARM 64 v8a Android NDK: Not Found IDEs: Android Studio: 2023.2 AI-232.10227.8.2321.11479570 Xcode: version: 15.3/15E204a path: /usr/bin/xcodebuild Languages: Java: version: 17.0.10 path: /usr/bin/javac Ruby: version: 3.2.0 path: /Users/usuario/.rvm/rubies/ruby-3.2.0/bin/ruby npmPackages: "@react-native-community/cli": Not Found react: installed: 18.2.0 wanted: 18.2.0 react-native: installed: 0.73.6 wanted: 0.73.6 react-native-macos: Not Found npmGlobalPackages: "react-native": Not Found Android: hermesEnabled: true newArchEnabled: false iOS: hermesEnabled: true newArchEnabled: false

olafch avatar Apr 08 '24 23:04 olafch

What have worked for me is checking if ruby version is for arm64, if you've it on x86_64, this config is just for Intel chips, ain't not working for M1-M3. Also, check the parent folder containing your initial project to not have spaces. Regards!

olafch avatar Apr 10 '24 01:04 olafch

What have worked for me is checking if ruby version is for arm64, if you've it on x86_64, this config is just for Intel chips, ain't not working for M1-M3. Also, check the parent folder containing your initial project to not have spaces. Regards!

how to check this please ?

if i reclone my repo app start on Iphone, but i don't understand why ; after creating some branches or pulling ones or switching to android and running it, i get this error after

EDIT

> ruby -v
ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
> which ruby
/opt/homebrew/opt/ruby/bin/ruby

so i guess it's for arm64, and my folder name doesn't include and space . stuck with this error since one month :(

alainib avatar Apr 16 '24 14:04 alainib

what worked for me : in files ./ios/.xcode.env ./ios/.xcode.env.local

put export NODE_BINARY=$(command -v node)

alainib avatar Apr 16 '24 15:04 alainib

Same here, nothing worked above

gorkemogut avatar Apr 17 '24 21:04 gorkemogut

Removing node and installing back by nvm helped me to pass through this issue as described below: https://github.com/facebook/react-native/issues/32984#issuecomment-1165385007 (Don't forget to remove node_modules and package-lock.json and rebuild the packs by npm install afterwards.)

I had to fix Flipper error afterwards where I used: https://github.com/facebook/flipper/issues/4457#issuecomment-1609630077

🤦🏻‍♂️ What a mess

gorkemogut avatar Apr 18 '24 08:04 gorkemogut

Having same issue on github actions, works locally but not on CI.

shreypdev avatar May 09 '24 02:05 shreypdev

what worked for me : in files ./ios/.xcode.env ./ios/.xcode.env.local

put export NODE_BINARY=$(command -v node)

This worked for me as well. Thanks @alainib

TalhaPreply avatar May 16 '24 09:05 TalhaPreply

Adding this in case it helps anyone, but the xcode.env.local file is not tracked by git so it can become stale. In our case, we weren't using it anyway so deleting this file also resolves the issue for us.

systemride avatar Jun 07 '24 19:06 systemride

Adding this in case it helps anyone, but the xcode.env.local file is not tracked by git so it can become stale. In our case, we weren't using it anyway so deleting this file also resolves the issue for us.

This solved the issue for me. Thanks @systemride!

m-rios avatar Jun 16 '24 17:06 m-rios

I have removed /app/ios/.xcode.env.local file and it worked. This file was somehow generated somewhere while upgrading from 72.7 to 73.8 but it is not on the upgrade helper https://react-native-community.github.io/upgrade-helper/?from=0.72.7&to=0.73.8

UgurGumushan avatar Jul 03 '24 15:07 UgurGumushan

I have removed /app/ios/.xcode.env.local file and it worked. This file was somehow generated somewhere while upgrading from 72.7 to 73.8 but it is not on the upgrade helper https://react-native-community.github.io/upgrade-helper/?from=0.72.7&to=0.73.8

Also, I worked for me. I noticed that the /app/ios/.xcode.env.local file was not included in React Native upgrade helper here. After removing this file, the project started working fine on CircleCI. The local environment was already functioning correctly.

MAsadIlyasNajum avatar Jul 23 '24 10:07 MAsadIlyasNajum