-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Comments
Hi @thaoth58, you need to run 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 |
And because somebody is going to ask about my environment:
|
@thaoth58 I think this issue should be renamed to "React native run-ios 0.57.x is broken" |
Thanks, I edited. I've tried with Android and it works fine |
@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. |
@rodrigoelp: I followed your sample but it still has that issue :( |
use |
It's not |
@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. |
I have the same problem on a newly created project and with a not-so-new project someone else gave me. I ran I think react-native-cli expects the .app to be inside React Native version: 0.57.3 |
After I changed DerivedData path in project settings the Open Xcode project -> File -> Project Settings -> Under Derived Data click Advanced -> Change 3 paths to begin with <your_project_directory>/build, for example: Products: |
I had to run it one more time to get it to work.
|
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 :( |
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. |
I think something wrong with info.plist that does not work with new Xcode. To fix this I follow these steps:
|
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 |
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 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. |
@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 It's good to know the |
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. I tried the following: Created a new project: I ended up with the
So I did a bit of a search and found this on stackoverflow: 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. |
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 |
Sometimes I see the same issue and I think it's some sort of race condition. Sometimes it works sometimes it doesn't. |
I see this issue constantly. Even using the legacy build system.
…On Wed, Oct 24, 2018, 11:07 PM Andrei Mihailov ***@***.***> 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
<#21741 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AASZem6PMXaLr6EE80Wq0NYeap5H4uFvks5uoFfpgaJpZM4XYq4v>
.
|
I was about to follow @rodrigoelp instructions and can anyone suggest a good version of react native to work with? |
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>
.
|
It worked for me |
I'm on RN 0.57.5. Things were working fine until today, upgrading packages. Now, after trying all the workarounds, on
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 I'm on MacOS 10.13.6, Xcode 10.1 |
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, I suggest you to migrate to 0.57.7 (works a lot better for me), remove all your |
@fungilation me too, failed when |
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 |
For anyone that failed building for ios with error related to 'CFBundleIdentifier' doesnt exist: 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. |
@fungilation I have tried |
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) |
@rodrigoelp hope it helps, thanks for your work |
Ya, any insight appreciated on how cli |
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: |
Either it's the re-alignment of the moon and stars, or |
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. |
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 |
For me, this problem was caused by upgrading my app's To prevent
According to an email I received from Apple,
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. |
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. |
version(s) ?
…On Mon, 7 Jan 2019 at 17:13, Bilal Lolo ***@***.***> wrote:
I'm still seeing this issue sadly.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#21741 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAWgTSHDXHDA1G_dwWjDObLF7KO3KMC8ks5vA2P8gaJpZM4XYq4v>
.
|
I was having a similar problem. 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.
|
I'm unsure if this is the same issue, but essentially the app builds successfully for me in Xcode, but fails via
Here are some key points:
P.S. Please let me know if this should go in a new issue. |
@noahtallen it looks like another issue: for everyone else: 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 😊 |
Are you fully sure this is fixed?
Log:
|
This was the version that worked for me, so consider downgrading or upgrading to this specific version |
only solution from @sryze worked for me. thanks a lot!
|
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
Reproducible Demo
Just init new project
The text was updated successfully, but these errors were encountered: