-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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 find variable: __fbBatchedBridge (line 1 in the generated bundle) #4881
Comments
Hey steve-ng, 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.
|
@steve-ng There is a chance that your packager is not running. This happens when you tried to pass an empty bundle file to jsc to execute. |
thanks @qbig is there any possible place that I can check this? I didn't fiddle with my packager |
I got this error too |
I'm getting this error as well, however if I switch to production then it doesn't happen. |
@qbig I understand that, what I'm supposing is that the server is not actually running; but my question is, as I run react-native run-android I don't really seem to get any server running, I'm trying to find out where it is, but all the good guides I find are for xcode. I'm a bit lost here. |
Having a same issue here. Can't run the default project on Android (iOS works). |
@qbig @steve-ng @trungdq88 I found what's the reason of this issue, first make sure you have watchman installed if you're on windows or linux; https://facebook.github.io/watchman/docs/install.html Then you make sure to run react-native start before running react-native run-android so that the server, and the packager is running... you'll most likely anyway hit the error. Shake your device or hit the menu and go to Dev Settings, Debug Server host and port, seek for the host and port of your computer, and put them there... eg. 192.168.1.4:8081 in my case, then shake again and click reload JS, all it's set up :) |
Also make sure you have the gradle daemon running just that it doesn't take ages. https://docs.gradle.org/2.9/userguide/gradle_daemon.html happy coding :) |
@onzag thank you, it works now. Btw, my server is automatically start when I run |
@trungdq88 well to be fair I'm not sure, I've never used gradle before, also, I'm on linux mint now, it might be a platform differences problem, if you're using mac that's what it supposed to happen. I also noticed that the device has to be connected to the same network of the computer, I'm trying to find a workaround for offline usage, because making sure that the device is connected wirelessly in the same LAN of the computer could be annoying in some circumstances. |
how to solve this? |
Same here. |
I tried to run
Next I tried to issue in another terminal the command
The app starts in my Nexus, but still the error occurs. |
I got the same error when i try to run react-native/Examples/UIExplorer release apk.I slove it after I change the BundleAssetName and JSMainModuleName in react-native\Examples\UIExplorer\android\app\src\main\java\UIExplorerActivity.java. |
Make sure that you also run |
@qbig A PR to improve the error message is much appreciated. |
Just to make it clear, this error shows after updating react-native dependencies to 0.17.0 |
@andreyluiz Currently you have to shake your device and pick in Dev settings the ip and port of your computer so that the device can access the server. |
@dkokic in 0.17.0 you don't need to set the reverse proxy... you just have to set the IP and port of your computer, that's for remote usage, so it makes sense to use it that way. However I may be wrong, I only started using this library 1 week ago. |
Related to #4739, PR welcome to improve the message! |
Thanks @satya164, |
It worked. @satya164 👍 |
|
Same here, I tried to run it on genymotion emulator. I had to run |
@stavash Thanks. It works. I think this answer should go to tutorial. |
new project on react-native 0.17.0 Android
does anyone experience this too?
answers as below:
adb reverse tcp:8081 tcp:8081
The text was updated successfully, but these errors were encountered: