Skip to content
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

React native run-ios 0.57.x is broken #21741

Closed
3 tasks done
thaoth58 opened this issue Oct 12, 2018 · 54 comments
Closed
3 tasks done

React native run-ios 0.57.x is broken #21741

thaoth58 opened this issue Oct 12, 2018 · 54 comments
Labels
Bug Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.

Comments

@thaoth58
Copy link

thaoth58 commented Oct 12, 2018

Environment

React Native Environment Info:
System:
OS: macOS 10.14
CPU: x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
Memory: 233.97 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.11.0 - /usr/local/bin/node
Yarn: 1.10.1 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/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
Android SDK:
Build Tools: 23.0.1, 25.0.1, 26.0.2, 27.0.3
API Levels: 23, 25, 26, 27
IDEs:
Android Studio: 3.0 AI-171.4443003
Xcode: 10.0/10A255 - /usr/bin/xcodebuild
npmPackages:
react: 16.5.0 => 16.5.0
react-native: 0.57.2 => 0.57.2
npmGlobalPackages:
create-react-native-app: 1.0.0
react-native-cli: 2.0.1
react-native: 0.57.2

Description

When I run:
react-native init demoProject
cd demoProject
react-native run-ios

I got this issue:
Installing build/Build/Products/Debug-iphonesimulator/demoProj.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

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

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

at checkExecSyncError (child_process.js:611:11)
at Object.execFileSync (child_process.js:629:13)
at Promise.then (/Users/thaotruong/Desktop/demoProj/node_modules/react-native/local-cli/runIOS/runIOS.js:208:5)

Reproducible Demo

Just init new project

@rodrigoelp
Copy link

rodrigoelp commented Oct 12, 2018

Hi @thaoth58, you need to run react-native run-ios another two more times to get it to work properly (I wished I was joking).

Here is my sample:

[Edited: removed the sample as it made my post impossible to read]

Basically:

react-native init whatever
cd whatever
react-native run-ios # this is not going to work, it will fail with your compilation error.
react-native run-ios # this will not work either, it will compile a lot more but then is going to
# run into some other issues.
pkill node
open -a Terminal "`react-native start --reset-cache`"
react-native run-ios # this time it should work

@rodrigoelp
Copy link

And because somebody is going to ask about my environment:

~/d/r/t/whatever ❯❯❯ react-native info

  React Native Environment Info:
    System:
      OS: macOS 10.14
      CPU: x64 Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
      Memory: 30.55 MB / 16.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 8.12.0 - ~/.nvm/versions/node/v8.12.0/bin/node
      Yarn: 1.10.1 - ~/.nvm/versions/node/v8.11.4/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
      Android SDK:
        Build Tools: 23.0.1, 25.0.0, 25.0.2, 25.0.3, 26.0.1, 26.0.2, 27.0.0, 27.0.3, 28.0.2, 28.0.3
        API Levels: 23, 25, 26, 27, 28
    IDEs:
      Android Studio: 3.2 AI-181.5540.7.32.5014246
      Xcode: 10.0/10A255 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.5.0 => 16.5.0 
      react-native: 0.57.2 => 0.57.2 
    npmGlobalPackages:
      react-native-cli: 2.0.1

@rodrigoelp
Copy link

@thaoth58 I think this issue should be renamed to "React native run-ios 0.57.x is broken"

@thaoth58
Copy link
Author

React native run-ios 0.57.x is broken

Thanks, I edited. I've tried with Android and it works fine

@thaoth58 thaoth58 changed the title Cannot build the demo project React native run-ios 0.57.x is broken Oct 12, 2018
@rodrigoelp
Copy link

rodrigoelp commented Oct 12, 2018

@thaoth58 Yup, Android doesn't have these issues... It all happened with the introduction of xcode 10. If you need to move to something that works... install xcode 9.4.1 and configure your command line tools to the same as included in that xcode. But this is absurd to be honest.

@thaoth58
Copy link
Author

@rodrigoelp: I followed your sample but it still has that issue :(

@SnowZero
Copy link

SnowZero commented Oct 12, 2018

use npm start -- --reset-cache
after react-native run-ios

@kelset
Copy link
Contributor

kelset commented Oct 12, 2018

It's not run-ios to be broken, please refer to this for details #21303

@rodrigoelp
Copy link

@kelset, the compilation issue happens on a brand new project 100% of the times on the first run.

I call that broken, regardless of xcode failing to compile properly. Even when the compilation works (on the second run) then metro bundler fails... at that point you need to kill the node process, start again resetting the cache to get it to work as expected.

@sryze
Copy link
Contributor

sryze commented Oct 14, 2018

I have the same problem on a newly created project and with a not-so-new project someone else gave me. I ran react-native run-ios a hundred times - no luck.

I think react-native-cli expects the .app to be inside build but Xcode puts it into ~/Library/Developer/Xcode/DerivedData. I see how react-native tries to override the derived data path in the beginning via IDEDerivedDataPathOverride but it doesn't seem to work, I'm not sure why.

React Native version: 0.57.3
Xcode: 9.4.1

@sryze
Copy link
Contributor

sryze commented Oct 14, 2018

After I changed DerivedData path in project settings the react-native run-ios command worked for me.

Open Xcode project -> File -> Project Settings -> Under Derived Data click Advanced -> Change 3 paths to begin with <your_project_directory>/build, for example:

Products: /Users/szx/Desktop/MyApp/ios/build/Build/Products
Intermediates: /Users/szx/Desktop/MyApp/ios/build/Build/Intermediates.noindex
Index Datastore: /Users/szx/Desktop/MyApp/ios/build/Index/DataStore

@FireSmack
Copy link

you need to run react-native run-ios another two more times to get it to work properly (I wished I was joking).

I had to run it one more time to get it to work.

$ react-native info

  React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: x64 Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
      Memory: 666.66 MB / 32.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 8.11.2 - ~/.nvm/versions/node/v8.11.2/bin/node
      npm: 5.6.0 - ~/.nvm/versions/node/v8.11.2/bin/npm
      Watchman: 4.9.0 - /opt/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.6.0-alpha.8af6728 => 16.6.0-alpha.8af6728
      react-native: 0.57.3 => 0.57.3
    npmGlobalPackages:
      react-native-cli: 2.0.1

@rodrigoelp
Copy link

Hi @FireSmack, I tried your approach and still fails:

Here is what I did:

cd projectName
git clean ./ -fdx # this drops everything automatically generated and node_modules.
yarn

open ios/projectName.xcodeproj # and applied the changes you've mentioned
react-native run-ios # it fails, yet again.

@rodrigoelp
Copy link

Hi @FireSmack, I tried your approach and still fails:

Here is what I did:

cd projectName
git clean ./ -fdx # this drops everything automatically generated and node_modules.
yarn

open ios/projectName.xcodeproj # and applied the changes you've mentioned
react-native run-ios # it fails, yet again.

Although, to be fair... I am not using 0.57.3 because it has an even worst bug on Android :(

@cesarvarela
Copy link

For me it failed the first time on a new project, and worked the second time.

Mojave, latest react-native, 10.12.0 node, everything else up to date. I'm just following the get started section.

@EricMcRay
Copy link

I think something wrong with info.plist that does not work with new Xcode.

To fix this I follow these steps:

  1. open project in XCode
  2. wait XCode for to index, proccess files
  3. run react-native run-ios

@mayanring
Copy link

mayanring commented Oct 15, 2018

I was able to fix a few issues by using "legacy build mode" in XCode 10 (see File -> Workspace Settings -> Build System) - not this exact error mentioned above, but something else related to React third party stuff.

Note that you also need to add @babel/runtime to your dependencies in package.json, or your js bundle won't build. Not sure why this isn't included out of the box for new react native projects...?

@rodrigoelp
Copy link

Hi @rynmng, the runtime issue was fixed on already... I think it was included as part of 0.57.2 or 0.57.3. And the third party configuration is something you can fix by manually running the configuration from the react native folder (basically, delete your rncache and call configure to get it to work as expected.

This issue is more related to a race condition or some weird behaviour when you run react-native run-ios (with your environment configured with XCode 10) the first time you have configured a project or you rebase your work requiring to recompile the native iOS code.

This behaviour is not observed when your environment is configured with XCode 9.4.1, it is a problem with the new build system but this means Apple will face out that build system and RN needs to catch up with the tooling soon.

@mayanring
Copy link

mayanring commented Oct 16, 2018

@rodrigoelp thanks for the response!

I've had mixed results with running that config from the folder; it seems to break other things when trying to build on device. This is anecdotal evidence, though, because it seems to "just work" randomly after repeated tries and sometimes "not work at all" (I had an entire day where nothing I did could produce a working build on device).

The race condition note makes sense. For me, it didn't matter how many times I tried to build, I could not get it to work until I switched to legacy mode. It's probably important to note that I'm building directly from xcode 10 on a project started with 0.57.1 and react-native init, and not using react-native run-ios (which also didn't work for me).

It's good to know the @babel/runtime thing is fixed! Unfortunately I started a new project right when 0.57.0 or 0.57.1 was out and had no idea what was going on.

@shaynos
Copy link

shaynos commented Oct 16, 2018

As it turns out, the CFBundleIdentifier error is actually a generic, non-specific error, which is actually leading people on a wild goose chase. You need to check your build logs prior to the CFBundleIdentifier error to find the real cause of the crash.

Check out this issue, it's explained a bit better.

#21303

I tried the following:

Created a new project:
react-native init MyApp
cd MyApp
react-native run-ios

I ended up with the CFBundleIdentifier error when trying to build, but if I looked back about 80 lines I also found:

error: Build input file cannot be found: '/Users/Me/MyApp/node_modules/react-native/third-party/double-conversion-1.1.6/src/fast-dtoa.cc'

So I did a bit of a search and found this on stackoverflow:

https://stackoverflow.com/questions/52401856/problems-after-upgrading-to-xcode-10-build-input-file-cannot-be-found

I opened the project in Xcode, went to file > Workspace Setting, and changed build setting to Legacy Build System.

I can't guarantee that this will work for anyone else, and I can't guarantee that using Legacy Build System will not give you a head ache in the future, but, it got me up and running for now.

@davidfritch
Copy link

For me it failed the first time on a new project, and worked the second time.

Mojave, latest react-native, 10.12.0 node, everything else up to date. I'm just following the get started section.

This is exactly what happened for me. Also using node v10.12.0. Following the getting started here: https://facebook.github.io/react-native/docs/getting-started

@pronebird
Copy link

Sometimes I see the same issue and I think it's some sort of race condition. Sometimes it works sometimes it doesn't.

@rodrigoelp
Copy link

rodrigoelp commented Oct 25, 2018 via email

@edoardoc
Copy link

edoardoc commented Oct 25, 2018

I was about to follow @rodrigoelp instructions and pkill node but at the second time I invoked it it worked! so much for a deterministic scenario :/

can anyone suggest a good version of react native to work with?

@rodrigoelp
Copy link

rodrigoelp commented Oct 25, 2018 via email

@melvinsalas
Copy link

use npm start -- --reset-cache
after react-native run-ios

It worked for me

@fungilation
Copy link

I'm on RN 0.57.5. Things were working fine until today, upgrading packages. Now, after trying all the workarounds, on react-native run-ios I still end up with this in console:

** BUILD SUCCEEDED **



The following commands produced analyzer issues:
        Analyze /Users/garyfung/Documents/code/WonderSwipe/node_modules/react-native/React/Base/RCTModuleMethod.mm normal x86_64
        Analyze /Users/garyfung/Documents/code/WonderSwipe/node_modules/react-native/Libraries/Image/RCTImageCache.m normal x86_64
        Analyze /Users/garyfung/Documents/code/WonderSwipe/node_modules/react-native/Libraries/Network/RCTNetInfo.m normal x86_64
(3 commands with analyzer issues)

Installing build/Build/Products/Debug-iphonesimulator/wonderswipe.app
An error was encountered processing the command (domain=IXUserPresentableErrorDomain, code=1):
This app could not be installed at this time.
Failed to load Info.plist from bundle at path /Users/garyfung/Library/Developer/CoreSimulator/Devices/7F6A2E62-A7E2-4B70-98C5-76287108684F/data/Library/Caches/com.apple.mobile.installd.staging/temp.ocvk34/extracted/Payload/wonderswipe.app
Failed to load Info.plist from bundle at path /Users/garyfung/Library/Developer/CoreSimulator/Devices/7F6A2E62-A7E2-4B70-98C5-76287108684F/data/Library/Caches/com.apple.mobile.installd.staging/temp.ocvk34/extracted/Payload/wonderswipe.app
Underlying error (domain=MIInstallerErrorDomain, code=35):
        Failed to load Info.plist from bundle at path /Users/garyfung/Library/Developer/CoreSimulator/Devices/7F6A2E62-A7E2-4B70-98C5-76287108684F/data/Library/Caches/com.apple.mobile.installd.staging/temp.ocvk34/extracted/Payload/wonderswipe.app
Launching com.zeta.networks.wonderswipe
com.zeta.networks.wonderswipe: -1
An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=1):
The request to open "com.zeta.networks.wonderswipe" failed.
The request was denied by service delegate (SBMainWorkspace) for reason: NotFound ("Application "com.zeta.networks.wonderswipe" is unknown to FrontBoard").
Underlying error (domain=FBSOpenApplicationErrorDomain, code=4):
        The operation couldn’t be completed. Application "com.zeta.networks.wonderswipe" is unknown to FrontBoard.
        Application "com.zeta.networks.wonderswipe" is unknown to FrontBoard.

Build succeeded, but app half installed in an unusable state.

If I Run in debug mode in Xcode however, no error and app gets installed and run just fine.

Anyone else with similar experience, of dead end on cli run-ios but working fine when Run from Xcode?

I'm on MacOS 10.13.6, Xcode 10.1

@rodrigoelp
Copy link

rodrigoelp commented Nov 27, 2018

Interesting @fungilation, I have not seen that particular issue... Have you tried on a brand new project? (do try it on a brand new project and report back, react-native init newp && cd newp && react-native run-ios

I suggest you to migrate to 0.57.7 (works a lot better for me), remove all your node_modules and yarn again.

@KingAmo
Copy link

KingAmo commented Nov 28, 2018

@fungilation me too, failed whenrun-ios on cli, but success when run from Xcode

@fungilation
Copy link

Ok, I'm not the only one. @KingAmo what RN version are you on? And are you on Mac?

I'll try RN 0.57.7 later. I've already tried deleting node_modules and rn_cache dirs

@bhirmbani
Copy link

bhirmbani commented Nov 28, 2018

For anyone that failed building for ios with error related to 'CFBundleIdentifier' doesnt exist:
delete <your_project_name>.xcworkspace inside the ios folder, run react-native run-ios, and put back the deleted .xcworkspace. Another build with react-native run-ios after this step should works.

alternatively, just run in xcode by opening <your_project_name>.xcodeproj in Xcode and wait for it to run on simulator. you can quit the Xcode after this.

@KingAmo
Copy link

KingAmo commented Nov 29, 2018

@fungilation I have tried 0.57.7 and 0.58.0-rc.0, i have both Xcode 9.4 and Xcode 10 on my Mac, maybe this is the reason? hhhh

@rodrigoelp
Copy link

Hi @KingAmo, I got both versions of xcode (9.4.1 and 10) and 0.57.7 and I don't have that issue... could you guys please share your environment? (ping to @fungilation)

@KingAmo
Copy link

KingAmo commented Nov 29, 2018

React Native Environment Info:
    System:
      OS: macOS 10.14.1
      CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
      Memory: 341.09 MB / 16.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 10.11.0 - /usr/local/bin/node
      Yarn: 1.12.3 - ~/.yarn/bin/yarn
      npm: 6.4.1 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
      Android SDK:
        API Levels: 22, 23, 24, 25, 26, 27, 28
        Build Tools: 26.0.2, 26.0.3, 27.0.3, 28.0.2, 28.0.3
    IDEs:
      Android Studio: 3.2 AI-181.5540.7.32.5056338
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.6.1 => 16.6.1
      react-native: 0.57.7 => 0.57.7
    npmGlobalPackages:
      react-native-cli: 2.0.1

@rodrigoelp hope it helps, thanks for your work

@fungilation
Copy link

fungilation commented Nov 29, 2018

  React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: (4) x64 Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz
      Memory: 30.92 MB / 8.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 11.3.0 - /usr/local/bin/node
      Yarn: 1.12.3 - /usr/local/bin/yarn
      npm: 6.4.1 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
      Android SDK:
        API Levels: 23, 26, 27, 28
        Build Tools: 23.0.1, 23.0.3, 25.0.0, 25.0.1, 25.0.3, 26.0.1, 26.0.3, 27.0.3
        System Images: android-23 | Google APIs Intel x86 Atom, android-26 | Google APIs Intel x86 Atom, android-26 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom
    IDEs:
      Android Studio: 3.2 AI-181.5540.7.32.5056338
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.6.1 => 16.6.1 
      react-native: 0.57.5 => 0.57.5 
    npmGlobalPackages:
      eslint-plugin-react-native: 3.5.0
      react-native-cli: 2.0.1
      react-native-git-upgrade: 0.2.7

Ya, any insight appreciated on how cli run-ios is borked but Xcode Run runs fine.

@rodrigoelp
Copy link

Uhm... I've honestly I got the same setup as @KingAmo (different versions of android sdk installed, not the problem here though) and I am not experiencing these issues.

I got a series of questions, just to check if there is something else I can check to understand the issue (although I think your issue might be a variation of this ticket)

  • Did you try on a brand new project? react-native init newproj && cd newproj && react-native run-ios
  • Are you having the same issue? Underlying error... The operation couldn’t be completed. Application "your app bundle id" is unknown to FrontBoard.

This (last question) happens as it is stated above those lines: Failed to load Info.plist from bundle I cause for that is, the directory used to deploy your app in the simulator is contaminated and cleaning the entire build (Cmd+Shift+Option+K, closing xcode and building again) tends to do the trick.

@fungilation
Copy link

Either it's the re-alignment of the moon and stars, or Cmd+Shift+Option+K is the magic solution. Works for me now after doing Cmd+Shift+Option+K in xcode and running react-native run-ios cli again, without the 3 The following commands produced analyzer issues.

@rodrigoelp
Copy link

Hi @fungilation, this comment is just to explain that (aside from planetary alignment) xcodebuild can generate an invalid output when building multiple dependencies (such as react, react native, etc) that can be invalid if the build process is interrupted. This can happen on any iOS project, not just those using react native.

Some times this generates an empty file with an invalid timestamp and xcode doesn't understand this file is invalid (and doesn't try to regenerate it as it is trying to optimise to build faster). The outcome of this is an invalid archive that can't be deployed (hence your error). I think react native has its own derive data configured, so when you were building in xcode it was using a different directory... (maybe?)

In any case, cleaning the entire build is the way to go in this case.
Cheers!

@filiptdz
Copy link

filiptdz commented Dec 7, 2018

It isn't going to be everyone's cases, but I found this in an old thread and it somehow fixed my problem: You can't have spaces in the project path. If anyone has a folder called React Native as I did, that should fix it.

@anthonyjoeseph
Copy link

anthonyjoeseph commented Dec 20, 2018

For me, this problem was caused by upgrading my app's Deployment Target ios sdk from version 11.4 to version 12.1. react-native run-ios defaulted to opening an old simulator running version 11.4, which caused the app (which depended on 12.1) to crash on the splash screen.

To prevent react-native run-ios from using old simulators, I deleted them in Xcode, at Window > Devices and Simulators. Also, using the simulator flag works:

react-native run-ios --simulator="iPhone 6s (12.1)"

According to an email I received from Apple,

Starting March 2019, all iOS apps submitted to the App Store must be built with the iOS 12.1 SDK or later, included in Xcode 10.1 or later.

So everyone will have to upgrade to this sdk soon. Assuming this is the same problem other people on this thread are experiencing, and since there's no way to set a new default device for react-native run-ios, this will have to be the solution ongoing.

@rodrigoelp
Copy link

Hi guys, I've recently been doing some testing and it seems this issue has been fixed (as in whatever was causing the issue with the new parallel system has been resolved.

Can any body check if a (new) project can be executing this one on your system configuration and report back? That way this issue can be closed.

@edoardoc
Copy link

edoardoc commented Jan 8, 2019 via email

@jrapala
Copy link

jrapala commented Jan 24, 2019

I was having a similar problem.
I had configured a debugger to launch with react-native run-ios, but at some point, the command would launch a simulator that would never load the bundle, and the debugger would fail to connect.

Turns out it was a configuration issue. Maybe switched when I last updated XCode?

In XCode, go to your project Info tab and make sure the following, under Configurations, is set to Debug, not Release.

Use Debug for command-line builds

@noahtallen
Copy link

noahtallen commented Feb 5, 2019

I'm unsure if this is the same issue, but essentially the app builds successfully for me in Xcode, but fails via react-native run-ios. Here is the error:

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_RCTReconnectingWebSocket", referenced from:

      objc-class-ref in libReact.a(RCTPackagerConnection.o)

  "_OBJC_CLASS_$_RCTSRWebSocket", referenced from:

      objc-class-ref in libReact.a(RCTInspectorPackagerConnection.o)

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)



