-
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
After upgrading to react-native 0.59 iOS build fails #23886
Comments
I have just reproduced this issue with XCode: 10.1 and RN 0.59.0. EDIT 1: I could reproduce with XCode UI build tool ; but it's working fine with |
Hmm, I have just upgraded from
Wondering if everything might work for me because I had working EDIT: I have also ran |
I'm getting the same issue upgrading from 0.57.8 -> 0.59.1. |
Add these lines to your Podfile:
and run
|
@jpudysz Yeah that worked after migrating to cocoapod and opening the XCode project with the Should legacy (no-cocoapod) linking be deprecated ? |
@jpudysz Worked for me too. Surely this can't be the proper solution though right? This seriously bloats the project. Edit: Ok seriously odd, I removed those 3 pods, ran Clean in Xcode and tried to build. This time I didn't get an error while compiling Yoga. |
Thanks @jpudysz . Following your solution, I then get the following error: Does anyone know what's going on? Many thanks. |
After trying what feels like pretty much everything, RN standard upgrade, git upgrade tool, applying diff patch I ended up recreating a completely new project and doing the extremely tedious work of rebuilding the code base. They say it'll be better from 0.59 on.. hopefully they're right about that |
I just upgraded from 0.59.0 to 0.59.1 and it worked for me |
I upgraded too but with no luck so far. |
I had the exact same issue. The good old |
After using |
I've tried updating from 0.58.4 manually (following rn-diff-purge changes) but I'm also facing this problem with RN 0.59.0 or 0.59.1 |
Yeah we had What the heck is going on here? Edit |
Got the same issue with 'folly/Portability.h' after upgrading from 0.58.4 to 0.59.0 and 0.59.1 What is weird, is that XCode states after compile that Portability.h is not found, but in the editor, it gets all types define in the header... File failing to compile is RCTJavasScriptLoader.mm in the React library.
|
I got the same issue..., Every time there is some issue with upgrades in react native so tired.. |
The file seems to be deleted from the yoga project since 13 Dec 2018 and "inlined" into My guess is the reference to Removing the cache and rebuilding the project didn't work for me right away. So I tried upgrading to React Native 0.59.1 then rebuilding the project. Also didn't work. However, THEN cleaning my node_modules, cache and build folders and rebuilding the project, did work, using:
So, it seems cache related. Upgrading to React Native 0.59.1 is maybe not needed, I think a part of the script did the trick for me. Hope this helps others! |
I gave up, I deleted all links to node_modules from Pods file then delete node_modules and build directory and re-installed anything then finally built successfully again. This is so exhausting. |
@jvandenaardweg I think you're right that it's a caching issue. For me what worked was deleting my Xcode's derived data folder and restarting Xcode. Once I restarted, I attempted a build and it failed and prompted me to close and reopen my xcode workspace. Once I did that, I tried to build again and it worked. |
Alright folks, I think this issue is generally about build cache issues from upgrading (from reading the posts ) - so if you have issues, I think it can generally be fixed by:
This is pretty much the same for every version, I bet. I would maybe look into making an issue on the react-native-cli about improving this and maybe running some of the commands itself. |
Does anyone have a specific reproduction step for this? |
I was also seeing the It builds fine for me with:
|
iOS issue and fix: facebook/react-native#23886 (comment) Android issue and fix: wix/react-native-navigation#4757 (comment)
iOS issue and fix: facebook/react-native#23886 (comment) Android issue and fix: wix/react-native-navigation#4757 (comment)
"Between react-native 0.57.8 and 0.58.5 there is one big change that was added in the Xcode project is that you have to add JavaScriptCore.Framework to the Linked FrameWorks and Libraries" - from here PLUS @jvandenaardweg answer:
Did the work for me. It's really frustrating as other have said, needing to guess what its breaking a code that was working before. Also on Android I had to upgrade Build Gradle version to work again. |
We know that upgrading has been a long lasting pain for the community so starting v0.59 we have introduced a new flow via the new CLI. That said we have been writing the breaking changes in the changelog and in the releases tab so there is no real guessing needed. Anyway, closing since this is clearly related to upgrading - also, in general you can use rn-diff-repo to check for all the necessary steps when upgrading. |
Finally I successfully built iOS project and run it on simulator without any errors after hard working on upgrade progress. First I applied diffs with the help of rn-diff-purge then I applied @Hless' solution at the end I faced with duplicate symbols error and by following steps on this solution I fixed them also now project is working correctly. |
Resolved with the following :
Then I reinstalled my dependencies (npm & pod) and it worked :) |
the right line will be: |
Every time I encounter a hair-pulling issue with RN giving me some nonsense error message, I go on a desperate github hunt for solutions. Most of the time the solution is delete cache, delete derived data, reopen Xcode, clear build folders etc. Over the years I've put together this bash script that I've added as an npm script in my package.json. Now my first goto solution for most issues is
PS. And it solved this problem for me too :D |
just |
please. downgraded Xcode 10.1 |
Another |
This comment has been minimized.
This comment has been minimized.
@philipaarseth I hope you ate your words when 0.60 came out 😆 |
I have seen this in other threads before, but running the following solved the issue for me:
I thought this had been fixed in 0.59 or before and I remember seeing it running automatically in some builds, but looks like there are still cases where it's missing. Definitely worth including in the troubleshooting section of your project, since this is not the first time I see this happening. |
Run this command: $ conda deactivate |
@jpudysz thanks, it works for me. but why rn yoga build error have relationshop with folly/glog/doubleConversion ? my error log is : |
Android works really perfectly, just iOS... :-( The only promising work around might be downgrading RN version unfortunately It gets fairly difficult when having lots of 3rd party dependencies. |
in my case, Xcode just did an automatic update and produced such problem. reinstall the Pods and Podfile solved my problem |
Delete derived data |
I've done all of the above steps, gotten the build working, and now I get this error. FWIW I am upgrading from Xcode 10.1 -> 11.1 AND i am upgrading react native from 0.57.8 -> 0.59.9
edit: I removed RCTTest from the podfile and it was good after that. |
I had an issue getting glog to install, ended up having to issue this command |
@jenskuhrjorgensen your |
@jduffy7 That's probably a bit overkill 😄 Thx, it's been corrected! |
@jenskuhrjorgensen Thank you!!!!! |
Running |
Any update .. ? |
Above solutions did not work, the following helped my project to build again. cd ios
pod repo update
pod update After running these commands, I was able to build on xcode but not using rm -rf ios/build
rm -rf ~/Library/Developer/Xcode/DerivedData
watchman watch-del-all
rm -rf node_modules
npm install which helped me build using |
@khanguslee I do it but sadly it's won't build and got this error ** BUILD FAILED **
|
A quick google search with your error message gives me a solution here. |
🐛 Bug Report
After updating to react-native 0.59 and trying to build the app for iOS I get the following error:
What's strange to me is, that I can't find this file here either in the current master:
react-native/tree/master/ReactCommon/yoga/yoga
(onlyYGFloatOptional.h
)To Reproduce
We upgraded a mid sized project from 0.57.7 → 0.59.
Expected Behavior
Build should run through just fine like it did before.
Environment
The text was updated successfully, but these errors were encountered: