facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
118.33k stars 24.23k forks source link

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

Closed thaoth58 closed 5 years ago

thaoth58 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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

thaoth58 commented 5 years ago

React native run-ios 0.57.x is broken

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

rodrigoelp commented 5 years ago

@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 commented 5 years ago

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

SnowZero commented 5 years ago

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

kelset commented 5 years ago

It's not run-ios to be broken, please refer to this for details https://github.com/facebook/react-native/issues/21303

rodrigoelp commented 5 years ago

@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 commented 5 years ago

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 commented 5 years ago

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 /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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

@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 commented 5 years ago

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.

facebook/react-native#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 commented 5 years ago

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 commented 5 years ago

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

rodrigoelp commented 5 years ago

I see this issue constantly. Even using the legacy build system.

On Wed, Oct 24, 2018, 11:07 PM Andrei Mihailov notifications@github.com wrote:

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/facebook/react-native/issues/21741#issuecomment-432628369, or mute the thread https://github.com/notifications/unsubscribe-auth/AASZem6PMXaLr6EE80Wq0NYeap5H4uFvks5uoFfpgaJpZM4XYq4v .

edoardoc commented 5 years ago

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 commented 5 years ago

The problem is xcode 10. If you download xcode 9.4.1 you won't have this issues.

On Thu, Oct 25, 2018, 9:41 PM Edoardo notifications@github.com wrote:

I was about to follow @rodrigoelp https://github.com/rodrigoelp instructions and pkill node but at the second time I invoked it it worked! so much for a deterministic scenario :/ anyone can suggest a good version of react native to work with?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/facebook/react-native/issues/21741#issuecomment-433002336, or mute the thread https://github.com/notifications/unsubscribe-auth/AASZetds1ja869UvwVHIiKusDoW0knqFks5uoZVsgaJpZM4XYq4v .

thaoth58 commented 5 years ago

The problem is xcode 10. If you download xcode 9.4.1 you won't have this issues. On Thu, Oct 25, 2018, 9:41 PM Edoardo @.***> wrote: I was about to follow @rodrigoelp https://github.com/rodrigoelp instructions and pkill node but at the second time I invoked it it worked! so much for a deterministic scenario :/ anyone can suggest a good version of react native to work with? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#21741 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AASZetds1ja869UvwVHIiKusDoW0knqFks5uoZVsgaJpZM4XYq4v .

But how can you debug for iOS 12 if you don't have Xcode 10 :D

rodrigoelp commented 5 years ago

@thaoth58, ah... the chicken or the egg.

I honestly get exhausted after a few reviews of dealing with this issue. It does not matter which build system the project is using... as long as you are using xcode 10 build tools the issue is there.

I can confirm it continues to be there on 0.57.4 which I've tested recently.

edoardoc commented 5 years ago

@thaoth58 I am about to give this a go: Can I have multiple Xcode versions installed?

DylanYasen commented 5 years ago

encounter the similar issue. problem went away after running the project through xcode once. I'd suggest building and running through xcode the first time after creating/upgrading project

bhirmbani commented 5 years ago

https://github.com/facebook/react-native/issues/21741#issuecomment-429193933 doing this on RN 0.57.4 is actually worked for me

melvinsalas commented 5 years ago

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

It worked for me

fungilation commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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

fungilation commented 5 years ago

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 commented 5 years ago

For anyone that failed building for ios with error related to 'CFBundleIdentifier' doesnt exist: delete .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 .xcodeproj in Xcode and wait for it to run on simulator. you can quit the Xcode after this.

KingAmo commented 5 years ago

@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 commented 5 years ago

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 commented 5 years ago
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 commented 5 years ago
  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 commented 5 years ago

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)

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

version(s) ?

On Mon, 7 Jan 2019 at 17:13, Bilal Lolo notifications@github.com wrote:

I'm still seeing this issue sadly.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/facebook/react-native/issues/21741#issuecomment-451966363, or mute the thread https://github.com/notifications/unsubscribe-auth/AAWgTSHDXHDA1G_dwWjDObLF7KO3KMC8ks5vA2P8gaJpZM4XYq4v .

jrapala commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

@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 😊