Build system information

error: Cycle inside zonder; building could produce unreliable results. This usually can be resolved by moving the shell script phase 'h' so that it runs before the build phase that depends on its outputs.
Cycle details:
→ That command depends on command in Target 'zonder': script phase “[CP] Copy Pods Resources”
○ That command depends on command in Target 'zonder': script phase “[CP] Copy Pods Resources”



** BUILD FAILED **


The following build commands failed:

	Ld /Users/ntomallen/source/zonder-mobile-app/ios/build/Build/Products/Debug-iphonesimulator/zonder.app/zonder normal x86_64
(1 failure)

Installing build/Build/Products/Debug-iphonesimulator/zonder.app
An error was encountered processing the command (domain=IXUserPresentableErrorDomain, code=1):
This app could not be installed at this time.
Underlying error (domain=MIInstallerErrorDomain, code=4):
	Failed to chmod /Users/ntomallen/Library/Developer/CoreSimulator/Devices/7123FCC8-7921-433C-A895-B8E5B9D39452/data/Library/Caches/com.apple.containermanagerd/Bundle/Application/F1CF4107-D54C-42DD-A904-043AFD69C908/zonder.app/zonder : No such file or directory
Launching com.zonderstudios.zonder.ios

Here are some key points:

  1. Using the new build system, but with Parallel builds disabled
  2. I am linking all dependencies, including React Native, through Pods. I'm not manually linking anything through the Xcode project. However, this error still happened when I had React Native linked through the Xcode project.
  3. Am using the latest version of React Native, 0.58.3.

