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

[Master Task] Print: Entry, ":CFBundleIdentifier", Does Not Exist #14423

Closed
srijak opened this issue Jun 9, 2017 · 134 comments
Closed

[Master Task] Print: Entry, ":CFBundleIdentifier", Does Not Exist #14423

srijak opened this issue Jun 9, 2017 · 134 comments
Labels
Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.

Comments

@srijak
Copy link

srijak commented Jun 9, 2017

Please see #21303 to understand why you're running into this

(Edited by @hramos - the original issue text has been replaced with a description of the problem)

Description

This issue describes a class of failures where the iOS build fails with the following output:

Print: Entry, ":CFBundleIdentifier", Does Not Exist

This error message is a red herring as the problem is not actually caused by a missing :CFBundleIdentifier entry. What this output means is that your iOS project could not be built successfully.

If you are encountering this issue, please try the following:

  1. Upgrade to the latest React Native release.
  2. Upgrade to the latest Xcode version.
  3. Read through the Getting Started guide if you haven't in a while, and make sure your development environment is up to date.
  4. Try building your project again.

If none of these resolve your issue, please read through this thread to learn about what has worked for others. Please refrain from adding "me too" comments unless you have material information that contributes to others' solutions.

@hramos
Copy link
Contributor

hramos commented Jun 9, 2017

I have not yet been able to reproduce this, on 0.45, macOS Sierra 10.12.4, Xcode 8.3.3. I have yarn installed, which means the CLI will use it instead of npm-cli, though I don't see any boost package in my node_modules/. I am able to launch the app on iOS, though I get a RedBox due to #14246.

@WhoJave
Copy link

WhoJave commented Jun 10, 2017

@srijak I also come across this error , Im trying your solution now
it's OK now, tkx :)

@kyle-ssg
Copy link

kyle-ssg commented Jun 10, 2017

Thanks for the fix @srijak, I was able to reproduce this too since upgrading from 44 to 0.45, even after clearing node_modules and installing via yarn or npm.

@haseebyf
Copy link

haseebyf commented Jun 12, 2017

+1 same here!

Update: downloaded and replaced boost_1_63_0.tar.gz in the .rncache folder. It seem to fix the problem for me.

facebook-github-bot pushed a commit that referenced this issue Jun 15, 2017
Summary: This is to help debug the root cause of #14423

Reviewed By: javache

Differential Revision: D5254713

fbshipit-source-id: 1ca90205144b3a069d927ba6636f0ef0138b51a0
@mhorowitz
Copy link
Contributor

I just added code in the above rev to improve the logging around this failure. If you see it again, please post the output so we can try to narrow down what's going on here.

@pampang
Copy link

pampang commented Jun 21, 2017

I thought I've figured out how to fix this problem.
It turns out that the node_modules/react-native/ios-install-third-party.sh did not run out right (Maybe because the network).

download files list:
https://github.com/google/glog/archive/v0.3.4.tar.gz 
https://github.com/google/double-conversion/archive/v1.1.5.tar.gz
https://github.com/react-native-community/boost-for-react-native/releases/download/v1.63.0-0/boost_1_63_0.tar.gz
https://github.com/facebook/folly/archive/v2016.09.26.00.tar.gz

So, I did the following steps:

  1. download the files needed inside the .sh, put it in the ~/.rncache/.
  2. copy the downloaded files into node_modules/react-native/third-party/, ran tar -zxf *** to each file.
  3. build again, and worked for me.

@barbatus
Copy link

I had this issue too, but it disappeared once I used react-native-git-upgrade for the upgrade.

@iineva
Copy link
Contributor

iineva commented Jun 29, 2017

Temporary Solution

Download boost_1_63_0.tar.gz to ~/.rncache/, replace if exist.

@PaulAndreRada
Copy link

After trying absolutely everything in this tread and this one https://github.com/facebook/react-native/issues/7308 I still kept getting the same issue on:
react-native-cli: 2.0.1
react-native: 0.45.1

My build process would just error out and stop, giving me:

** BUILD FAILED **


The following commands produced analyzer issues:
	Analyze /Users/<MASKED>/node_modules/react-native/ReactCommon/yoga/yoga/YGNodeList.c
	Analyze /Users/<MASKED>/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.c

(2 commands with analyzer issues)

The following build commands failed:
	CompileC /Users/<MASKED>/Library/Developer/Xcode/DerivedData/Build/Intermediates/React.build/Debug-iphonesimulator/third-party.build/Objects-normal/x86_64/Bits.o /Users/<MASKED>/node_modules/react-native/third-party/folly-2016.09.26.00/folly/Bits.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

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


I then deleted the ios/ and android/ folders and did react-native eject then tried react-native-git-upgrade for the thousand time, and it worked!

@folivi
Copy link

folivi commented Jul 4, 2017

Fixed by removing everything from ~/.rncache/

@m-bigaignon
Copy link

m-bigaignon commented Jul 11, 2017

The fix proposed by @folivi above worked perfectly for me.

