react-nativeexpo

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

  • 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.