React-native: Print: Entry, ":CFBundleIdentifier", Does Not Exist

Created on 10 Jun 2017  路  42Comments  路  Source: facebook/react-native

I am trying to run a new react-native project but I have an error

My setup

  • xCode 8.3.3
  • Node v6.11.0
  • npm v3.10.10
  • react-native v0.45.1
** BUILD FAILED **


The following build commands failed:

    CompileC /Volumes/300GB/react-native/jlledm/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/third-party.build/Objects-normal/x86_64/MallocImpl.o /Volumes/300GB/react-native/jlledm/node_modules/react-native/third-party/folly-2016.09.26.00/folly/detail/MallocImpl.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

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

I tried everything that others similar issues say:

  • Change the File->Project Settings->Advanced->Custom changing to "build/Build/Products"
  • Upgrade and update everything
  • lsof -n -i4TCP:8081 to kill a process that was running
  • react-native upgrade
  • Delete node_modules/, clear the cache and install again
  • Doubleclick on the RCTWebSocket project in your navigator and remove the flags under build settings > custom compiler flags
  • Setting manually the Bundle Identifier
  • Run npm start -- --reset-cache
  • rm -rf ios/build and run-ios again...

If I try to compile in xcode, I had this problem

screen shot 2017-06-10 at 15 11 16

And I just run the react-native init projectName and react-native run-ios the get this error

Have anyone a modern (2017) solution for this problem?

Locked

Most helpful comment

Devs keep ignoring this issue, and keep closing them. My Faith in RN is loosing momentum.

All 42 comments

@thiagovictorino I was able to fix by doing 'npm start' or 'npm run ios' instead... there seems to have been changes in version 0.45

Having the same issue here. However, doing npm start or npm run ios didn't fix the issue

Thank you @Mikael491, but it didn't works =(

@thiagovictorino It looks like you just created the project, try doing 'npm install -g create-react-native-app' and then creating the project with 'create-react-native-app ' like in the docs...this is how I began my solution

Hi @Mikael491! This open the new project, but in a very different folder structure (very lean) and with 0.44 react-native version. It could be a partial solution and I am grateful for your help.

But I need a Native Code, and I used the command with no success

react-native init AwesomeProject

