react-native: New project fail to build on iOS (double-conversion.build failed)
Reporting Bugs
New project fail to build on iOS (double-conversion.build failed)
Reproduction Steps and Sample Code
react-native init
to create a new project and run react-native run-ios
Useful error messages:
/bin/sh -c /Users/zjy/Code/play/PlayWithRN/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/double-conversion.build/Script-190EE32F1E6A43DE00A8543A.sh
Unpacking /Users/zjy/.rncache/boost_1_63_0.tar.gz…
tar: (Empty error message)
tar: Error exit delayed from previous errors.
Command /bin/sh failed with exit code 1
** BUILD FAILED **
The following commands produced analyzer issues:
Analyze /Users/zjy/Code/play/PlayWithRN/node_modules/react-native/ReactCommon/yoga/yoga/YGNodeList.c Analyze /Users/zjy/Code/play/PlayWithRN/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.c (2 commands with analyzer issues)
The following build commands failed: PhaseScriptExecution Install\ Third\ Party /Users/zjy/Code/play/PlayWithRN/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/double-conversion.build/Script-190EE32F1E6A43DE00A8543A.sh (1 failure)
Installing build/Build/Products/Debug-iphonesimulator/PlayWithRN.app An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2): Failed to install the requested application An application bundle was not found at the provided path. Provide a valid path to the desired application bundle. Print: Entry, “:CFBundleIdentifier”, Does Not Exist
Additional Information
- React Native version: 0.45.0
- Platform: iOS
- Development Operating System: macOS 10.12.5
- Dev tools: Xcode 8.3.3
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 51
- Comments: 98 (5 by maintainers)
+1 0.45.0 din’t worked for me(same error) so i just used 0.44.0
react-native init [PROJECT_NAME] --version 0.44.0
This is a stupid issue. We can resolve it by moving react native project to a folder path without white space characters.
For ex this path will not work in RN 0.45.x: /User/viettranx/React Native/DemoApp
The reason is in where RN build the app, it export command was wrong:
export SCROOT=/User/viettranx/React Native/DemoApp
The right syntax must be
export SCROOT=/User/viettranx/React\ Native/DemoApp
That export command very important for the bash script in double conversion module. ** Remember delete your build folder in iOS for removing cache.
Hope it helps.
@viettranx But mine does not contain any space characters.
Managed to manually solve this by
curl
ing these into ~/.rncachehttps://github.com/google/glog/archive/v0.3.4.tar.gz https://github.com/google/double-conversion/archive/v1.1.5.tar.gz https://github.com/react-native-community/boost-for-react-native/releases/download/v1.63.0-0/boost_1_63_0.tar.gz https://github.com/facebook/folly/archive/v2016.09.26.00.tar.gz
I had some luck with the following:
Then clean in Xcode and rebuild. Thanks @viettranx
Just remove third-party folder, it will re-download and unpack with
react-native run-ios
command.0.45.0 din’t worked for me(same error) so i just used 0.44.0 react-native init [PROJECT_NAME] --version 0.44.0 ----- Thank: shubhnik This’s worked for me!!
The problem is when building react-native for iOS, the process tries to download some files (using
curl
) into~/.rncache
. Specifically, they are “boost_1_63_0.tar.gz, double-conversion-1.1.5.tar.gz folly-2016.09.26.00.tar.gz, glog-0.3.4.tar.gz”. The sources of them (at least some of them) are from AWS S3, which aren’t accessible in some regions (I’m from China). And that caused the problem.By using a proxy server and setting the
http_proxy
andhttps_proxy
environment variables, curl will go through the proxy and the build should succeed.This is not a problem with React Native. This issue can be closed now.
Same here, totally crippled at the moment.
Xcode & react-native-cli both updated to latest releases.
edit: manually downgrading to react-native@0.44.0 and react@16.0.0.alpha.6 (which I THINK is the right version?), with no other changes, worked for me
@irrigator yes.
XCode: 8.3.3 React Native: 0.45.1 React: 16.0.0-alpha.12
me too facing the same issue. There is an issue with 0.45. Like @llanginger said, after downgrading
npm install react-native@0.44.0
If you are using RN 0.44, you’d better keep it as below:"react": "16.0.0-alpha.6", "react-native": "0.44.0",
works well.
Fresh install
react-native init Hello
breaks Fresh installreact-native init Hello --version 0.44.0
worksSince I symlink into my iCloud drive folder, I can confirm whitespace was the issue for me but I also have issues on 0.44 related to react-native-flux-router so I have to manually edit generated bash scrips till this is resorted.
I guess symlinking into my iCloud Drive folder wasn’t that cool after all… 😦
Woohoo!
5 days back I complained on this thread about not being able to get 0.45.1 working. I was just starting to learn React Native then, today, after completing a couple courses/tutorials and making my first app with 0.44.2, I finally got 0.45.1 working by changing my workspace directory to one with no spaces (sound funny lol) and just did a
yarn install
after runninginit
..What puzzles me, is that this seems to be an issue introduced in the build system and that no one from FB is yet seriously taken part in this discussion… The tips here are tweaks/fixes that work for some, but do not address the real problem that has been introduced in 0.45. For instance, I do not have spaces in my project path. I have cleared yarn/npm cashes, deleted node_modules, etc. But with my app with only a few linked projects I can simply not use 45 for building it on Mac. So I am happily back to 0.44 (app in TestFlight phase). Can’t any active repo contributor comment on what’s going on? BTW, I really LOVE RN - so great to build fast native apps with JS(X)!
I had the same issue. DO NOT use space in project path
thankyou @SudoPlz 5c53f89 helped me. but why isn’t this in 0.46.2 already!?
EDIT: this fix is now in RN 0.46.3
Just leaving this here.
Some of you might be able to fix this with https://github.com/facebook/react-native/commit/5c53f89dd86160301feee024bce4ce0c89e8c187#commitcomment-23014602
@Msspl-PrashenjeetRoy by that I meant not having any whitespace in the project’s path.
I solved this problem by deleting .rncache folder within the home directory, deleting node modules and then yarn install, and works like a charm.
Basically just download the boost folder from here https://sourceforge.net/projects/boost/files/boost/1.63.0/ and replace it with the boost folder in your dummyproject/node_modules/react-native/thirdparty/ This is a workaround for now so you have to do this every time you create a new react native project . So use it until they fix the root of the problem . wasted a whole day searching for answers and finally found it!!
Fresh 0.45.1
init
failed with the same error for me . Happy to provide more info if needed.just upgrade react-native version to 0.44.0 then it fixed
I fixed this problem by amending my package.json file.Changing react-native version from 0.45.1 to 0.44.2.
@viettranx been following along. Your suggestions cleared up my errors that mimicked @irrigator , but now I am facing this one:
/Users/…/node_modules/react-native/third-party/boost_1_63_0/boost/config.hpp:30:12: ‘boost/config/user.hpp’ file not found
My project was working fine on RN 0.44.2, React: alpha.6
+1 Same here, When run command run-ios, I didn’t see the packager terminal open up. So I follow the above instructions, downgrade react-native to 0.44.0 and wala, it works