Closed swrobel closed 2 years ago
As a note -- @miinos was experiencing same issue (with hermes enabled): https://github.com/react-native-community/releases/issues/246#issuecomment-917484392
Hmm, it looks like this wasn't a new issue according to https://developer.apple.com/forums/thread/684441 and https://github.com/facebook/flipper/issues/2600
From the Flipper issue, it seems like a Folly upgrade (?) triggered this somehow. The error here is on RCT-Folly though, not Flipper's, and we did upgrade Folly version in the 0.66 RCs.
@swrobel: One thing to check: given the new app template was able to build successfully, I wonder if your Xcode DerivedData or any other build temp dir was out of sync (state with the old version). Could you try wiping your DerivedData completely, re-run pod install
after upgrading, then trying again? (Assuming you haven't tried that).
@fkgozali I removed derived data, reinstalled pods, and the result is the same.
hmm I see - have you tried generating a brand new app with 0.66.rc2, then building with Hermes in release flavor? I'm now curious if we get the same error in the fresh app
hmm I see - have you tried generating a brand new app with 0.66.rc2, then building with Hermes in release flavor? I'm now curious if we get the same error in the fresh app
Same issue with a fresh 0.66.rc2 app. hermes enabled. Config: Macbook M1 and Xcode 12.5
have you tried generating a brand new app with 0.66.rc2, then building with Hermes in release flavor?
What's the correct way to do this? I used npx -y react-native@0.66.0-rc.2 init RNTester
and I ended up with "react-native": "0.65.1"
in package.json
...
@swrobel npx react-native init RN066RC2 --version 0.66.0-rc.2
@swrobel
npx react-native init RN066RC2 --version 0.66.0-rc.2
You'll need to also change the ios/Podfile
to enable hermes, it's not on by default.
I'm debugging this atm, could anyone confirm that this happened only when Hermes was enabled? @swrobel, @miinos
I'm debugging this atm, could anyone confirm that this happened only when Hermes was enabled?
FYI, I couldn't repro this using 0.66.rc2 on a fresh new app (via npx react-native init
). I did try enabling Hermes and without, building "for Profiling" within Xcode (because that will use a Release flavor).
Could you share more about the exact repro steps (perhaps you built it via command line like xcodebuild
instead of using Xcode UI)?
@fkgozali I tried the following configurations:
These situations occur regardless of whether I build with the XCode UI or xcodebuild, and regardless of whether I'm building for release. I mentioned release builds earlier, but that's only because they were causing arm64 to be added to the targets. When I build for dev with an arm64 target, the same error occurs.
There seems to be some interesting conversation going on in the flipper repo here about a similar folly build error.
To note: this only happens when building on my Intel Macbook for an arm64 target. When building for the simulator (which I presume builds for an intel target on my intel macbook), the build succeeds with hermes enabled.
Hope this helps!
Yeah thanks for the extra context, we also figured out that it's arm64
build specific, not release vs debug specific. We're testing a potential fix atm.
The fix is landing. One thing to note is that I couldn't repro this on RNTester on main, even when building for arm64. I didn't dig deeper for why, because the priority is to make new app working properly.
One thing to note is that I couldn't repro this on RNTester on main
Even with Hermes enabled?
Even with Hermes enabled?
No I didn't try that, because with the new app template, we didn't need Hermes to repro the issue.
@fkgozali did the fix land? wanted to try out the new RC
@filipac not yet - I'm landing it right now, but we had unrelated internal CI issue that prevented landing. Should be done later today.
thanks! you're doing great job!
Just a heads up that it's still not landing and it may take longer. Worst case, expect something early next week.
This was picked to RC 0.66: https://github.com/facebook/react-native/commit/8b6d7fddd65a9b5caf599e8ff7b090a176a6f11f
Keeping this open until fully verified
@swrobel, @filipac, @miinos: https://github.com/facebook/react-native/releases/tag/v0.66.0-rc.3 is available, so you can try it out and see if it solves the problem for you all.
Fixed for me on the new rc. Thank you so much for your responsiveness, and for the quick fix!
Yay! That’s great, I’ll close this issue then. Thanks for helping us with repro steps.
I'm on the road right now but got an M1 timeslice in - confirmed for me as well on 0.66.0-rc.3, nice!
Version
0.66.0-rc.2
Developer Environment
macOS 11.5.2 (Intel) Xcode 12.5.1 Podfile.lock:
Issue and Reproduction Steps
0.66.0-rc2 is the first I've attempted upgrading my 0.64.2 project to, and I am consistently getting this error when building for Release with Hermes enabled:
Builds just fine for debugging on the iOS simulator, and for Android Release.
Related issue: https://github.com/facebook/folly/issues/1655