Closed
Description
Environment
>> react-native info
React Native Environment Info:
System:
OS: macOS High Sierra 10.13.6
CPU: x64 Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
Memory: 554.38 MB / 16.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 8.12.0 - ~/.nvm/versions/node/v8.12.0/bin/node
Yarn: 1.9.4 - /usr/local/bin/yarn
npm: 6.4.1 - ~/.nvm/versions/node/v8.12.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:
Android Studio: 3.1 AI-173.4907809
Xcode: 10.0/10A255 - /usr/bin/xcodebuild
npmPackages:
react: 16.5.0 => 16.5.0
react-native: 0.57.0 => 0.57.0
Description
The cli is broken once you have installed xcode 10. Creating any new project will render the same issue (compilation failure) as it seems to be failing compiling double conversion as illustrated below:
react-native run-ios
Found Xcode project awesome.xcodeproj
Launching iPhone 6 (iOS 12.0)...
Building using "xcodebuild -project awesome.xcodeproj -configuration Debug -scheme awesome -destination id=F0EA48DA-E7A0-4E8F-92B3-3D4A2AA93B76 -derivedDataPath build"
▸ Copying /Users/rod/dev/react/testing/awesome/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.h
▸ Copying /Users/rod/dev/react/testing/awesome/node_modules/react-native/ReactCommon/yoga/yoga/YGEnums.h
▸ Copying /Users/rod/dev/react/testing/awesome/node_modules/react-native/ReactCommon/yoga/yoga/YGMacros.h
▸ Compiling YGStyle.cpp
▸ Compiling YGLayout.cpp
▸ Compiling Yoga.cpp
▸ Compiling YGNode.cpp
▸ Compiling YGNodePrint.cpp
▸ Compiling YGFloatOptional.cpp
▸ Compiling YGEnums.cpp
▸ Compiling Utils.cpp
▸ Analyzing Yoga.cpp
▸ Analyzing YGStyle.cpp
▸ Analyzing YGNodePrint.cpp
▸ Analyzing YGNode.cpp
▸ Analyzing YGLayout.cpp
▸ Analyzing YGFloatOptional.cpp
▸ Analyzing YGEnums.cpp
▸ Analyzing Utils.cpp
▸ Building library libyoga.a
▸ Copying /Users/rod/dev/react/testing/awesome/node_modules/react-native/ReactCommon/jsinspector/InspectorInterfaces.h
▸ Compiling InspectorInterfaces.cpp
▸ Analyzing InspectorInterfaces.cpp
▸ Building library libjsinspector.a
▸ Copying /Users/rod/dev/react/testing/awesome/node_modules/react-native/ReactCommon/privatedata/PrivateDataBase.h
▸ Compiling PrivateDataBase.cpp
▸ Analyzing PrivateDataBase.cpp
▸ Building library libprivatedata.a
▸ Running script 'Install Third Party'
▸ Compiling strtod.cc
❌ error: Build input file cannot be found: '/Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/strtod.cc'
▸ Compiling fast-dtoa.cc
❌ error: Build input file cannot be found: '/Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/fast-dtoa.cc'
▸ Compiling fixed-dtoa.cc
❌ error: Build input file cannot be found: '/Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/fixed-dtoa.cc'
▸ Compiling double-conversion.cc
❌ error: Build input file cannot be found: '/Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/double-conversion.cc'
▸ Compiling diy-fp.cc
❌ error: Build input file cannot be found: '/Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/diy-fp.cc'
▸ Compiling cached-powers.cc
❌ error: Build input file cannot be found: '/Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/cached-powers.cc'
▸ Compiling bignum.cc
❌ error: Build input file cannot be found: '/Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/bignum.cc'
** BUILD FAILED **
The following build commands failed:
CompileC /Users/rod/dev/react/testing/awesome/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/strtod.o /Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/strtod.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
CompileC /Users/rod/dev/react/testing/awesome/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/fast-dtoa.o /Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/fast-dtoa.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
CompileC /Users/rod/dev/react/testing/awesome/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/fixed-dtoa.o /Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/fixed-dtoa.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
CompileC /Users/rod/dev/react/testing/awesome/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/double-conversion.o /Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/double-conversion.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
CompileC /Users/rod/dev/react/testing/awesome/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/diy-fp.o /Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/diy-fp.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
CompileC /Users/rod/dev/react/testing/awesome/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/cached-powers.o /Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/cached-powers.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
CompileC /Users/rod/dev/react/testing/awesome/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Objects-normal/x86_64/bignum.o /Users/rod/dev/react/testing/awesome/node_modules/react-native/third-party/double-conversion-1.1.6/src/bignum.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(7 failures)
Installing build/Build/Products/Debug-iphonesimulator/awesome.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/awesome.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/awesome.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
at checkExecSyncError (child_process.js:602:13)
at Object.execFileSync (child_process.js:622:13)
at Promise.then (/Users/rod/dev/react/testing/awesome/node_modules/react-native/local-cli/runIOS/runIOS.js:208:5)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:189:7)
Reproducible Demo
- Let you mac update to xcode 10 and command line tools.
- Create brand new project
react-native init awesomeApp
- Once it has finished setting up, run
cd awesomeApp && react-native run-ios
Workaround for new projects
Once the project has been initialised, kill facebook's team identifiers with
sed -i '' '/DevelopmentTeam = V9WTTPBFK9/d;/DEVELOPMENT_TEAM/d;/ProvisioningStyle = Automatic/d' ./node_modules/react-native/React/React.xcodeproj/project.pbxproj
Running react-native run-ios
this time should work.
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
otaviogaiao commentedon Sep 18, 2018
I was having a similar issue, in my case, just accepting the xcode license solved all issues.
kelset commentedon Sep 18, 2018
Support for XCode 10 is not fully tested yet - please refer to #19573 to know what's the current status. That said if accepting the license is the solution please close this issue.
omatrot commentedon Sep 18, 2018
I have the same errors with an existing project, building in XCode or from React Native CLI. Probably not a licence issue.
mattijsf commentedon Sep 18, 2018
I was facing a similar issue after upgrading. To solve it I ran the following commands:
Now Xcode builds fine.
kelset commentedon Sep 18, 2018
Do you have to run those commands on new projects too @mattijsf? Or projects created after you have XCode 10 installed "just work"?
xzilja commentedon Sep 18, 2018
In my case this answer helped
https://stackoverflow.com/questions/50718018/xcode-10-error-multiple-commands-produce/50721769
Had to remove info plist files from specified location, there are couple caveats in XCode 10 that are not necessarily react-native specific.
chrisbianca commentedon Sep 18, 2018
I'm seeing the same too. @mattijsf's solution did allow iOS to compile, however as a side effect, I then saw the following errors when trying to run the Android version:
Clearing down node_modules and re-running
npm install
allowed Android to compile, but failed on iOS again.@kelset In response to your question above - this happened both on an old project created before XCode 10 was installed and a new project created after XCode 10 was installed. It happens on both RN 0.56 and 0.57.
xzilja commentedon Sep 18, 2018
@chrisbianca This happened to me on existing project, try to remove your node modules, clear watchman cache and yarn / npm cache to re-install everything (maybe even try clearing lock files if you can). After I did all that, third party issue wen't away.
This issue has more info: #14382
mattijsf commentedon Sep 18, 2018
@kelset I have the same problem after I bootstrap a new project using
react-native init
and openingios/[project].xcodeproj
in Xcode 10.mattijsf commentedon Sep 18, 2018
It feels to me this issue is impacted by some parallel build / racing condition...
I can repeat the following script 10x but I get the same error every time:
rm -rf TestAppRN0570 ; react-native init TestAppRN0570 ; cd TestAppRN0570 ; react-native run-ios ; cd ..
However if execute
react-native run-ios
again for the 2nd time it builds. So basically only the initialrun-ios
fails.The same thing can be said with opening the project for the first time in Xcode (without using
run-ios
) The first build fails, the second build succeeds.ChrisChares commentedon Sep 18, 2018
Thanks @mattijsf, solution worked for me as well. Project originally created with Xcode 9, now compiles correctly with 10 after executing those two scripts.
You can execute them directly btw, no need to
cd
in and out of their directories# From project root $ node_modules/react-native/scripts/ios-install-third-party.sh $ node_modules/react-native/third-party/glog-0.3.5/configure
mattijsf commentedon Sep 18, 2018
@ChrisChares I discovered that running the bare
configure
script actually produces a faultyconfig.h
, causing issues building on physical devices in Xcode 10. Please consider one of the following approaches:cd node_modules/react-native/third-party/glog-0.3.5/ && ../../scripts/ios-configure-glog.sh
hramos commentedon Sep 18, 2018
The original issue text's workaround for new projects looks like what we already have in place in master (8103c43).
Can people make the change from 8103c43 to their project and verify if that, by itself, solves the issue?
41 remaining items