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

Upgrading to 0.71.rc-0, -1, -2, -3 causes build to fail #219

Closed
1 task done
wojtekmaj opened this issue Dec 9, 2022 · 5 comments
Closed
1 task done

Upgrading to 0.71.rc-0, -1, -2, -3 causes build to fail #219

wojtekmaj opened this issue Dec 9, 2022 · 5 comments

Comments

@wojtekmaj
Copy link

Environment

System:
OS: macOS 13.0.1
CPU: (8) arm64 Apple M1 Pro
Memory: 76.22 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.12.1 - /private/var/folders/wg/cztxqmdj6h94ht8783cym75c0000gp/T/xfs-bb916289/node
Yarn: 3.1.0 - /private/var/folders/wg/cztxqmdj6h94ht8783cym75c0000gp/T/xfs-bb916289/yarn
npm: 8.19.2 - /usr/local/bin/npm
Watchman: Not Found
Managers:
CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.1, iOS 16.1, macOS 13.0, tvOS 16.1, watchOS 9.1
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode: 14.1/14B47b - /usr/bin/xcodebuild
Languages:
Java: Not Found
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: 0.71.0-rc.3 => 0.71.0-rc.3
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

Things I’ve done to figure out my issue

Upgrading version

0.71.rc-0, -1, -2, -3

Description

I tried to upgrade from 0.70.6 to 0.71.rc-3, following upgrade helper. This has caused the following error when trying to run the app in Xcode:

/app/node_modules/react-native/ReactCommon/hermes/inspector/chrome/MessageConverters.cpp:222:34
No member named 'toString' in 'facebook::jsi::BigInt'

I tracked down the line that fails to this commit: facebook/react-native@7208d15

Removing the lines in question cause the build to run again, but I think that workaround is rather horrible.

@cipolleschi
Copy link

That's weird.
Did you also reinstalled the dependencies after the upgrade? I have the feeling that you were using a wrong version of Hermes.

So, the steps should be:

  • upgrade from 0.70.6 to 0.71.rc-3, by following the guide
  • reinstall the dependencies with bundle exec pod install (or RCT_NEW_ARCH_ENABLED=1 bundle exec pod install for the new arch)

The second step will fetch the updated hermes-engine version which should match what you have in the ReactCommon/hermes folder.

@leotm
Copy link

leotm commented Dec 12, 2022

nit: RE wrong Hermes version, to workaround iOS installing the old version, since few months ago been running pod update hermes-engine --no-repo-update in CI - this achieving similar result to RCT_NEW_ARCH_ENABLED=1 bundle exec pod install? not dived into the RN source code yet to check

@cipolleschi
Copy link

since few months ago been running pod update hermes-engine --no-repo-update in CI

I'm sorry for this. We recently find the culprit for this problem and won't be required from the next RC.

this achieving similar result to RCT_NEW_ARCH_ENABLED=1 bundle exec pod install?

No, the RCT_NEW_ARCH_ENABLED=1 bundle exec pod install command just install the dependencies for the New Architecture, but if the wrong version of Hermes was used before, you'll have the same Cocoapod error stating that the Hermes versions are incompatible.

@wojtekmaj
Copy link
Author

wojtekmaj commented Dec 13, 2022

I came up with this handy command that fixed issues after upgrading:

  "nuke": "rm -rf node_modules; rm -rf ios/build; rm -rf ios/Pods; rm -rf ios/Podfile.lock; yarn; yarn podinstall"

It was the ios/build directory I missed when nuking before.

@leotm
Copy link

leotm commented Dec 13, 2022

👌 ^ or even

  "nuke": "git clean -fdx; rm -rf ios/Podfile.lock; yarn; yarn podinstall"

(but it will nuke android too)

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

No branches or pull requests

3 participants