I have the same issue.
Using 'create-react-native-app' and 'npm run eject' is fine. (RN version is 0.44)
But 'react-native init ...' has the problem. (it's RN version is 0.45)

-> 'react-native init ...'
-> remove 'node_modules'
-> change RN version to 0.44 and react version 16.0.0-alpha6 in package.json
-> 'npm install'
-> 'react-native run-ios'
is FINE...

But I have really serious problem.
My project that created a month ago (it's RN version 0.44.2) has same issue;;
Only few days ago (when RN version 0.44 at RN homepage), the project was fine...

Can you confirm that 0.45.1 is being used here? The issue you're describing was present in 0.45 but should have been fixed.

Hello @hramos, yes it is

"dependencies": {
                "react": "16.0.0-alpha.12",
                "react-native": "0.45.1"
        },

react-native 0.45.1
i try to solve this problem by running shell script in react-native package manually

  1. open terminal
    node_modules/react-native/ios-install-third-party.sh
  2. after downloading finished, set pemission to .rncache folder
    sudo chown -R $(whoami) ~/.rncache
  3. run
    react-native run-ios

When I run ios-install-third-party.sh got this error

folly-2016.09.26.00/folly/fibers/test/FibersTest.cpp: (Empty error message)
tar: Error exit delayed from previous errors.

Finally running react-native run-ios again I got the same error:

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

@phuwasit your solution doesn't help me.

@radko93 @thiagovictorino
Try this

  1. Download 4 zip files
    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
  1. unzip
  2. boost_1_63_0
  3. double-conversion-1.1.5
  4. folly-2016.09.26.00
  5. glog-0.3.4

  6. copy 4 folders to node_modules/react-native/third-party

  7. run
    sudo react-native run-ios

+1

I have the same problem and provided solutions didn't work for me. Xcode 8.0, React native 0.45.1

same problem with react native 0.45.1

This is one of seemingly many factors but at the very least make sure your project folder or any of the folders it's within from ~/ down don't have spaces in them

Same here and no space in path!

My RN project works fine locally. When I push it to git and then pull it down. npm install and link all libraries. I cannot run the project because of CFBundleIdentifier does not exist.
All the approaches don't work for me.Then error message is
library not found -lRCTBEEPickerManager.a
Then I go to Build Phase=> link binary with libraries and delete a file called libRCTBEEPickerManager.a
This at least allow me to build from xcode. But I still cannot build from command line.
Now the error message becomes
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):

Devs keep ignoring this issue, and keep closing them. My Faith in RN is loosing momentum.

As you can see at my question @SamMatthewsIsACommonName I have no space in my path

/Volumes/300GB/react-native/jlledm/ 

I had the same problem and it turned out to be a matter of updates. I had a pending update of macOS Sierra to version 10.12.5, I did it and now it works.

react-native-cli: 2.0.1
react-native: 0.46.1
npm: 4.2.0
node -v: 6.9.1
watchman: 4.7.0
xcode: 8.3.3
Mac 10.12.5

Still not working

@RooneyJung My project same to your's

@thiagovictorino Check your node_modules/react-native/third-party file,normal size is 160M.For some reason,this file can't download full version can cause this problem.I copy this file from others,replace,problem solved.

e first , check your permission of manager sudo chmod -R 777 yourdirname .
and then if also has error you can lower you react-native version to 42.0, you can try it.

Same error after downgrading the react native version on my system but on the another system working properly, what the issue, I can't figure out, Is this going to fix or not?

@whg1412 my third party folder is 32M (1265 items). Where could we get the full version of it?

@isuhendro You can get it here https://github.com/whg1412/ThirdParty. I copy it from others,solve my problem.

I had this issue today and I figured I was using an old version of Node JS. Try upgrading it.

I am having this issue now:
React Native 0.47.1
MacOS Sierra 10.12.6
XCode 8.3.3

None of the solutions I've seen (removing spaces in path; changing relative build location) have worked.

@dgurns I added the third part files manually and it worked.

@GabrielLidenor what versions of React Native, MacOS, Node, and XCode are you running?

I tried adding the third-party files manually but it didn't work. What steps did you follow?

@dgurns Well, first of all I updated my Node JS to the latest version available. After that I created a new project using the latest version of React-Native and then, I replaced the third-party folder.
Then I run: react-native run-ios.

Closed the wrong issue - let's leave this one open as the master issue.

I just merged several related issue. Let's avoid opening new issues for the same error message for now. It seems like the preferred workaround at this time is to do the following:

rm -rf ~/.rncache
react-native run-ios

Wait for the last command to finish in its entirety. You should see several messages that follow this format: curl: Saved to filename 'glog-0.3.4.tar.gz'. Do not press CTRL+C to kill the process.

Thanks to @jjerryhan for arriving at the above list of steps (see Handling third party build error on React Native for an explanation behind why some people may end up in this state).

I believe I saw some PRs land recently that may deal with this particular issue, but I'm not 100% sure. I'll come back and update this issue with my findings.

To aid in the investigation, please refrain from adding "me too" comments unless you have new information to share.

It looks like @mhorowitz has looked at this before (see a555551aaf1de1aff2a58f7aa09e970bcd003f7f and his comment on #14423).

If you see the following message, "Unpacking 'SOME_FILENAME_HERE' failed. Debug info:", when running react-native run-ios, please comment here with the output following the "Debug info:" phrase.

Since Marc has already commented over at #14423, I'll mark that as the canonical issue and point all other issues there. Sorry for the churn.

Duplicate of #14423

I replaced the third-party folder with this https://github.com/whg1412/ThirdParty as @GabrielLidenor sad and it worked for me too.

Having this issue again, none of the above worked.

react: 16.0.0-alpha.12
react-native: 0.47.1
npm: 5.3.0
node -v: 6.10.0
watchman: 4.7.0
xcode: 8.3.3
Mac 10.12.6

I have another project using react-native 0.44.0 and perfectly works, but when I tried to create a fresh one I'm having this issue.

downgrade method can't work either, after trying all these so called solution, i finally decide to use my ultimate method that is to "wait", these stuff is too time consuming.

  1. make sure your four tar.gz is completely downloaded in ~/.rncache
  2. remove node_modules/react-native/third-party
  3. react-native run-ios again

this works for me.

What @sky0014 mentions is already covered in #14423, the master task tracking this issue.

Was this page helpful?
0 / 5 - 0 ratings