The first time I created an app within the Expo XDE I got a long preview URL (for the Expo app) which ended in direct:80, but now I keep getting ‘exp://localhost:19000’ as my URL which isn’t accepted by the app. I’ve tried restarting my PC and deleting and recreating the Android emulation but nothing seems to fix this. Any help would be incredibly appreciated as I have no way of previewing my app!
My best guess is that you have to change your settings to use localhost. You can change that by clicking the gear next to the URL and then choosing Host > Tunnel. Let me know if that doesn’t work and I’ll try to work with you through another solution.
Thanks for the reply. Unfortunately setting it to localhost doesn’t fix the issue – I still get “Something went wrong. // Could not load exp://localhost:19000.” The specific error in the error log is: “Uncaught Error: java.net.ConnectException: Failed to connect to localhost/127.0.0.1:19000”
The error persists even with Windows Firewall completely disabled. I find it strange that the URL is exp://localhost:19000 because before it was a much longer URL (ending with direct:80, IIRC) which worked absolutely fine.
If you are using windows 10, run CMD on your machine and type ipconfig. Take a look at the first Ethernet Adapter. If it doesn’t say Ethernet Adapter Ethernet it means Expo is taking the IP address of something else.
To fix this, go to network connections and disable the adapter that it should not be pointing at.
Connect your computer to the network and your phone to the same network. Restart Expo.
Hi @jimmylee, thanks for the help. The first network listed with ipconfig is ‘Ethernet adapter VirtualBox Host-Only Network’ – I think if I was to disable this, my Android emulator (genymotion) would stop working as it depends on VirtualBox’s networking, doesn’t it?
I’ll give it a go anyway and report back if it’s successful.
Okay, as I suspected, Genymotion no longer works with this disabled and it requests for the adapter(s) to be re-enabled. However, if I start Expo before re-enabling them, everything works as expected. So this works well as a temporary fix.