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

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

Open
dfsfyt opened this issue Mar 18, 2024 · 12 comments

Comments

@dfsfyt
Copy link

dfsfyt commented Mar 18, 2024

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

@vshkl
Copy link

vshkl commented Mar 20, 2024

@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.

@alainib
Copy link

alainib commented Mar 27, 2024

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

@dfsfyt
Copy link
Author

dfsfyt commented Mar 29, 2024

@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
Copy link
Author

dfsfyt commented Mar 29, 2024

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!!!

@imtiendat0311
Copy link

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

@olafch
Copy link

olafch commented Apr 8, 2024

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
Copy link

olafch commented Apr 10, 2024

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!

@alainib
Copy link

alainib commented Apr 16, 2024

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
Copy link

alainib commented Apr 16, 2024

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

put export NODE_BINARY=$(command -v node)

@gorkemogut
Copy link

gorkemogut commented Apr 17, 2024

Same here, nothing worked above

@gorkemogut
Copy link

gorkemogut commented Apr 18, 2024

Removing node and installing back by nvm helped me to pass through this issue as described below:
#32984 (comment)
(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:
facebook/flipper#4457 (comment)

🤦🏻‍♂️ What a mess

@shreypdev
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants