-
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
Weird build failure on Xcode after updating to RN 0.66.1 #32432
Comments
@lunaleaps I don't think this issue should be closed and I'm not sure if this is an upgrade issue. |
Ooops, I didn't know we had that github action -- I had not intended to close it but properly label this to help signal how many issues people have upgrading to a release. Let me fix |
Thanks @gabrielmoncea , your workaround worked for me. But this bug is still annoying. |
It's also a problem with a new react-native project .., not just an upgrade. |
This is happening to me since React Native 0.66.0, the bug starts from this version. |
For the steps to repro, can you share the commands you're running? And maybe a specific native package? |
I just come across this error and cleaning build folder in Xcode worked for me, but I'm not sure if this works all the time |
I am currently facing two different issues:
Using the latest cocoapods version to install the pods (Mac M1 silicon) The following is the current build error, hope it can be somewhat useful |
Yep, this works for me too, but the behaviour is the same, this error only appears if I update or install a native library, if I don't do any of that Xcode does not generate an error. |
@Deepacks Did u find any solution or suggestions for this bugs ? |
@Deepacks I had the same issue on "react-native": "0.66.1" Also be sure to comment out |
Is it my imagination or since React Native version 0.64.2 getting a simple app going without any issues right out of the gate has been practically impossible. Add |
@J6ey @askndaer1 Hello, i want to share this even though i am in total disbelief that i could get it working because of this. I had to make sure to place the project (so when i type This will cause errors Some info about my config:
Please let me know if your issues can be solved by checking this painfully simple thing. |
HI @facebook, Thank you for wasting 6hr of my day.
The above worked. |
8 hours for me, and it still doesn't work |
Same thing happening to me :( |
Upgrading react-native to 0.66.3 fixed an issue for me! |
Upgrading to the latest RN version fixed it. |
not work for me. any idea? |
As mentioned by others, upgrading your react native version should work. |
Thanks its work for me |
Got this one also while updating from Expo 44 (RN 0.63.4) to Expo 45 (RN 0.68.2) and I cannot figure out how to resolve it, has anyone ever found a proper solution to this? EDIT: Needed to enable the new architecture while installing pods with:
EDIT2: After hours of researching i'm back to this issue, because react-native-reanimated does not works with new architecture + react-native 0.68.2... I'm starting to loose hope, back to the old EDIT3: It seems somehow that the files EDIT4: I've fixed that by properly setting the Same happens when running the app from command-line (i.e; with |
I have the same issue on a Mac M1. Is this issue caused by the ARM architecture? Is there a workaround for it, or do I need to downgrade to Expo 44? |
@alerighi I'm on an Intel mac so not linked to M1 |
I've tried on a Intel MAC and the build is successful. To give some context, I'm using fastlane to build the application (the M1 Mac is used for the CI process). I really have no idea on how to solve the issue, I've tried everything. |
@alerighi The actual issue seems to be that the Phase Script does not generate Spec files (used by the new arch i feel) because it does not find node, and thus cannot run the generate spec script (as I understand it). What worked for me was to check that the
Of course if you don't use nvm, then i don't know 😅 |
It seem to generate some files but are in a directory out/ inside the directory where the file would normally be placed. I have node installed with brew rather than with nvm. Can it be a problem since I'm using a arm version of node? |
Finaly found the issue! I traced it down to a difference in how cp command from GNU Coreutils and the BSD one in MacOS works. The cp -R "build/generated/ios/out/" "build/generated/ios" GNU Coreutils cp interpret this as copy the directory By removing the GNU Coreutils from the PATH it works as expected (I did have them in PATH since I mainly use Linux and I'm used to them). A mystery solved. |
hell... |
Dude, you saved my day. Literally worked just by doing these changes. I was struggling with it for days. Thanks, buddy. |
Tried most. But none of the solution works. Its brand new solution after |
For anyone else experiencing this issue, another solution is to use patch-package to patch this file: Change this line: To this: This change should make this work with GNU and BSD. |
@Joshuapwilley anything preventing the change you are suggesting to be submitted as a PR? Is there one out already? |
For anyone else reading this. The only thing I have had success with was using: |
See the issue at facebook#32432 (comment) This fixes a bizarre issue when using the GNU coreutils tools. There are very minor changes in the standard command-line tools on macOS and the GNU coreutils. The `cp` command has slightly different semantics across these operating systems, so this commit normalizes those differences and allows GNU coreutils to be used or the system native version of `cp`.
See the issue at facebook#32432 (comment) This fixes a bizarre issue when using the GNU coreutils tools. There are very minor changes in the standard command-line tools on macOS and the GNU coreutils. The `cp` command has slightly different semantics across these operating systems, so this commit normalizes those differences and allows GNU coreutils to be used or the system native version of `cp`.
@Joshuapwilley - #35382 has this merged. # Copy all output to output_dir
- cp -R "$TEMP_OUTPUT_DIR/" "$RCT_SCRIPT_OUTPUT_DIR" || exit 1
+ cp -R "$TEMP_OUTPUT_DIR/." "$RCT_SCRIPT_OUTPUT_DIR" || exit 1 This one byte commit (the "/." wasn't needed on the destination directory above) fixes the issues for our team (which is using the GNU coreutils version of the Thanks for doing the hard work of finding this sucker. |
I made a little visual to show the difference in the |
Summary: See the issue at #32432 (comment) This fixes a bizarre issue when using the GNU coreutils tools. There are very minor differences in the standard command-line tools on macOS and the GNU coreutils. The `cp` command has slightly different semantics across these operating systems, so this commit normalizes those differences and allows GNU coreutils to be used or the system native version of `cp`. Fixes #32432 ## Changelog [General] [Fixed] - Allow GNU coreutils to be used to build projects Pull Request resolved: #35382 Test Plan: This change allows the use of the system or GNU coreutils verson of `cp`. Reviewed By: cipolleschi Differential Revision: D41532472 Pulled By: cortinico fbshipit-source-id: f0fe5274d3828bf6099deceee797a82a6adfdcab
For me it was also the wrong You can also change cp version Instead of changing First check cp version with
The BSD version is in Change with:
|
…ok#35382) Summary: See the issue at facebook#32432 (comment) This fixes a bizarre issue when using the GNU coreutils tools. There are very minor differences in the standard command-line tools on macOS and the GNU coreutils. The `cp` command has slightly different semantics across these operating systems, so this commit normalizes those differences and allows GNU coreutils to be used or the system native version of `cp`. Fixes facebook#32432 ## Changelog [General] [Fixed] - Allow GNU coreutils to be used to build projects Pull Request resolved: facebook#35382 Test Plan: This change allows the use of the system or GNU coreutils verson of `cp`. Reviewed By: cipolleschi Differential Revision: D41532472 Pulled By: cortinico fbshipit-source-id: f0fe5274d3828bf6099deceee797a82a6adfdcab
Description
After updating RN from 0.65.1 to 0.66.1, my iOS builds were failing with the following errors.
I thought one of the libraries I'm using is not compatible with the new version, so I've started a new project from the typescript template and added them one by one.
I turned out that that every time I add a new library with a native change, I get this error message and the only way to bypass it is by cleaning the project and restarting it with the following commands.
rm -rf node_modules ios/build ios/Pods ios/Podfile.lock && yarn cache clean
yarn && cd ios && pod install && cd ../
yarn start --reset-cache
React Native version:
Steps To Reproduce
Expected Results
App should build successfully as it normally does.
The text was updated successfully, but these errors were encountered: