Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ReferenceError: Can't find variable: __fbBatchedBridge

Using just the default code from react-native init AwesomeProject, when I run the app I get the 'ReferenceError: Can't find variable: __fbBatchedBridge (line 1 in the generated bundle)'.

And, when I 'Reload JS', the app just has the white background rather than any 'hello world' views. I haven't touched any of the code from the init.

Any ideas how to resolve the error?

Screenshot (click to view full size):
enter image description here

Using:

  • Ubuntu 15.10, 64-bit
  • Node.js v5.3.0
  • reactive-native v0.1.7
  • Nexus 5X, API 6.0.1
like image 475
Anonsage Avatar asked Dec 28 '15 20:12

Anonsage


Video Answer


2 Answers

I generally see this when the packager hasn't started. Ensure that is running by running react-native start

like image 176
rmevans9 Avatar answered Sep 23 '22 23:09

rmevans9


I had the same issue while using Visual Studio Android Emulator. When the red screen shows up type in the command line

adb shell input keyevent 82 

This will trigger the shake event and launch the dev menu

Developer menu

Then hit Dev Settings > Debug server host & port for device and enter <your ip adress>:8081. If for some reason you cannot type in the field you can trigger the text action in the command line by using

adb shell input text <your ip adress>:8081 
like image 21
vanna Avatar answered Sep 24 '22 23:09

vanna