Closed arun0009 closed 8 years ago
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:
Any other ideas?
Interestingly enough, everything works if I open the .xcworkspace
in XCode and run it from there.
What ended up working for me was that I needed to open up in XCode and change the scheme from building for a Release to Debug. Don't know if that will work for anyone else but it is definitely something to check out. After changing it once, you can then run it react-native run-ios
via the command line
@joshschumacher upgrade worked.
When nothing fixes, try on Xcode
@stief510 That worked for me! Thanks!
As @gvlamadrid said
When nothing fixes, try on Xcode
- Go to File -> Project settings
- Click the Advanced button
- Select "Custom" and select "Relative to Workspace" in the pull down
- click done, done
nothing work for me...
Did not fix it for me (I killed ports, changed project settings, etc etc.)
Nothing worked for me too. Using node v6.2.2
I tried all solutions, but nothing works. Great job, react native...
@trevorwang thank you so much it worked for me
My problem was also that I had something running on port 8081 (discovered by running sudo lsof -n -i4TCP:8081
)
Fixed by using an older version of react-native by running react-native init --version 0.27
instead of react-native init
to create the project.
Then, I changed the appdelegate.m file and the React.xcodeproj and the RCTWebSocketExecutor.m as detailed in the first step here.
Then, in the project folder, instead of react-native ios-run
, I did npm start -- --port 5000
, and then ran the project in Xcode with ⌘+R
Mmmm, this issue is one of the top Google results for react-native apps not running in the simulator ("no devices are booted"). Since this seems to still be a lingering issue for people I'm dumping some info here - YMMV.
This used to happen to me when I did iOS work for a living; oftentimes the simulator is just wonky as hell. ps aux | grep Simulator
will usually give me something to kill that should've died already. These steps usually work for me:
ps aux | grep Simulator
or whatever your preferred shell magic is, see if anything is lingering around that didn't shut down correctly. If there's something, kill
it.react-native run-ios
). If it still gives you a "no devices booted" error (and your simulator is a black screen), just reboot the simulator completely via Hardware -> Reboot
, then open your app.Unless you actually have something running on port 8081, you shouldn't need to change it - for some reason I see that as the most answered solution to this stuff around the web. These steps work for me pretty much every time.
Also, keep in mind if you change your NSAppTransportSecurity
settings in your Info.plist
, it can mess with this stuff.
@joshschumacher works for me too
Can confirm that react-native upgrade
worked for me & that stopping processes running on port 8081 didn't as the process running on 8081 is being started by react-native run-ios
Need to fix code manually.
SecRandomCopyBytes -> (void)SecRandomCopyBytes in RCTSRWebSocket.m
then tryreact-native run-ios
again, it worked for me.
@stief510 solution is exactly what got it done for me. Let me tell you how to do it. Click the Product
menu in xcode, in the Scheme
flyout menu, look at the bottom - you'll see Edit
Click that. A modal menu appears. The Build configuration has a select box, make sure its set to Debug
. Fixed it for me.
thanks @stief510 that worked after trying everything else
I just do npm install react-native-cli@latest -g
, then react-native run-ios
is work!
npm install react@latest react-native@latest
,it works for me after upgrade xcode 7.x to 8.0.
react-native upgrade
Works for me, thanks.
Nothing works for me, upgraded ios to macsierra, xcode to 8.0, change the project build location, closed ports, upgrade react-native installed the latest cli. Nothing seems to work for the default react native tutorial.
The following build commands failed: Analyze RCTVibration.m (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
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/AwesomeProject.app/Info.plist Print: Entry, ":CFBundleIdentifier", Does Not Exist
Any ideas?
Please re-open this, I still experience this, and this happen to both F8 app and Hacker news example app. We are really eager to use React Native for our project, but this bug kind of block us and we are afraid of such kind of problem will happen along the way.
My setup : macos sierra 10.12 xcode: Version 8.0 (8A218a) npm: 3.10.3 "react-native": "^0.20.0", "react-native-gifted-listview": "0.0.12", "react-native-scrollable-tab-view": "^0.3.8", "react-native-vector-icons": "^1.2.1", "react-native-activity-view": "^0.2.5"
The following commands produced analyzer issues: Analyze RCTImageLoader.m (1 command with analyzer issues)
The following build commands failed: CompileC /Users/xx/Downloads/HackerNews-React-Native-master/ios/build/Build/Intermediates/RCTWebSocket.build/Debug-iphonesimulator/RCTWebSocket.build/Objects-normal/x86_64/RCTSRWebSocket.o RCTSRWebSocket.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (1 failure) Installing build/Build/Products/Debug-iphonesimulator/HN Reader.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/xx/Downloads/HackerNews-React-Native-master/node_modules/promise/lib/done.js:10 throw err; ^
Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/HN Reader.app/Info.plist Print: Entry, ":CFBundleIdentifier", Does Not Exist
at checkExecSyncError (child_process.js:475:13)
at Object.execFileSync (child_process.js:495:13)
at _runIOS (runIOS.js:77:34)
at runIOS.js:24:5
at tryCallTwo (/Users/xx/Downloads/HackerNews-React-Native-master/node_modules/promise/lib/core.js:45:5)
at doResolve (/Users/xx/Downloads/HackerNews-React-Native-master/node_modules/promise/lib/core.js:200:13)
at new Promise (/Users/xx/Downloads/HackerNews-React-Native-master/node_modules/promise/lib/core.js:66:3)
at Array.runIOS (runIOS.js:23:10)
at Object.run (/Users/xx/Downloads/HackerNews-React-Native-master/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)
@alanlavintman I finally got to the same error message as you. At that point the issue was that AwesomeProject.app was in the wrong place. For me, it was NativeStarterKit.App. It was located under:
ios/build/Products/Debug-iphonesimulator/NativeStarterKit.app
So I copied it to:
ios/build/Build/Products/Debug-iphonesimulator/NativeStarterKit.app
@gavinxyang The issue above or the 5th bullet point below could be your issue. Make sure the path reported in your "Command Failed" error actually exists for "HN Reader App" it may be in the build/Products folder instead.
There were other items I did before just to get to this point:
ios/build/Products/debug-iphonesimulator/NativeStarterKitTests.xctest.DSYM
Where is the .DSYM coming from? It keeps recompiling with that extension. Removing the .DSYM from the extension cured the big stumper for me.Now I'm getting JS errors in the App but at least everything builds. If you follow the errors listed with "Command Failed" they are the ones actually causing the break.
I hope this helps some people who are still stuck after all the previous fixes. This may also be tied to XCode 8.0 changing things around and react-native still not compliant.
Full Details: react-native-cli: 1.0.0 react-native: 0.31.0 node: 6.6.0 npm: 3.10.3 XCode: 8.0 Mac OSX: El Capitan 10.11.6
After 3-4 hours of debugging I finally have it working. Now I will go back and try again with Pepperoni that was originally throwing similar errors when I decided to switch to NativeStarterKit.
Thanks, dmitrye@!
Here is how I fix it: 1) remove custom flags, so RCTScrollView.o can be compiled one more step further. (still fail) 2) Replace _refreshControl with refreshControl, and comment one line. https://github.com/facebook/react-native/issues/8472
However, I still insist re-open this bug, because these thing should not happen and really frustration. Also my fix is change react-native module itself. Hope react-native can fix this for xcode 8.0, which looks like a very common problem.
Finally got this working after reading @dmitrye 's comment. These steps just have a slight twist to @gvlamadrid 's instructions
How I fixed it.
Seems the run-ios command was looking for the app in ios/build/Build/Products when it was actually being placed in ios/Build/Products. Just a hunch but maybe this has something to do with the way that mac ignores case when dealing with paths on the command line? Could be leading to the run-ios command getting tripped up. Or maybe the default path is just wrong.
I'm on XCode v8.0
Worked after upgrading dependencies "react-native": "0.34.0"
Fixed in my pull request. Upvote it please.
Downgrading Xcode 8 -> Xcode 7.3.1 fixed the issue for me
@CEOGavin link worked for me BUT I gotta run from XCode. react-native run-ios
still gives me the error.
Running react native v0.31. Can't upgrade yet.
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