-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Xcode 12.5 troubleshooting guide (RN 0.61/0.62/0.63/0.64) #31480
Comments
Debugger/DevTools is still not loading with these fixes in place.
appears in the terminal window but no windows open.
E: If anyone has any workaround that'd be good as idb facebook/idb#649 hasn't been updated to run on M1 and hermes is not supported on iOS simulator. |
…2.5. Following the outlined solution for projects using RN v0.63, in facebook/react-native#31480. The "properly clean your caches" step didn't seem to be necessary for me, but possibly that's different between environments. Done without looking for breaking changes (there could be a lot between Flipper 0.54.0 and 0.75.1) because we don't use Flipper yet (that's zulip#4255) and we don't have anything like a Flipper config file for iOS.
…2.5. Following the outlined solution for projects using RN v0.63, in facebook/react-native#31480. The "properly clean your caches" step didn't seem to be necessary for me, but possibly that's different between environments. Done without looking for breaking changes, beyond confirming that the build succeeds on Xcode 12.5. There could be a lot of breaking changes between Flipper 0.54.0 and 0.75.1 -- but we don't use Flipper yet (that's zulip#4255) and we don't have anything like a Flipper config file for iOS.
My experience with following the instructions for a 0.62.2 project did not match what I actually had to do
For it to work I had to
With these change project now builds again. |
Just a note for people running react-native builds on BitRise - it appears that BitRise restores caches as read-only by default and you need to delete the build cache after updating to 0.64.1 before the build will work, but then it will work repeatedly That guess is based on this evidence
Hope this helps ! |
…2.5. Following the outlined solution for projects using RN v0.63, in facebook/react-native#31480. The "properly clean your caches" step didn't seem to be necessary for me, but possibly that's different between environments. Done without looking for breaking changes, beyond confirming that the build succeeds on Xcode 12.5. There could be a lot of breaking changes between Flipper 0.54.0 and 0.75.1 -- but we don't use Flipper yet (that's zulip#4255) and we don't have anything like a Flipper config file for iOS.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
not yet, will submit and mark it here |
@barbieri fabulous - I'm fairly happy with the current state of the workarounds put in place - as you mention they work (job |
@mikehardy take a look at #32284 and see if that works for you, it did for me, but I don't have a huge test matrix. While doing some testing I noticed that CocoaPods version plays a BIG role, using 1.11 will include CocoaPods/CocoaPods@6985cbf and with that we can remove the I also recommend to use Gemfilesource "https://rubygems.org"
ruby "2.7.4"
gem "cocoapods", "~> 1.11" Gemfile.lock
|
Done with Xcode Version 13.0 (13A233). I got two errors while trying to build: Undefined symbol: __swift_FORCE_LOAD_$_swiftDataDetection Undefined symbol: __swift_FORCE_LOAD_$_swiftFileProvider The root cause is reportedly [1] a bug in Xcode. The line with `swift-5.0` in LIBRARY_SEARCH_PATHS, removed in this commit, leads to a "Mach-O universal binary" that mistakenly omits the arm64 architecture, which reportedly causes this compilation failure. facebook/react-native@a1c445a39, as yet unreleased, removes that line from LIBRARY_SEARCH_PATHS in the template app. [2] The other interesting line in LIBRARY_SEARCH_PATHS, the one with just `swift`, doesn't have that bug. But we go ahead and remove all of LIBRARY_SEARCH_PATHS, just because that commit says it wants to. They say they don't do that because it's supposedly not possible without also upgrading to CocoaPods v1.11, which has CocoaPods/CocoaPods@6985cbf7d. While RN figures out whether they can or should require a minimum CocoaPods version, I notice that we seem to have no trouble upgrading CocoaPods ourselves, so we might as well. [1] facebook/react-native#31480 [2] It also (with facebook/react-native@51bf55794) marks a `react-native` script named __apply_Xcode_12_5_M1_post_install_workaround, from facebook/react-native@ac4ddec54, as no longer needed. IOW, you don't have to call it from your Podfile anymore. But facebook/react-native@ac4ddec54 is also unreleased, so we've never had to worry about calling that script from our Podfile.
I'm having problems creating a new project. I'm using xcode 12.4 and RN 0.66.0 Anyone going through this that has a solution? `** BUILD FAILED ** The following build commands failed: |
@philippenunes that's not the error, that's the notice that there was an error, up above somewhere is the actual error. I'm not sure Xcode 12.4 will work with RN0.66? It should but that's untested by me at least. I've definitely tested and seen success with Xcode 12.5.1 and Xcode 13. |
I had to downgrade RN to 0.63 and change Flipper to |
Arguments: PATH: Yarn version: Node version: Platform: Trace: npm manifest: yarn manifest: Lockfile: Error: |
This comment has been minimized.
This comment has been minimized.
I'm not sure if this is the proper location, but this is where the workaround points to. As a note for the implemented workaround included as part of react-native (__apply_Xcode_12_5_M1_post_install_workaround, which is based off of this answer and was updated in 0.67.2, 60cef850bd) If your path has spaces the 'sed' command will fail with a 'directory not found' exception. I was able to solve this by removing spaces in my path, reperforming 'pod install' and re-archiving. |
The directory not found exception can be resolved with:
|
Circling back and seeing if anyone has come across this error using Xcode 13
|
Ridiculously, I cannot create a new project, macOS: Monterey 12.4 (M1) I spend all of today and have read all SO and GH and tried every solution. still don't have any success. I cannot bring up Hello World of RN project. |
Hey @amerllica - here's a script that will not just bring up a hello world, but brings up the hello world and the entire firebase suite all at once: https://github.com/mikehardy/rnfbdemo/blob/main/make-demo.sh Alternatively, you might like the a hello world with react-native-web built in too: https://github.com/criszz77/luna/ Both of those work, I run them from scratch pretty frequently, also with xcode 13.4 / monterey 12.4, on x86-64 and M1 In particular if you look at the make-demo script and it's resulting |
Really thanks dear @mikehardy, I used the iOS
Android
About android, all of my environment is implemented awesomely, react-native doctor shows me everything is ok. |
@amerllica sorry, quite busy, took a while to see this. doctor can still tell you everything is okay currently even though it is not. I just finished a PR for that here react-native-community/cli#1552 - you should reject the https://reactnative.dev/docs/environment-setup page for CLI android development on ios and make sure you have JDK11 installed properly so that "java --fulversion" tells you that you have version 11 Not sure why Xcode is failing for you. I just did: git clone git@github.com:criszz77/luna
cd luna/template
yarn package:install
yarn ios and it worked? On an M1, all same versions except I'm trialing Xcode 13.4.1 now on that machine. you can also try this (assuming you cloned out the luna template and are in the template directory) to just run the build without spawning a simulator or whatever
Note that your iOS "error" is not an actual error. It's a "hey, there was an error, go get the error. The actual error will be higher up in the build logs. |
Hey folks.
This issue wants to be a follow up to #31179; that issue has become really long so opening a new one to try and reduce the noise and confusion around it.
Here is how to fix the Xcode 12.5 iOS build breaks with errors related to "atomic_wait_until is unavailable" (and similar messages).
(sidenote: make sure you are using cocoapods 1.10.x)
If you are on 0.61
Note well: this has only been tested by a few members of the community, not by me, so I can't ensure it will work.
If you are still using RN 0.61, you can refer to this comment #28405 (comment) from @edgarbonillag.
If you are on 0.62
yarn install
and apod install --repo-update
(if pod install fails on an error about a Flipper package, just remove the relevant lines from the podfile.lock and run the pod install again)If you are on 0.63
Note well: you need to be on latest 0.63.x release, at the time of writing 0.63.3.
If you are on 0.63, you are in luck! You just need to add this line to your podfile (or modify it if you already had it):
Then properly clean your caches (react-native-clean-project is your ally), remove pods folder and do a
pod install --repo-update
.This should be enough for you to get Xcode 12.5 to work.
If you are on 0.64
yarn install
and apod install --repo-update
(if pod install fails on an error about a Flipper package, just remove the relevant lines from the podfile.lock and run the pod install again)These scenario have all been tested and ✅ so if you are still experiencing issues, it's likely that it's caused by some local configuration getting in the way. If that's the case, please refer to this comment by @smadan.
If none of the above helped you, and you can reproduce your issue consistently - even on a freshly init'd project, then post a comment below with how to repro so that this can be investigated further.
The text was updated successfully, but these errors were encountered: