0

Currently I am testing out my react native app on android side and once apk is built my app works fine except only on WiFi! When I try to run on 4G the app will not start and returns a 'Uncaught Error: Packager is not running at http://10.01...".

Is there anyone with any suggestion or possibly a solution? Thank you in advance!

I have checked out the other Stackoverflow post: My App works over WiFi. But not over 3G in android? Any Guesses? but not really a solution.enter image description here

dhahn
  • 729
  • 9
  • 11
  • 1
    That ip address is only valid when you are on the same local network, in your case the wifi network, it's a private, non-routable address which can't be used across the internet. When you switch to 4g, you are no longer on the same local network and therefore the ip address can no longer be reached from your phone. – Mark Jul 18 '19 at 01:32
  • Hi Mark, thanks for your input. Is there a way around this so that I can potentially run my android app to work in both cases without having to be just the wifi? – dhahn Jul 18 '19 at 02:44
  • 1
    Your development machine (where you run npm start) needs to be able to accept connections from the internet. Are you at work or at home? If you're at work I'd say it's likely impossible. At home you might be able to do it. You would need to forward port 19000 from your internet router to your development machine. Here's an article which discusses how to port forward on comcast xfinity: https://forums.xfinity.com/t5/Internet/ANSWERED-How-to-set-up-Port-Forwarding-on-your-Comcast-modem/ta-p/3030290 – Mark Jul 18 '19 at 03:11
  • @Mark initially this would be the right idea however I figured my set up for the bundler inside my android application will need configuration to the right server to run offline, without wifi... – dhahn Jul 18 '19 at 20:44
  • Maybe you could host the server code somewhere like Amazon aws or heroku. Then you can access the server from anywhere and only internet-connected network – Mark Jul 19 '19 at 00:00
  • I was actually able to get the app running by using the 'expo publish', 'generate signed apk/bundle' inside android studio with the keystore information but I ran into another error regarding a library I am currently using. Thanks for your input however! – dhahn Jul 19 '19 at 04:50

0 Answers0