After running npx expo start and trying to open the app on my iphone, I kept getting the following error "Unknown error: The network connection was lost." This error caused me about 18.2345 headaches trying to figure out what was wrong.

I tried all of the basic troubleshooting steps mentioned below, but nothing worked. I also saw the suggestions about npx expostart --tunnel but opted not to go this route due to it being slower. I will explain what worked for me, but first lets start with the basic troubleshooting steps.

Step 1: Make sure you have done/confirmed the following basic troubleshooting steps:

  1. Make sure your phone and computer are on the same WiFi network

  2. Clear the Expo Go app cache on your phone

    npx expo start -c

  3. Update Expo CLI to the latest version:

    npm install -g expo-cli

These steps should resolve most QR code connection issues when working with Expo.

Step 2: If you are still having issues and currently have a headache, try the following:

  1. Turn off your computer's firewall temporarily. I say temporarily because you'll need to turn it back on after you are done testing your app.

  2. On Mac, go to Settings > Network > Firewall > Turn Off Firewall.

  3. On Windows, go to Control Panel > System and Security > Windows Defender Firewall > Turn Off Windows Defender Firewall.


After removing the firewall, restart expo and try again. This is what ended up working for me and hope this helps someone out there.



⚠️ Security Note: Remember to re-enable your firewall after testing. Running without a firewall can expose your system to security risks. ⚠️