-
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
When new Xcode build system is used, Xcode build fails to download third-party dependencies #20774
Comments
This comment has been minimized.
This comment has been minimized.
Still having trouble with this - using the example app on BuddyBuild and cannot get past the third-party libraries (for example double conversion). Note this also happens locally, but in that case I have the option of running the command again and the build succeeds. Here's a portion of the log from BB:
|
This comment has been minimized.
This comment has been minimized.
None. Have to admit some confusion as the reproducible nature would seem to apply to everyone. I have not had time to dig into it, I suspect that the caching and copying activities for these assets is performed asynchronously with the compile step. Perhaps some sort of synchronization between the activities has broken or doesn't exist. |
I'm giving up on trying to get Xcode 10 to work…third party dependencies (double-conversion…) cause build errors on BuddyBuild. This seems to be a recurring theme with these massively-dependent open source platforms. 😑 |
This comment has been minimized.
This comment has been minimized.
I'm also experiencing this. I have tried many of the posts with high upvotes on this issue (#14382) and have still not reached a solution. Going to try re-install old XCode version and copy iOS 12 support files from beta. EDIT: Downgrading fully resolved. Download both XCode 10 and XCode 9.4.1 from here (https://developer.apple.com/download/more/) and follow instructions here (https://stackoverflow.com/questions/51215836/ios-12-not-supported-by-xcode-9-4-could-not-locate-device-support-files) |
Ok, I think I have a temporary fix to get React Native to work with Xcode 10—change the shared project settings (or shared workspace settings if you're also using Cocoapods) to use the "Legacy Build System". File->Project/Workspace Settings->Build System: Legacy Build System. It's (not really) surprising that Facebook hasn't fixed this in the months that have passed since WWDC18. Good luck, everyone. EDIT: This issue didn’t always happen in Xcode on the Mac. It regularly failed when I pushed to a CI system like BuddyBuild. |
FWIW, I just upgraded a rather complicated old React Native project to
|
Curious. I followed Alex’s suggestion about changing the Workspace setting Build System to Legacy Build System and that worked for me. I’m now looking at my React Native Environment Info to compare with Paul’s for differences. The first I note is node and npm as well as I did not use CRNA.
… On Sep 18, 2018, at 6:00 PM, Paul Mestemaker ***@***.***> wrote:
FWIW, I just upgraded a rather complicated old React Native project to 0.57.0 and set it up using CocoaPods and everything builds fine with Xcode 10. See below for my environment details...
React Native Environment Info:
System:
OS: macOS High Sierra 10.13.6
CPU: x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
Memory: 717.64 MB / 32.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.9.0 - ~/.nvm/versions/node/v10.9.0/bin/node
Yarn: 1.9.4 - /usr/local/bin/yarn
npm: 6.4.1 - ~/.nvm/versions/node/v10.9.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0
IDEs:
Xcode: 10.0/10A255 - /usr/bin/xcodebuild
npmPackages:
react: 16.5.0 => 16.5.0
react-native: 0.57.0 => 0.57.0
npmGlobalPackages:
create-react-native-app: 1.0.0
react-native-cli: 2.0.1
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#20774 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAP7XwBfK9WORikYIKhbTdfqkVl-223wks5ucZcVgaJpZM4WGsiv>.
|
I have I'm curious if you upgrade from |
I failed to note that between the initial report of the issue and now I have upgraded to 0.57.0 and that did not solve the problem. I’ve also upgrade node and npm and that has not resolved the issue either. So far for me it is the Legacy Build System setting that seems to fix the build issue. Makes sense as I had no problem with Xcode 9.4.1.
My question now is what is the difference between the two build systems and is the difference material?
… On Sep 19, 2018, at 12:19 AM, Paul Mestemaker ***@***.***> wrote:
I have create-react-native-app installed, but I did not use it for this project. I used react-native init to create the project and then manually migrated the source files from a much older version of RN.
I'm curious if you upgrade from 0.56.0 to 0.57.0, if that will solve your problem without the Legacy Build System workaround.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#20774 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAP7X9JOhep39fDihiJ0GK2WBINqhoQFks5uce_mgaJpZM4WGsiv>.
|
I also tried to upgrade to |
The build failure I’m getting is related to the third-party libraries upon which react-native is dependent. As near as I can tell the build steps for these require the download via curl into a cache directory (~/.rncache ?), unpacking and copying into the RN projects’s node modules subdirectory for react-native and finally compilation.
It appears the “new” build system in Xcode does not have information to properly sequence the dependent steps, such that the compile step is attempted before the files are moved into node modules. On a local machine, on subsequent builds, this “race” condition does not occur again and the compilation succeeds as the “state” of the download, unpack and copy seems to be preserved. On remote build systems, the state of the download, unpack and copy are not preserved and the compilation fails every time.
Two questions I have: is there a material difference between the new and legacy build system (performance, parallelism, what ???) and where in the build configuration can the new build system be told how to properly sequence the build steps for these libraries?
… On Sep 19, 2018, at 8:37 AM, Pedro Gomes ***@***.***> wrote:
I also tried to upgrade to react-native 0.57.0 but that didnt solve this issue. I ended up downgrading Xcode to 9.4.1 and installing the iOS 12 device support files that you can find on this repo:
https://github.com/Yatko/iOS-device-support-files <https://github.com/Yatko/iOS-device-support-files>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#20774 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAP7Xz-2Sz0dMtVuOaiessNZ0gwuolbqks5ucmTUgaJpZM4WGsiv>.
|
I ran into a similar problem using Jenkins and Xcode 10. Here is what I noticed
With this new information, I have a workaround. I run the node_modules/react-native/scripts/ios-install-third-party.sh script immediately after npm install on our build machine. This way, the third party folder and all it's subfolders are downloaded and ready when we begin compiling the Xcode project which happens a few minutes later since we have to compile react-native bundle in between |
We ran into the same problem and fixed it by adding this as a cd node_modules/react-native/React/..; exec ./scripts/ios-install-third-party.sh This will run the script in the correct directory which will make it pass later in the build process. |
Only viable solution that persists across ci builds seems to be using legacy build system |
Do you have any timeline when React native will be fully supporting xcode 10? Lots off issues are happening. Clients are just waiting for apps to be shipped and we are sitting fingers crossed to get updates :( |
There's no single fix that will provide full support for Xcode 10. We are tracking all known issues so far in #19573. For each of those, the community will need to provide a pull request with a fix. Ideally, we'd get PRs to fix all of these in time for the 0.58 release cut. If you're blocked by Xcode 10 issues, the best course of action is to make sure the issue is logged in #19573, followed by sending a PR to fix the issue. |
My post tracking Xcode 10 related issues was created on June 5, the day of the WWDC 2018 Keynote: #19573, by the way. That's still a year too late, as the new build system was introduced during WWDC 2017, but it's hardly a new issue in this tracker. As the developer tooling is updated every year, we depend on volunteers using the betas to surface any issues and fixes in time for the general release. |
use |
Workaround in OP worked for me but with some little adjustments in steps 2 and 3: Oherwise, it would create the Also, I had to follow this to correctly link to And a final thing (couldn't verify this is required, maybe my dependencies were outdated) was running a |
Hello @hiepnm 👋! By using the repro / the list of steps to reproduce, we can't actually see the reported bug on RN 0.59 so we'll close this issue. It may have something to do with your local setup, please double check that you are using the correct version of Android Studio / XCode / Android NDK / Yarn / etc. Reference issue for XC10 support #19573 |
I'm having this issue on RN 0.59.1. This happens after running It appears that the
The version of shasum is So I removed the I ran into the problem.
This is due to After all this, I was finally able to build and run the project in xcode. |
OK, this seems to be solved in #24036. |
I'm still encountering this issue as of 0.59.3 after following the React Native CLI getting started on macOS and iOS latest version of Xcode |
My very whacky workaround (maybe it helps someone else): when I build the app from scratch in Xcode 10 using react-native 0.59.3, I get the mentioned errors; however, when I first build it in Xcode 9 (9.4.1 to be precise) and then (without clearing the project of course) build it again in Xcode 10.1 it works. Apparently Xcode 9 generates some build artefacts that are reused by Xcode 10. I don't see this as a "solution" of course, it just keeps my project alive 🤕 |
This worked for me 🙌 |
[RN 0.59.4 / Xcode 10.2] And If i use Xcode 10.1, Using new build system is fine. Build is success.... |
RN 0.57.7 and XCode 10.2
Any suggestions or workarounds to solve this issue? Thanks for that savior. |
I don't think anything below 0.59.2 works with Xcode 10.2, bacause of some changes with the load methods. |
@0ff thank you! could you explain how to apply your solution please? not sure what to do |
Is the new xcode build system supported on RN 0.59+? Im using xcode 10.2 and have tried using the new build system but it errors saying there is an issue with my carthage libs. |
It works just fine for me, but I don't use any Carthage libraries... |
Summary: Fixes facebook#20774 The new Xcode build system uses parallel execution to run build steps that don't have an obvious dependency. Our Xcode project was written with the assumption that the **Install Third Party** build step is run _before_ compiling the `third-party` libraries. To address this issue, this PR adds dependency information to the project to teach Xcode that `ios-install-third-party.sh` is generating the files under `third-party`. With this additional information, Xcode correctly waits for `ios-install-third-party.sh` to finish before advancing to the compile step. In addition to the Xcode project changes, I had to make some changes to the script `ios-install-third-party.sh` so that 1. it would always execute the `ios-configure-glog.sh` script regardless of how it was invoked 2. it would always install the libraries even if Xcode had partially created the tree or if a previous install was interrupted Pull Request resolved: facebook#21458 Differential Revision: D10365495 Pulled By: hramos fbshipit-source-id: c88042583f21d2447a16f6ae2b6abb929c659a26
clang: error: no such file or directory: '/Users/pavelkuzmin/D/RC/DA/node_modules/react-native/third-party/double-conversion-1.1.6/src/cached-powers.cc' :( |
I am facing a little different issue when i run ./ios-install-third-party.sh Still I ran cd /node_modules/react-native/scripts/third-party/glog-0.3.5 instead of cd /node_modules/react-native/third-party/glog-0.3.5 But still same issue. |
I do have the same problem. Can't build after basic init from react-native init mytestingapp. |
It finally worked. What I did is use npx react-native init awesomeproject. And I was able to build the project. |
I had to remove the |
when i run my project on terminal for react-native i faced this issuue. is there any solution? |
Workaround (edit by @hramos)
You may work around this by manually installing third party dependencies into your project. The following steps are based on the workaround provided by @lyon007 in #14382.
rm -rf node_modules/ && yarn cache clean && yarn install
andrm -rf ~/.rncache
cd node_modules/react-native/scripts
./ios-install-third-party.sh
If your network is slow, you can download the packages separately and move them to the
rncache
folder1. folly-2016.10.31.00
2. double-conversion-1.1.5
3. glog-0.3.5
4. boost_1_63_0
cd <Your-Project-Folder>/node_modules/react-native/third-party/glog-0.3.5
../../scripts/ios-configure-glog.sh
Original issue
Environment
React Native Environment Info:
System:
OS: macOS High Sierra 10.13.6
CPU: x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
Memory: 103.23 MB / 4.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.9.0 - ~/.nvm/versions/node/v10.9.0/bin/node
npm: 6.4.0 - ~/.nvm/versions/node/v10.9.0/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0
IDEs:
Xcode: 10.0/10L221o - /usr/bin/xcodebuild
npmPackages:
react: 16.4.1 => 16.4.1
react-native: 0.56.0 => 0.56.0
npmGlobalPackages:
react-native-cli: 2.0.1
Description
First build request after yarn or npm install does not succeed due to apparent timing of download, extract, and compile actions. Subsequent builds succeed until node_modules removed and yarn or npm install run again.
Similar to this closed issue:
#18982
This is not a problem in the local development environment as the work around is to simply rerun the build command. However, with remote build environments (Buddybuild, App Center, etc) this becomes problematic.
Reproducible Demo
Follow these steps:
0 - configure environment as per react-native info above
1 - from shell - react-native init DoubleTrouble
2 - from shell - cd DoubleTrouble
3 - from shell - react-native run-ios
Here is the tail end of output I received:
** BUILD FAILED **
The following build commands failed:
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/DoubleTrouble.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):
Failed to install the requested application
The bundle identifier of the application could not be determined.
Ensure that the application's Info.plist contains a value for CFBundleIdentifier.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/DoubleTrouble.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
The text was updated successfully, but these errors were encountered: