create-react-native-app: Expo is not loading my app
Please make our job easier by filling this template out to completion. If you’re requesting a feature instead of reporting a bug, please feel free to skip the Environment and Reproducible Demo sections.
Expo is not loading my react app in Iphone
- Both the pc and the phone use the same network
- I’m getting a message saying: "It looks like you may be using a LAN url. Make sure ur device is on the same network as the server or try using a tunnel.
Expected Behavior
I’m excepting to use my phone as a emulator
What action did you perform, and what did you expect to happen?
Observed Behavior
I scanned the qr code in my console
What actually happened when you performed the above actions? i get an error with the msg above
If there’s an error message, please paste the full terminal output and error message in this code block:
There was a problem loading the experience. It looks like you may be using a LAN url. Make sure your device is on the same network as the server or try using a tunnel.
Environment
Please run these commands in the project folder and fill in their results:
npm ls react-native-scripts:1.11.1npm ls react-native:0.52.0npm ls expo: 25.0.0node -v: 9.8.0npm -v: 4.6.1yarn --version:watchman version:
Also specify:
- Operating system: Windows 10
- Phone/emulator/simulator & version: Expo app on ios
Reproducible Demo
Please provide a minimized reproducible demonstration of the problem you’re reporting.
Issues that come with minimal repro’s are resolved much more quickly than issues where a maintainer has to reproduce themselves.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 17 (2 by maintainers)
does your URL look something like this:
Your URL is: exp://192.168.1.73:19000as opposed to this:exp://9h-hcy.bacon.tickle_me_elmo.exp.direct:80if so then try running:exp start --tunneland check to make sure you have a pretty solid wifi connection 💙🌝What you need to do is: Go to cmd and type “ipconfig” and see which network is using the ip shown in your expo app. if it’s not your router IP address then what you need to do is to go and disable the network which expo is using: Control Panel -> Network and Internet -> Network Connections and here disable the network that expo is using. (it should be a LAN network connection) try to run “npm start” again, it should be working now. If my solution is not clear feel free to ask me.
use this command on cmd :- npx expo start --tunnel
So I had this problem on my iPhone and I was getting worked up about it and then I used a friend’s iPhone and everything worked. Turns out it had something to do with the Expo-app’s permissions. When you first download Expo Go, it asks for some permission roughly about allowing your device to connect with other devices in the network. Looks like I overlooked the permission the first time and clicked “No”. Clicking “Allow” instead fixed it. I deleted and redownloaded Expo to see the permission again because I didn’t want to search through settings to find it. Hope this helps.
My issue was a VPN that was placed on my network through one of my other apps I installed. I’m not sure why, but it seems to be affecting the connection with expo.
PROBLEM
The first few times I run
exp startit gives a URL like:exp://9h-hcy.bacon.tickle_me_elmo.exp.direct:80but then it randomly switches to:Your URL is: exp://192.168.1.73:19000and when I scan the QR it errors on my mobile device. It also says in my expo CLI log:SOLUTION - Failed
re-start with
exp start --tunnelit still shows a URL likeexp://192.168.1.73:19000, QR scan still fails.SOLUTION - That is not sustainable for development:
Delete the entire project directory, and re-do
git clone...npm installexpo start, it then works on first try:[13:23:13] Your URL is: exp://dz-dca.thinkocapo.rag-tag-react-native.exp.direct:80and sure enought I do ctrl+c to kill the app, I restart it and itsYour URL is: exp://192.168.88.12:19000again. Weird!SOLUTION Update
I think my mobile is on WifiFloor2 and my laptop is on WifiFloor3. I also used
exp start -m tunneland it’s working now…maybe get both my devices on same Wifi, but how to get it to ignore and not care which wifi you’re on? Doexp start --helpto see all the CLI optionsWifi Note
I’m at a co-working space. I’m not using a VPN. Wifi connection is fine, loading pages no issue, full strength.
Any ideas @EvanBacon ?
opened a topic on https://forums.expo.io/t/why-does-expo-url-change-when-i-re-run-exp-start/11715 and will keep ya’ll posted. I’ll keep researching.
I had this issue when running Docker.
The URL given in the command line may not be the correct one. For me, it was using docker’s IP instead of my actual networks local ip. I’ve worked around it for now by entering my local address followed by port 19000 in safari. EG:
exp://192.168.1.151:19000because you need to be on the same wifi network and the network cannot be behind a nat. if it is then you can’t access other computers on the network