Gerard Taub
Gerard Taub

Reputation: 177

React-Native Could not connect to development server

I've been testing my project on my iPhone6s and it worked perfectly. But today Xcode and Node.js keeps giving me the 'Unable to execute JS call: __fbBatchedBridge is undefined' error. I'm sure the IP address is correct, my phone is under the same Wifi network with server. The simulator works fine with the server ip. To test if it is something wrong with the project I start another AwesomeProject and changed the IP but still not working. Anyone know any possible solutions?

Upvotes: 1

Views: 2187

Answers (1)

Sriraman
Sriraman

Reputation: 7947

I faced the same issue in my office Wifi network connection also. This is because of the router configuration. There are two ways to make it work.

  1. Expose the local server using ngrok. But, It will be slow since it is sending everything to server.
  2. Connect your phone using USB cable and type the following command in the computer adb reverce tcp:8081 tcp:8081

Upvotes: 1

Related Questions