For the record, I stumbled upon this issue today when creating a brand new project with react-native init
react-native : 0.46.1
react-native-cli : 2.0.1

Edit : It would appear that the above fix works on a project using [email protected], but not with [email protected].

@yuriy-ulantsev
Copy link

I had this issue too, but it disappeared once I removing everything from ~/.rncache/ and used command react-native-git-upgrade

@codler
Copy link
Contributor

codler commented Jul 15, 2017

Reinstall node_modules rm -rf node_modules && yarn

@xareelee
Copy link

Have this issue been resolved?

Still encounter this issue with [email protected].

@mhorowitz
Copy link
Contributor

My belief is that somehow the files in ~/.rncache/ are corrupted, and so unpacking them doesn't work right, but for some reason the error is not caught. https://github.com/facebook/react-native/blob/master/scripts/ios-install-third-party.sh will not re-download those files once they exist in ~/.rncache/. If you're running v0.47.0-rc.0 or newer, the debug info at line 22-24 may help confirm.

I believe at this time the correct fix is for the ios-install-third-party.sh script to encode the sha hashes of the files which it will download, and verify the contents of ~/.rncache/ against them before using them. If the hashes don't match, It can retry the download a few times. This should fix the problem for good.

If someone wants to work on this, that would be awesome, or else I will do it when I can. For now, the workaround is to rm -rf ~/.rncache as pointed out by several people above. (thanks!)

@hsuastegui
Copy link

I downloaded the library boost_1_63_0.tar.gz, replace it in ~/.rncache/ and extract it in /node_modules/react-native/third-party/boost_1_63_0 and it worked.

@Kosai106
Copy link

My fix was a match of some of the above mentioned solutions: rm -rf node_modules && rm -rf ~/.rncache && yarn

@jjerryhan
Copy link

This article would be helpful : Handling third party build error on react-native 0.46x

@messiBob
Copy link

messiBob commented Aug 2, 2017

i have try many ways, but no ways

@hramos
Copy link
Contributor

hramos commented Aug 3, 2017

Duplicate of #14447

@hramos hramos marked this as a duplicate of #14447 Aug 3, 2017
@hramos hramos closed this as completed Aug 3, 2017
@hramos hramos reopened this Aug 3, 2017
@hramos hramos changed the title 'boost/iterator/iterator_adaptor.hpp' file not found 'boost/iterator/iterator_adaptor.hpp' file not found | Print: Entry, ":CFBundleIdentifier", Does Not Exist Aug 3, 2017
@apppro123
Copy link

I have the same issue.
But I don't event find the file .rncache in my project. Where do you have that file or do I have to download it myself?

Thank you for the response.

@heyjoy21
Copy link

heyjoy21 commented Jul 16, 2018

@HazT I guess you have to create new workspace. Do the same thing again & create a new project/workspace. Make sure you have closed Xcode.

@marceloogeda
Copy link

@apppro123 the .rncache file is not inside your project. you can found it in ~/

@apppro123
Copy link

Thank you. now I have found it.

@ham118
Copy link

ham118 commented Jul 18, 2018

@heyjoy21

I have tried with the new workspace and done the same things with closed Xcode but still throw below error:

_Installing build/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

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

@apppro123
Copy link

I also still struggle with it:

he following build commands failed:
CompileC /Users/ProGram1/OwnAppIOS/ios/build/Build/Intermediates.noindex/RCTText.build/Debug-iphonesimulator/RCTText.build/Objects-normal/x86_64/RCTUITextView.o TextInput/Multiline/RCTUITextView.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler

(1 failure)

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

@rvignesh89
Copy link

I managed to fix the problem for myself (Not sure if everyone else is facing the same situation though)

TL;DR

The fix is to ensure environment variables are present in the build log

image

Yeah, I know you are like 🤯. I am too. Let me explain a little more.

So based on the following error I figured that the Info.plist was not present at the location that PlistBuddy was expecting.

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/appname.app/Info.plist

When I went into the folder rightfully so, Info.plist was present in build/Build/Products/Debug-iphonesimulator/schemename.app/Info.plist. So I tried to figure out how run-ios resolves to my schema name which led me to the following code in react-native/local-cli/runIOS/runIOS.js

206:       let productNameMatch = /export FULL_PRODUCT_NAME="?(.+).app"?$/m.exec(buildOutput);
207:       if (productNameMatch && productNameMatch.length && productNameMatch.length > 1) {
208:         return resolve(productNameMatch[1]);//0 is the full match, 1 is the app name
209:       }

Basically the name is being read from an environment variable FULL_PRODUCT_NAME which is exported while the build happens. And since I turned off the env variables logging during build because I found it verbose and annoying, FULL_PRODUCT_NAME was null. But then it still resolves to my scheme name because of this line.

152:     if (!appName) {
153:       appName = scheme;
154:     }

This explains why removing ~/.rncache does not work for some people (including myself) and why recreating the project works for others because by default environment variables must be turned on.

