'Expo app - can't load project with message : This is taking much longer than it should

I build my react native app in this way :

1.npm install expo-cli --global.

2.expo init my-new-project.

3.cd my-new-project and expo start --lan.

4. install expo on my ios device.

5. open Expo then click the “Scan QR Code” and Scan the QR code in our terminal.

but I get following error :

error

I am connected to the same wifi on both devices and my IP is the same. And I turned off my windows firewall.

Do you know why this happens? I once saw the output on my phone but after that this error occurs every time.



Solution 1:[1]

I had this problem as well and was able to solve it. If you have a program like docker installed, it will create a virtual network adapter, Expo will then try to use this virtual network adapter to host the app. You want Expo to use your physical wifi/ethernet adapter in your computer instead, since that will allow it to communicate with your phone (which is on the same network).

You can solve the problem by changing the adapter properties to ensure that Expo uses the right network adapter to host your development environment:

https://answers.microsoft.com/en-us/windows/forum/windows_10-networking/adapter-priority-setting-unavailable-in-windows-10/d2b63caa-e77c-4b46-88b5-eeeaee00c306?auth=1

Restart your Expo server and try again once you complete the steps in the link above.

Solution 2:[2]

I had the same problem, entered to Settings, Network, WI-Fi, show available Networks, Properties on your internet connection, and click on Private. Then it worked, I hope it serves to you too.

Solution 3:[3]

I was having having the same issue. Switched to tunnel connection and it worked.

Solution 4:[4]

I had the same problem. I disconnected from my wifi network, reconnected and it started working.

Solution 5:[5]

Your firewall is most likely the problem. It may be blocking your phone's connection to your computer.

On Windows: Settings > Network and Internet > [Ethernet || WiFi] > Network > Network Profile [Private] > Configure Firewall and Security Settings > (Settings is trying to open Windows Security) [Yes] > Private Network > Microsoft Defender Firewall [Off]

Now expo should work through LAN.

Alternatively: On the expo developer tools, switch to tunnel.

Solution 6:[6]

Firewall settings mac os

  • MacOS Monterey
  • iPhone

None of the posted solutions were fixing the problem, this is what ended up doing the trick:

  1. System Preferences ->

  2. Security & Privacy ->

  3. Firewall (tab) ->

  4. Firewall Options... (button) ->

  5. scroll down to node in the left column and change the corresponding dropdown to read 'Allow incoming connections'

  6. I then closed out the previously opened server in my terminal, turned off the wifi connection on both of my devices.

  7. Once I ran everything again and scanned the new QR in my terminal, the app loaded.

Solution 7:[7]

I think you should scan the QR code from the dev tools that run on localhost from browser. Also the Expo app in Ios doesn't have a scan QR code option, if I am not wrong. We run apps by scanning QR code directly from Camera and opening it using Expo app. From my personal experience the QR code shown in terminal causes problems as we save changes to app.

Solution 8:[8]

Connect your phone to the same WIFI network and it should work.

Solution 9:[9]

you have to login on you pc with your expo account

Solution 10:[10]

I had this problem on an iPhone - it was working fine for at least a month until suddenly it couldn't connect. It could still connect using the 'tunnel' option, but not LAN.

Interestingly, the iPhone COULD connect to a different PC, and at the same time a different device could connect to Expo on the machine that was problematic for the iPhone.

After trying lots of other things, I uninstalled and re-installed Expo Go app on the phone and it started working again.

Solution 11:[11]

In my case there was a VPN connected. Make sure you're using the same local network in order to use LAN option for expo.