4

I am following the ReactNative tutorial for 0.58. I do everything it says to do and I am crashing after running react-native run-ios. I have seen this extremely similar SO question from 2016.

  • I attempted react-native upgrade and it recommended doing react-native-git-upgrade.This did nothing. Same problem.
  • The bit on running ./configure in the question above after cd-ing into glog did nothing. There was no configure script there. In the path NewStupidProject/node_modules/react-native/scripts there is a script called ios-configure-glog.sh. I run bash ios-configure-glog.sh and it says ios-configure-glog.sh: line 31: ./configure: No such file or directory.
  • I have also attempted setting Xcode to use the legacy build system. This did not fix the issue. I am restarting my laptop now to see if that makes any of these changes take effect. No luck. At the top it says:

Found Xcode project NewStupidProject.xcodeproj Building using "xcodebuild -project NewStupidProject.xcodeproj -configuration Debug -scheme NewStupidProject -destination id=854019D1-8EE7-4D13-87E1-385E6CAC21BE -derivedDataPath build" User defaults from command line:

IDEDerivedDataPathOverride = /Users/me/NewStupidProject/ios/build

Prepare build

note: Using legacy build system === BUILD TARGET double-conversion OF PROJECT React WITH CONFIGURATION Debug ===

When I go into the home directory and run react-native --version the output is:

[NewStupidProject](master)$ react-native --version
react-native-cli: 2.0.1 
react-native: 0.58.4 
[NewStupidProject](master)$

My output after crashing is:

** BUILD FAILED **

The following build commands failed: PhaseScriptExecution Install\ Third\ Party /Users/me/native_react_apps/NewStupidProject/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Script-190EE32F1E6A43DE00A8543A.sh (1 failure)

Installing build/Build/Products/Debug-iphonesimulator/NewStupidProject.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/NewStupidProject.app/Info.plist Print: Entry, ":CFBundleIdentifier", Does Not Exist

Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/NewStupidProject.app/Info.plist Print: Entry, ":CFBundleIdentifier", Does Not Exist

at checkExecSyncError (child_process.js:637:11)
at Object.execFileSync (child_process.js:655:13)
at Promise.then (/Users/me/native_react_apps/NewStupidProject/node_modules/react-native/local-cli/runIOS/runIOS.js:208:5)

How is it possible for the setup process to be this fraught with errors and this difficult?

WHY is this error message not in the Troubleshooting ReactNative setup?

HOW do I fix this? Is it possible to avoid this altogether in the future?

Other versioning info:

  • XCode: 10.1
  • Command Line Tools: 10.1
  • yarn: 0.27.5
  • watchman: 4.9.0
  • homebrew: 2.0.1
  • npm: 6.8.0
  • node: v11.9.0
  • macOS: 10.13.6

UPDATE: I am trying to implement the solution in this issue in GitHub and I'm getting:

dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib Referenced from: /usr/local/bin/awk Reason: image not found ./ios-install-third-party.sh: line 20: 24497 Broken pipe: 13
shasum -p "$cachedir/$file" 24498 Abort trap: 6 | awk -v hash="$hash" '{exit $1 != hash}' Incorrect hash: 61067502c5f9769d111ea1ee3f74e6ddf0a5f9cc ?/Users/me/.rncache/glog-0.3.5.tar.gz

UPDATE No. 2 I am trying to run the watchman watch-del-all command as recommended here to clear the cache for RN > 0.50 and the whole thing is hanging.

enter image description here

Scott Skiles
  • 3,647
  • 6
  • 40
  • 64
  • Yeah so I set the project settings to use the legacy build settings, restarted my computer, and ran `react-native run-ios` and it is still throwing up all over my console. Something about `glog` and the `bundle.` This is beyond frustrating. Ironically, I am trying to convince my friend how great `react-native init` is over using Expo and `expo init`. Not going well. – Scott Skiles Feb 16 '19 at 17:29
  • That is annoying. Have you cleaned the build folder? This issue should no longer exist on on version `0.58.+` and I haven't experienced it since upgrading. You should also look at this for properly clearing the [cache](https://gist.github.com/jarretmoses/c2e4786fd342b3444f3bc6beff32098d). I have also used this [script](https://gist.github.com/fiznool/739b8e592596b5731512edfd77a1a2e9) to fix the 3rd party issue – Andrew Feb 16 '19 at 17:45
  • Thank you for this. I will run that script afterwards, looks good. Is `watchman watch-del-all` expected to take a long time? It seems to be hanging. – Scott Skiles Feb 16 '19 at 18:07
  • Alright, thanks for the help, Andrew. I'll try this and report back. Do you have any insight to long-term solutions for this? – Scott Skiles Feb 16 '19 at 18:28
  • No idea, I don't have this problem with version `0.58.+`. Most issues I encounter are resolved by either removing the build folder, clearing the cache, or by building from Xcode, or a combination. – Andrew Feb 16 '19 at 18:33
  • Thanks again. This `watchman watch-del-all` is literally taking hours. Can I inspect the output of this anywhere to verify it is doing something? – Scott Skiles Feb 16 '19 at 21:26
  • It shouldn’t take hours. You need to kill it as it sounds like it has hung/crashed – Andrew Feb 16 '19 at 21:49
  • @ScottSkiles, did you ever resolve this? – Daniel May 31 '19 at 14:14
  • Sadly, no. The breaking changes between React Native upgrades and XCode / macOS are really doing my head in and have given up for the time being. – Scott Skiles May 31 '19 at 15:18

1 Answers1

0

I tried modify the build system and it worked for me.

Detail:

Open your project workspace file in Xcode, and

File -> Workspace Settings -> Build system -> Legacy Build system
Zanecola
  • 1,394
  • 3
  • 15
  • 27