Open mstohr1975 opened 1 month ago
Hi there,
I've reproduced a simple example under https://github.com/mstohr1975/ReanimateTest. In effect, it is set up with the latest Salesforce Mobile SDK React Native vanilla TypeScript project from https://developer.salesforce.com/docs/platform/mobile-sdk/guide/react-native-intro.html which is located here: https://github.com/forcedotcom/SalesforceMobileSDK-Templates/tree/dev/ReactNativeTypeScriptTemplate.
The following build commands failed:
PhaseScriptExecution [CP-User]\ [Hermes]\ Replace\ Hermes\ for\ the\ right\ configuration,\ if\ needed /Users/
Forgot one point, I've commented a post install in Podfile which generated another build error:
react_native_post_install( installer, $config[:reactNativePath], :mac_catalyst_enabled => false )
It will generate following error when installing Pods with pod install:
Downloading dependencies Generating Pods project Setting USE_HERMES build settings Setting REACT_NATIVE build settings [!] An error occurred while processing the post-install hook of the Podfile.
no implicit conversion of nil into String
/Users/mstohr/Documents/ReanimateTest/node_modules/react-native/scripts/cocoapods/utils.rb:129:in join' /Users/mstohr/Documents/ReanimateTest/node_modules/react-native/scripts/cocoapods/utils.rb:129:in
block (2 levels) in set_node_modules_user_settings'
/Users/mstohr/Documents/ReanimateTest/node_modules/react-native/scripts/cocoapods/utils.rb:128:in each' /Users/mstohr/Documents/ReanimateTest/node_modules/react-native/scripts/cocoapods/utils.rb:128:in
block in set_node_modules_user_settings'
/Users/mstohr/Documents/ReanimateTest/node_modules/react-native/scripts/cocoapods/utils.rb:127:in each' /Users/mstohr/Documents/ReanimateTest/node_modules/react-native/scripts/cocoapods/utils.rb:127:in
set_node_modules_user_settings'
/Users/mstohr/Documents/ReanimateTest/node_modules/react-native/scripts/react_native_pods.rb:307:in react_native_post_install' /Users/mstohr/Documents/ReanimateTest/ios/Podfile:59:in
block (2 levels) in from_ruby'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/podfile.rb:196:in post_install!' /opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:1013:in
run_podfile_post_install_hook'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:1001:in block in run_podfile_post_install_hooks' /opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface.rb:149:in
message'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:1000:in run_podfile_post_install_hooks' /opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:337:in
block (2 levels) in create_and_save_projects'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/xcode/pods_project_generator/pods_project_writer.rb:61:in write!' /opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:336:in
block in create_and_save_projects'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface.rb:64:in section' /opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:315:in
create_and_save_projects'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:307:in generate_pods_project' /opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:183:in
integrate'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:170:in install!' /opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/command/install.rb:52:in
run'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/claide-1.1.0/lib/claide/command.rb:334:in run' /opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/command.rb:52:in
run'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/bin/pod:55:in <top (required)>' /usr/local/bin/pod:25:in
load'
/usr/local/bin/pod:25:in `
This usually fixes it for me:
rm ios/.xcode.env.local
pod install
If that still doesn't work, clear the derived data and rebuild
Thx, will check next days and get back to you
I tried it in different ways, but did not succeed.
First of all, I do not overcome the error when installing the pods given, I always have to comment following part in Podfile to prevent the error explained above. This only happens after I install the react-native-reanimated package
react_native_post_install( installer, $config[:reactNativePath], :mac_catalyst_enabled => false )
But more importantly, I've cleaned cache for all pods and rebuild as follows:
And still get the same error message:
The following build commands failed: PhaseScriptExecution [CP-User]\ [Hermes]\ Replace\ Hermes\ for\ the\ right\ configuration,\ if\ needed /Users/mstohr/Library/Developer/Xcode/DerivedData/DautXpense-gfqjutltodrrgmftqbwaxdmozcdl/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/hermes-engine.build/Script-46EB2E0001CA80.sh (in target 'hermes-engine' from project 'Pods') (1 failure)
See GitHub repository after removing .xcode.env.local: https://github.com/mstohr1975/ReanimateTest
@mstohr1975
Did you try to delete the derived data folder? If not, I'm not sure what could be causing it
Users/mstohr/Library/Developer/Xcode/DerivedData/
Ah, sorry, forgot to mention it...yes, I deleted the DerivedData folder. Same error...by the way, pod install will recreate the .xcode.env.local file...that's why I deleted it afterwards.
I also tried
rm -rf ~/Library/Developer/Xcode/DerivedData/ cd ios pod deintegrate pod update cd.. npm start or npx react-native run-ios
Still the same error...
What is the config in your ios/.xcode.env.local
?
Make sure that right path to node is specified in NODE_BINARY var. If it's not the right path to your actual node version, then just correct it manually. It worked for me
Many thanks. Let me check this coming week...I'll get back to you.
We validated the NODE_BINARY path directs to the latest node.js version: export NODE_BINARY=/usr/local/bin/node. That seems not the issue either. Thx for your help anyways.
Description
I've reproduced an issue, whenever I install with npm install react-native-reanimated, then reinstall the pods with cd ios && pod install && cd .. and build the app with npx react-native run-ios I run into an error on Hermes Engine:
PhaseScriptExecution [CP-User]\ [Hermes]\ Replace\ Hermes\ for\ the\ right\ configuration,\ if\ needed /Users//Library/Developer/Xcode/DerivedData//Build/Intermediates.noindex/Pods.build/Debug-iphoneos/hermes-engine.build/Script-46EB2E0001CA80.sh (in target 'hermes-engine' from project 'Pods')
(1 failure)
Same project before installing reanimated builds perfectly fine, I reproduced it a couple times. Any thoughts how to overcome this? Many thx
Steps to reproduce
Snack or a link to a repository
happy to share later
Reanimated version
3.14.0
React Native version
0.73.6
Platforms
iOS
JavaScript runtime
None
Workflow
None
Architecture
None
Build type
None
Device
None
Device model
No response
Acknowledgements
Yes