P.S. Please let me know if this should go in a new issue.

@Titozzz
Copy link
Collaborator

Titozzz commented Mar 19, 2019

@noahtallen it looks like another issue:

for everyone else:
This issue has been reported for an old version of React Native. Ideally we'd like everyone to be using 0.59 (see the awesome changes it brought) but we know updating can be a pain.

But please, if it's actually still an issue with 0.59 please comment below and we can reopen it. Even better, please send us a pull request with a fix 😊

@PhilippMeissner
Copy link

PhilippMeissner commented Jul 22, 2019

Are you fully sure this is fixed?
I am still facing this very problem, with the following setup:

info Fetching system and libraries information...
System:
OS: macOS 10.14.5
CPU: (8) x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
Memory: 1.69 GB / 16.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 12.6.0 - ~/.nvm/versions/node/v12.6.0/bin/node
Yarn: 1.17.3 - /usr/local/bin/yarn
npm: 6.9.0 - ~/.nvm/versions/node/v12.6.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
Android SDK:
API Levels: 25
Build Tools: 25.0.2
System Images: android-19 | Google APIs Intel x86 Atom, android-25 | Google APIs Intel x86 Atom
IDEs:
Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.6 => 16.8.6
react-native: 0.60.4 => 0.60.4
npmGlobalPackages:
react-native-cli: 2.0.1

