Expo : React Native, 'Error starting tunnel: Error: Starting tunnels timed out'

Viewed 14726

I am connected to the same network my device and PC , how can we fix this error ,

After restarting it gives the same error with :

Switched to a LAN URL because the tunnel appears to be down. Only devices in the same network can access the app. You can restart the project to try reconnecting.

on my device it says

Tunnel packager ....exp.not found

I am running on windows btw; Thanks

7 Answers

Expo and react-devtools do not go together. So if you are using react-devtools, you must uninstall it. This worked for me:

npm uninstall react-devtools -g

But I noticed some other people were successful with this here.

npm uninstall react-devtools --save-dev

I solved this by examining my order of operations. Other people at my workplace had managed to set the project up but for some reason I ran into this error.

I was using VSCode debugger and figured out that the emulator needed expo to be open and the project to be open within expo on the simulator before tunnelling was successful. I was attempting to run the debugger without actually opening the app.

this usually happens when you have an inconsistent internet connection. you can try restarting your wifi/computer & restarting xde. if that doesn’t work, you can try using a different network to connect to the internet. a last resort is connecting your device to the LAN and strong text running from there

In my case, somehow expo was unable to install @expo/ngrok library (that it uses internally to create a tunnel) when I click on tunnel option.

You can solve the issue by installing the library globally using npm and restarting the expo metro bundler with expo start.

npm install --global @expo/ngrok

This can also happen if you are using a VPN. Turning it off my VPN worked for me.

Related