Window wrong IP Address when working on remote device

#1

Hi. I recently faced another problem developing in Window.

It works nice when I just used genymotion but when I try to share it with QR code to develop app on my remote android device, it always fails which related to issue over here https://github.com/react-community/create-react-native-app/issues/81.

I’ve done every options and started on my expo app and it won’t work.
In expo my ip address shows like this “exp://192.168.56.1:19000”.
However when I try to reach http://192.168.56.1:19000, browser won’t reach this ip address.
Instead, http://192.168.0.15:19000 is reachable in my android phone’s browser.

I feel ip address is incorrect when trying to share it with device.

I hope my experience is helpful to expo to fix the issue.

Thank you.

Set Network Interface in settings.json
#2

Hi! You can set the environment variable EXPO_PACKAGER_HOSTNAME to “192.168.0.15” to avoid this problem in the future. Sometimes on Windows, the OS reports a VirtualBox IP address as the “default” network interface, rather than your physical network adapter.

1 Like
#3

Greetings…
Can you please tell me how to set environment variable? In which file I’ve to change environment variable. It’ll be very helpful if you provide path to that file.

#5

On Linux and Mac you can run YOUR_VARIABLE=value exp start and that will set the variable for exp or whatever command you want, there’s nothing special about Expo tools here.

closed #6

This topic was automatically closed after 14 days. New replies are no longer allowed.