Log:

➜ AwesomeProject react-native run-ios
info Found Xcode workspace "AwesomeProject.xcworkspace"
info Launching iPhone X (iOS 12.2)
info Building (using "xcodebuild -workspace AwesomeProject.xcworkspace -configuration Debug -scheme AwesomeProject -destination id=9ED6F89B-CE94-4ACF-828E-57522C21F99A -derivedDataPath build/AwesomeProject")
...........................
info Installing "DerivedData/Build/Products/Debug-iphonesimulator/AwesomeProject.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
error Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier DerivedData/Build/Products/Debug-iphonesimulator/AwesomeProject.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
. Run CLI with --verbose flag for more details.
Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier DerivedData/Build/Products/Debug-iphonesimulator/AwesomeProject.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

at checkExecSyncError (child_process.js:623:11)
at Object.execFileSync (child_process.js:641:15)
at runOnSimulator (/Users/philippmeissner/code/AwesomeProject/node_modules/@react-native-community/cli-platform-ios/build/commands/runIOS/index.js:174:45)
at processTicksAndRejections (internal/process/task_queues.js:85:5)
at async Command.handleAction (/Users/philippmeissner/code/AwesomeProject/node_modules/@react-native-community/cli/build/cliEntry.js:160:7)

@ajimae
Copy link

ajimae commented Sep 4, 2019

react-native: 0.57.3 => 0.57.3

This was the version that worked for me, so consider downgrading or upgrading to this specific version

@TsarlinDomingo
Copy link

only solution from @sryze worked for me. thanks a lot!

After I changed DerivedData path in project settings the react-native run-ios command worked for me.

Open Xcode project -> File -> Project Settings -> Under Derived Data click Advanced -> Change 3 paths to begin with <your_project_directory>/build, for example:

Products: /Users/szx/Desktop/MyApp/ios/build/Build/Products
Intermediates: /Users/szx/Desktop/MyApp/ios/build/Build/Intermediates.noindex
Index Datastore: /Users/szx/Desktop/MyApp/ios/build/Index/DataStore

@facebook facebook locked as resolved and limited conversation to collaborators Mar 19, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Mar 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests