react-native: `pod install` command doesn't update hermes pod
Description
When you update React Native version and then do pod install
or npx pod-install
it won’t update Hermes
tested on react native: 0.70.8,0.71.6
React Native Version
0.71.6
Output of npx react-native info
System:
OS: macOS 13.0.1
CPU: (8) x64 Apple M1 Pro
Memory: 33.12 MB / 16.00 GB
Shell: 3.3.1 - /opt/homebrew/bin/fish
Binaries:
Node: 14.21.2 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 6.14.17 - /usr/local/bin/npm
Watchman: Not Found
Managers:
CocoaPods: 1.12.0 - /Users/i/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK:
API Levels: 29, 30, 31, 32, 33
Build Tools: 28.0.3, 29.0.2, 30.0.2, 30.0.3, 31.0.0, 33.0.0
System Images: android-30 | Google Play ARM 64 v8a, android-30 | Google APIs ATD ARM 64 v8a, android-32 | Google APIs ARM 64 v8a, android-32 | Google Play ARM 64 v8a, android-33 | Google APIs ARM 64 v8a, android-33 | Google APIs Intel x86 Atom_64, android-33 | Google Play ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2021.3 AI-213.7172.25.2113.9123335
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: 11.0.11 - /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: 0.71.5 => 0.71.5
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
Steps to reproduce
npx react-native init testPodInstall
cd testPodInstall
bundle install
cd ios; bundle exec pod install; cd ..
# Change react-native version from "0.71.6" to "0.71.5" in package.json
yarn install
bundle exec pod install --project-directory ios
# or
npx pod-install
Result ios/Podfil.lock
- hermes-engine (0.71.6): // <--- Ops... HAVE TO BE "0.71.5"
- hermes-engine/Pre-built (= 0.71.6)
- hermes-engine/Pre-built (0.71.6)
Snack, code example, screenshot, or link to a repository
…
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 3
- Comments: 32 (16 by maintainers)
I think I found the problem. Here, we are defining that the
hermes-engine
pod must be installed using the specific podspec that is found at this path. However, it seems that with that option, Cocoapods is not able to determine whether the version changes.Instead, by using
:path
, as the other local pods, and then doing pod install, it seems that the Podfile.lock properly shows the hermes versions:I’m setting up a PR to address this.
Came here to say the same. This is problematic in CI.
Updating from 0.71.6 to 0.71.7 here’s what we did:
…no mention of hermes-engine
Then in CI we have a couple steps before a Fastlane build:
Yet this error occurs:
To resolve, we had to run
pod update hermes-engine --no-repo-update
locally and then push the Podfile.lock changesThe remedy so far would be to run
pod update hermes-engine --no-repo-update
and push the updatedpodfile.lock
, or to add a step in CI that runpod update hermes-engine --no-repo-update
if the previouspod install
failed.We are looking into backporting the fix also to 0.70 and 0.71 at least, but we don’t have a patch release scheduled yet for those versions, unfortunately.
This is a known issue that manifested earlier today because Cocoapods released version 1.15 which is breaking. Please refer to https://github.com/facebook/react-native/issues/42698 for updates. We are working on it.
The workaround for the time being is to downgrade to Cocoapods 1.14.
So… you are encountering a problem! 😄
No, this should not happen! thank you for signalling this. I’ll put it in my queue and I hope to find a solution before the next release.
I experienced this from 0.71.8-> 0.72.5. The previously solution of
pod update hermes-engine --no-repo-update
worked for me.Apologies if it came off as rude, I thought you meant more if it was affecting any other part of the development workflow. Thanks for looking into it 😃
There is a fix for 0.72, but we couldn’t backport it to 0.71, unfortunately. 😦
This is the fix: https://github.com/facebook/react-native/commit/8de71e58b6280d7a4957cc859e14268f6dde3bea
Hi, we also had the issue when updating from 0.71.6 to 0.71.7. Here are the logs from our last build in appcenter. No such issue with the builds with version 0.71.6
This feels like a bug that we want to investigate on. cc @cipolleschi
So every upgrade we will need to run
pod update hermes-engine --no-repo-update
unless there is a new version of hermes-engine released? That seems clunky + should be documented properly if so, in my opinion.I do
yarn install
thenpod install
that’s it.@cipolleschi when run
pod install --project-directory ios
ornpx pod-install
after RN version changing it’s updating all RN related pods except Hermes engine 😦and when I do
cd ios; pod install;
on CI or locally it fail with the next error:and when you check
Podfile.lock
Hi, I can confirm this issue when upgrading from 0.71.2 to 0.71.7. After upgrading with react-native upgrade, the build locally succeeds, with the Pod lockfile still showing hermes-engine 0.71.2. Building in CI pipeline without installed dependencies then fails. deleting Gemfile.lock and Podfile. lock as well as the pods and vendors folder, then running: bundle install -> bundle exec pod install updated the hermes pod to 0.71.7 in the lock file successfully.
Kind Regards