Latest react-native app doesn't work ":CFBundleIdentifier", Does Not Exist
On OS X El Capitan v10.11.4
node --version v6.0.0 npm --v 3.8.8 react-native-cli: 0.2.0 react-native: 0.24.1 watchman --v 4.4.0 xcode 7.3
$ react-native init AwesomeProject $ cd AwesomeProject $ react-native run-ios
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution Run\ Script /development/misc/react/AwesomeProject/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/React.build/Script-006B79A01A781F38006873D1.sh
(1 failure)
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
/development/misc/react/AwesomeProject/node_modules/promise/lib/done.js:10
throw err;
^
Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/AwesomeProject.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
at checkExecSyncError (child_process.js:470:13)
at Object.execFileSync (child_process.js:490:13)
at _runIOS (runIOS.js:91:34)
at runIOS.js:24:5
at tryCallTwo (/development/misc/react/AwesomeProject/node_modules/promise/lib/core.js:45:5)
at doResolve (/development/misc/react/AwesomeProject/node_modules/promise/lib/core.js:200:13)
at new Promise (/development/misc/react/AwesomeProject/node_modules/promise/lib/core.js:66:3)
at Array.runIOS (runIOS.js:23:10)
at Object.run (/development/misc/react/AwesomeProject/node_modules/react-native/local-cli/cli.js:86:13)
at Object.<anonymous> (/usr/local/lib/node_modules/react-native-cli/index.js:88:7)
I saw you posted on StackOverflow as well - any luck so far? I am playing around with master at the moment and I can't reproduce. Maybe it's one of the problems described there, e.g. the sudo or permissions? Also do you have CFBundleIdentifier in your Info.plist ?
I tried deleting all my node modules, clear cache etc and sudo as well with no luck. I do have CFBundleIdentifier in the Info.plist as:
<key>CFBundleIdentifier</key>
<string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string>
@grabbou Are you trying it with Node 6? I haven't been able to reproduce it, but I've only tried so far with Node 4 & 5, haven't installed 6 yet. Perhaps it's an issue there?
@dsibiski I had node 5.9 before and I had the same issue, I uninstalled node/npm and deleted every node module and reinstalled (that's when I got node 6 on my machine) but I still am stuck with the above exception.
I also encountered a similar error.
On OS X El Capitan v10.11.4
node --version v6.0.0 npm --v 3.8.6 react-native-cli: 0.2.0 react-native: 0.24.1 watchman --v 4.4.0 xcode 7.3
$ react-native init AwesomeProject $ cd AwesomeProject $ react-native run-ios
** BUILD SUCCEEDED **
The following commands produced analyzer issues: Analyze Modules/RCTUIManager.m (1 command with analyzer issues) 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 /Users/shinout/workspace/AwesomeProject/node_modules/promise/lib/done.js:10 throw err; ^
Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/AwesomeProject.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
at checkExecSyncError (child_process.js:470:13)
at Object.execFileSync (child_process.js:490:13)
at _runIOS (runIOS.js:91:34)
at runIOS.js:24:5
at tryCallTwo (/Users/shinout/workspace/AwesomeProject/node_modules/promise/lib/core.js:45:5)
at doResolve (/Users/shinout/workspace/AwesomeProject/node_modules/promise/lib/core.js:200:13)
at new Promise (/Users/shinout/workspace/AwesomeProject/node_modules/promise/lib/core.js:66:3)
at Array.runIOS (runIOS.js:23:10)
at Object.run (/Users/shinout/workspace/AwesomeProject/node_modules/react-native/local-cli/cli.js:86:13)
at Object.<anonymous> (/usr/local/lib/node_modules/react-native-cli/index.js:88:7)
In my case, BUILD seems to succeed. However, the process terminates with the error message above.
I got the same problem on one of my projects... You could kind work around with only XCode builds. I think it appeared after changing the name of the project.
I was able to solve this issue! Looks like port 8081 was in use :
lsof -n -i4TCP:8081
node 7601 CXI624 23u IPv6 0xc6b249599e5f1169 0t0 TCP *:sunproxyadmin (LISTEN)
So I followed the instructions from React Native Troubleshooting https://facebook.github.io/react-native/docs/troubleshooting.html
kill - 9 7601
and ran the command react-native run-ios again and everything worked as expected (on node 6 as well).
Closing this issue & thanks for your help!
@arun0009 Awesome, thanks for posting the answer back here 👍
@shinout Hello, I have the same problem, you solve?
Not yet... I finally bought a new mac and solved.
I solved this issue with the react-native upgrade command, which helped me reset some details in various xcode files. At least that is what I think solved the issue.
This isn't working for me. I'm still getting the same error. Node 5.11
Still getting the error too. Killing process on port 8081 did not work. react-native-cli: 0.2.0 react-native: 0.26.2 node: 5.3.0 npm: 3.3.12
Tested with a new project setup by running
$ react-native init newProj && cd newProj
$ react-native run-ios
Typing the following doesn't give the issue but a "No devices are booted"..
sudo react-native run-ios
Had another react packager running on 8081. Killing that process made it to work.
Running it with sudo does not solve it for me.
The suggest solution by @consideRatio fixed this problem for me.
react-native upgrade
Worked after upgrading XCode to 7.3.1
Nothing posted here works for me unfortunately :(
In my case my ProductName got corrupted.
I had to change my project name, scheme name for my project and Product Name so they are all the same, and after that I started seeing the errors mentioned above. When I went to Info.plist to check what it says for my CFBundleIdentifier (or just "Bundle identifier" if you are viewing Info.plist in Xcode) I saw: com.{company}.mobile.$(PRODUCT_NAME:rfc1034identifier) So It's a path. So I decided to investigate in Xcode - I clicked on the project name in left pane and went to BuildSettings. Under Packaging my ProductName instead of being, say "MyAwesomeApp" was something like "MyAwesomeAppApp" - last part was repeated twice. Needless to say I had to change it to match my ProjectName (MyAwesomeApp), saved in Xcode and
$ react-native run-ios
worked w/out any problems. Now it makes sense why it was showing errors: "An application bundle was not found at the provided path. Provide a valid path to the desired application bundle." The "path" was wrong! Hope it helps someone.
If you have some other applications are always occupying port 8081 no matter how many times you have killed the process, try changing the port:
It solves my problem. Hope it helps someone.
I still get the same Entry, ":CFBundleIdentifier", Does Not Exist error that this ticket mentions. I've tried:
- killing processes on port 8081
- changing the port
- running it with sudo
- updating react-native (I'm on the latest version)
Any other ideas?
Interestingly enough, everything works if I open the .xcworkspace in XCode and run it from there.