Repository navigation
React-RCTAppDelegate unstable checksum in Podfile.lock (new architecture) #39971
Description
Activity
⚠️ Missing Reproducible Example ℹ️ We could not detect a reproducible example in your issue report. Please provide either: - If your bug is UI related: a Snack
- If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.
- addedNeeds: ReproThis issue could be improved with a clear list of steps to reproduce the issue.This issue could be improved with a clear list of steps to reproduce the issue.
on Oct 6, 2023 This patch replaces
ENV['APP_PATH]with${REACT_NATIVE_PATH}/../... This fixes the issue in my environment but there may be a better way to implement the fix.--- a/node_modules/react-native/Libraries/AppDelegate/React-RCTAppDelegate.podspec +++ b/node_modules/react-native/Libraries/AppDelegate/React-RCTAppDelegate.podspec @@ -101,10 +101,10 @@ Pod::Spec.new do |s| :script => " WITH_ENVIRONMENT=\"$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh\" source $WITH_ENVIRONMENT -${NODE_BINARY} ${REACT_NATIVE_PATH}/scripts/codegen/generate-legacy-interop-components.js -p #{ENV['APP_PATH']} -o ${REACT_NATIVE_PATH}/Libraries/AppDelegate +${NODE_BINARY} ${REACT_NATIVE_PATH}/scripts/codegen/generate-legacy-interop-components.js -p ${REACT_NATIVE_PATH}/../.. -o ${REACT_NATIVE_PATH}/Libraries/AppDelegate ", :execution_position => :before_compile, - :input_files => ["#{ENV['APP_PATH']}/react-native.config.js"], + :input_files => ["${REACT_NATIVE_PATH}/../../react-native.config.js"], :output_files => ["${REACT_NATIVE_PATH}/Libraries/AppDelegate/RCTLegacyInteropComponents.mm"], } endDuplicates #31121
- added and removedNeeds: ReproThis issue could be improved with a clear list of steps to reproduce the issue.This issue could be improved with a clear list of steps to reproduce the issue.
on Oct 13, 2023 github-actions commented
on Oct 16, 2023 on Oct 16, 2023 · Hidden as off-topicshow commentMore actionsThis is NOT a duplicate of #31121. That was fixed by commits which are already in currently released react-native versions. This is a different podspec file than the one in #31121.
Thanks for the clarification @heath-clink.
@cipolleschi can you take a look at this one?Reacted by Riccardo Cipolleschi and heath-clinkThe problem here is that the script needs to access to the root project.
TheENV['APP_PATH']is the right environment variable that allow us to retrieve that.The suggested patch works for you but is not general enough to be applied to everyone.
I think that the proper approach is to:
- fetch the
ENV['APP_PATH']value to get the path to the app - fetch the pods path, where the pods are installed
- compute the relative path from the pods path to the app path
- use that as base relative path.
I'll try to put up something.
Reacted by heath-clink- fetch the
- added a commit that references this issue
on Oct 17, 2023 - added a commit that references this issue
on Oct 18, 2023 - added a commit that references this issue
on Nov 7, 2023 - added a commit that references this issue
on Nov 8, 2023 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.
- addedStaleThere has been a lack of activity on this issue and it may be closed soon.There has been a lack of activity on this issue and it may be closed soon.
on Apr 14, 2024 This issue was closed because it has been stalled for 7 days with no activity.
Description
We observed that the checksum for
React-RCTAppDelegatein Podfile.lock was unstable, in that it changes from one developer to another. This causes a problem with our CI which uses the--deploymentflag topod install, causing it to fail because the checksum forReact-RCTAppDelegateappears to have changed.Tracked it down to
ios/Pods/Local Podspecs/React-RCTAppDelegate.podspec.jsonwhich contains a fully-qualified path like/Users/redacted-username/depots/myapp/etcwhich will be different for different users/environments, and so the checksum of that file will be different for those different users.React Native Version
0.72.5
Output of
npx react-native infoinfo Fetching system and libraries information...
System:
OS: macOS 13.5.2
CPU: (10) arm64 Apple M1 Max
Memory: 114.30 MB / 32.00 GB
Shell:
version: 3.2.57
path: /bin/bash
Binaries:
Node:
version: 18.17.0
path: ~/.nvm/versions/node/v18.17.0/bin/node
Yarn:
version: 1.22.19
path: ~/.nvm/versions/node/v18.17.0/bin/yarn
npm:
version: 9.6.7
path: ~/.nvm/versions/node/v18.17.0/bin/npm
Watchman:
version: 2023.08.28.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.12.1
path: /Users/username-redacted/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 22.2
- iOS 16.2
- macOS 13.1
- tvOS 16.1
- watchOS 9.1
Android SDK: Not Found
IDEs:
Android Studio: 2022.3 AI-223.8836.35.2231.10406996
Xcode:
version: 14.2/14C18
path: /usr/bin/xcodebuild
Languages:
Java:
version: 11.0.20
path: /Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home/bin/javac
Ruby:
version: 2.6.10
path: /Users/username-redacted/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.5
wanted: 0.72.5
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: true
Steps to reproduce
mkdir example1 example2(cd example1 && npx react-native@latest init AwesomeProject)(cd example2 && npx react-native@latest init AwesomeProject)(cd example1/AwesomeProject/ios && RCT_NEW_ARCH_ENABLED=1 bundle exec pod install)(cd example2/AwesomeProject/ios && RCT_NEW_ARCH_ENABLED=1 bundle exec pod install)diff example?/AwesomeProject/ios/Podfile.lockdiff example?/AwesomeProject/ios/Pods/Local\ Podspecs/React-RCTAppDelegate.podspec.jsonSnack, screenshot, or link to a repository
no reproducer needed, just follow the steps to reproduce