@GreenRidingHood
Copy link

this is really weird, every time when i face that error, i am fixing with different suggestions, one time fixed with @dotmike and @sheminusminus, and this time I solved @barbatus suggestion and run react-native-git-upgrade on the terminal

@williamdarkocode
Copy link

There are several info.plist files in my ios directory. Which one needs to have a reference to the CFBundleID?

@apsuva
Copy link

apsuva commented Aug 5, 2018

xcodebuild: error: Unable to find a destination matching the provided destination specifier:
{ id:978DA498-5036-4EFA-A1D2-FF1148CB3948 }

run react-native run-ios --simulator="iPhone 7"

@omi10859
Copy link

omi10859 commented Aug 8, 2018

It's not working, nothing is working
I'm losing my faith in react-native now

@phasedarray
Copy link

phasedarray commented Aug 14, 2018

I found this issue may come out if 8081 port is occupied(In my case it is occupied by McAfee).
Run command sudo lsof -i :8081 to check which process has token the 8081 port.
Or you can run react-native run-ios --port 8082 to specify another port, but you need to change the port in code too.

@JeffKGabriel
Copy link

so this issue has plagued me forever
basically the error reporting just defaults to cfbundleIdentifier for many errors, when you run in terminal with react-native run-ios

What I did to fix mine is, run it in xcode and look at the error xcode outputs

  • For me it was a project file (png) that i had linked to, but wasnt included in the project files and the build couldn't find it on other computers

I hope it helps a little:)

@enzoferey
Copy link

I had a problem related to glog-0.3.4 not finding a file named "config.h" and it was causing the CFBundleIdentifier error.

Solved it with this steps:

  1. Close Xcode.
  2. cd <Project-Folder>/node_modules/react-native/third-party/glog-0.3.4
  3. Run ./configure

My project is a standard react-native init with react-native v0.55.4 (breaking changes of Babel 7 has too many errors with Jest environments right now so I don't want to update yet).

@messiBob
Copy link

messiBob commented Aug 24, 2018 via email

@sonnytron
Copy link

For what it's worth, I can't get this working for a completely blank project.
Xcode 9.4 or Xcode 10 beta, neither command line tools.
NPM fully updated, latest version of react-native, node, npm and everything.
I do not think it's anyones' build configuration or changes to their JavaScript code.
Because I literally cannot even get an empty new initialized project to build.

@williamdarkocode
Copy link

@sonnytron yes screw xcode. But if your're willing to try, rm-rf ios, and react-native upgrade. will reinstall all ios build files, then react-native run-ios to re build. you can even try rm-rf node_modules and npm install

@sonnytron
Copy link

@williamdarkocode thank you but that didn't fix it. Literally a vanilla project won't build.

@heberuriegas
Copy link

Same problem using ignite latest versions of everything...

@ghost
Copy link

ghost commented Sep 3, 2018

If anyone still having the same problem, after running all the proposed methods to no solution, I found that brew upgrade gawk enabled some of the scripts used by react-native to run properly, and then afterward I had no problem running react-native run-ios. My ENV is:

  React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: x64 Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
      Memory: 228.12 MB / 16.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 10.9.0 - /usr/local/bin/node
      Yarn: 1.9.4 - /usr/local/bin/yarn
      npm: 6.2.0 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3
      Android SDK:
        Build Tools: 23.0.1, 26.0.3, 28.0.0
        API Levels: 23, 26, 27, 28
    IDEs:
      Android Studio: 3.1 AI-173.4819257
      Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.4.1 => 16.4.1
      react-native: 0.56.0 => 0.56.0

@heyjoy21
Copy link

@HazT try with sudo

@Tak783
Copy link

Tak783 commented Sep 11, 2018

Heres what I did

  1. started by deleting the root folder that I tried to install to and creating a new one with a new name
  2. ran react-native init myAppName
  3. ran cd myAppName
  4. ran npm install
  5. ran react-native upgrade
  6. ran react-native link

And it worked perfectly, first time.
Was able to run iOS from xCode

@ferdelamad
Copy link

run in your terminal: killall -9 node

That solved it for me!

@jeremyis
Copy link

jeremyis commented Sep 16, 2018

I was getting Print: Entry, ":CFBundleIdentifier", Does Not Exist from a brand new React-Native project.

I tried a bunch of the things in this thread and had no luck. Turned out, I was running an old OS X (Sierra instead of High Sierra) and XCode (XCode 8.x instead of 9.4). I upgraded and then everything just worked.

@AugustoAleGon
Copy link

For anyone that is having the same issue. What I did was deleted the folder ios and then applied react-native eject.
And voila. react-native run-ios works!

@hramos
Copy link
Contributor

hramos commented Sep 24, 2018

Reiterating what Marc said at the start of the year. This error plainly indicates the project failed to compile or link. You'll need to look further up in your output for a hint of the root cause. I've opened #21303 in order to help people who run into this issue, and will lock this thread to avoid causing more confusion.

Duplicate of #21303

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

No branches or pull requests