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
Can't build release version of app - __fbBatchedBridge is undefined #5770
Comments
Hey ffxsam, thanks for reporting this issue! React Native, as you've probably heard, is getting really popular and truth is we're getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.
|
The strange thing is, I can build/run a release version on my physical device, but not Simulator. |
got this on 0.19 |
It also happens on a totally fresh project with literally no code added. |
when I run
|
@javache Why bundling is skipping for Simulator platform? |
Because on the simulator, you'll use a local packager server to serve up the bundle contents. |
@javache when I want to try bundled app on simulator — what should I do? |
You can uncomment these line in react-native-xcode.sh: https://github.com/facebook/react-native/blob/master/packager/react-native-xcode.sh#L15-L18 and make sure your rootview/bridge config points to the right JS file. |
@javache it's a dirty hack) |
Yeah, we don't use this system internally, and it's mostly aimed at making this work fast for the default use case. You can always create a copy of this script, modify it and use that copy instead in your xcode project. |
@javache thanks for advice! |
Thanks. Commenting out that part of the script worked. |
I got this same error on 0.20.0, and it was because my Appdelegate.m file had the line for running on the simulator uncommented, and I was trying to run on a physical device. I switched back to the other line and it ran fine. |
+1 commenting out the lines as @javache pointed out worked for me as well in react 0.20.0 |
@javache said:
But you can't put your new script anywhere you want:
because the script looks for other files relative to where it's located:
So your new script still has to live in the same directory in the react-native module, which is another gotcha to watch out for when upgrading react-native. |
@chetstone Change that line too; I have my script in the project's ios folder, and I write:
|
also fall into this and found out the script is |
I also think this is wrong. Especially since Facebook (!!) requires a working Simulator version for App Review. It makes much more sense to use Debug / Release configs as a determinator whether a bundled version should be created / used, or whether the local packager should be used. |
Nice to see some other voices join in here. I still feel that, out of the box, it should not fail when using bundle mode in the simulator. |
I hope we will not have to change every time the build options |
I just upgraded to RN 0.22 and this somehow get improved though. Now, the script will only not run if you are not in Debug/Dev mode, which quite make sense because you should run Debug with a dev server and "Release" mode with the bundle mode. |
I am now seeing the same as @gre, and the lines from @javache's temp solution are now off, here's the full diff with the improvement (thank you RN team btw!): |
I am still getting this error. I am using RN0.22. I am NOT using a simulator though, I am using an iPad mini. I am attempting to "Run" from within XCode, I had done the exact steps as the OP. UPDATEThe project I was working on did not have the build phase for bundling. I have to refer to the upgrading from 0.13 to 0.14 |
+1 on 26.2 |
+1 on 0.26.0 Notice that i also got stack trace in XCode console as soon as the JS bundle is loaded:
Which makes me suspect Babel... |
@dlahyani +1, I'm getting the same error. Have tried numerous fixes. |
@evanmrose @justsans I think i managed to solve this on my mac, it took me the whole day to figure this out.
Let me know if it did help you guys. |
+1 on 0.28.0 |
I've had this shit happen to me several times and it always seemed to suddenly happen. I finally figured out that it had to do with babelrc and certain wrong presets I was loading into the project. #4844 Try going to back to the bare bones babelrc you really really need and remove any babel-presets you're loading into the project. My .babelrc is this:
} |
For those like me who may spend a day figuring out why they have the error "Unable to execute JS call: __fbBatchedBridge is undefined" after they upgrade to OS x El Capitan 10.11 with react-native 0.29 |
@Gabs24 Could you give more information on the folder you mentioned. Why is the usr/local folder important?. Can you explain which folder you are exactly talking about. Really appreciate your input as I have been stuck with this issue for a while now.? |
Sure, just execute this command in your terminal : sudo chown $(USER):admin /usr/local |
.25 to .29 - getting this. Can't seem to get it to work with any of the above suggestions. Only breaks on a physical device, not emulator. |
Your probably getting this because you are trying to use option 2, bundling in your AppDelegate.m file. You should be using option one when using the simulator, but this all changes for RN .30. |
Cool. When will .30 be ready? |
^^ |
Its ready now, just make sure you run |
|
The deployment issues mentioned in this thread should all be solved, or depend on individual project's configuration. Please open a new issue if the cause of this error message is different. |
still seeing this with RN 0.33.0 and React 15.3.1 |
My app starting to show this error in the middle of development. |
Still seeing this on 0.45.0 |
Still seeing this on 0.46.1 |
I'm getting it on 0.47.1 |
I'm getting it on 0.47.2 |
I'm getting it on 0.50.3 |
+1 same error on 0.51.0 |
I've got an app ready to go live, but I'm unable to build a release version.
Steps I took:
react-native bundle --platform ios --dev false --entry-file index.ios.js --bundle-output ios/main.jsbundle --resetCache
I get the following error:
The text was updated successfully, but these errors were encountered: