45

I've created an expo app with exp init MyApp command and started it by running exp start in MyApp directory.

Then I'm scanning barcode which was printed in console with expo mobile app on android device.

Then "Something went wrong" screen is rendered instead of the app.

View log shows "Uncaught Error: Couldn't load exp://.....".

No errors in expo packager console output.

It used to work sometimes ago.

2
  • This is still happening with version 2.25.2 even after tried everything possible, from just refresh with r, to clean cache or even delete and reinstall. Basically it doesn't do the basic reason why is been developed Commented Sep 9, 2022 at 10:08
  • In my case i update npm using " npm update" then " npm fund" then run app it worked Commented Feb 24 at 9:18

38 Answers 38

60

What solved this for me was simply changing the connection from LAN to Tunnel. When you start an expo app, a browser window will open with a URL like http://localhost:19002/. Along the left side is a Connection option set to LAN by default. Changing it to Tunnel before scanning the QR code with the expo app solved it.

5
  • 1
    that was helpful for me! Commented Aug 28, 2019 at 22:23
  • 1
    Worked for me, too! This should be the approved answer.
    – LozzerJP
    Commented Jun 18, 2021 at 18:07
  • thanks +1 and please approve this answer Commented Jan 6, 2022 at 18:58
  • But what if you want to run it locally? Commented Aug 30, 2022 at 1:23
  • Indeed, if you run a backend locally and use the app as frontend in tunnel mode you cannot connect to the local backend. Commented Oct 10, 2022 at 9:16
51

For me the problem was happening when running over WiFi, as the tools always use the your first connection (you can check it by running ipconfig) and my first connection was internet.

If that's you case you may try this workaround for changing you connections priority:

  1. Go to Control Panel > Network and Internet > Network Connections
  2. Right click the desired connection (Higher Priority Connection)
  3. Click Properties > Internet Protocol Version 4
  4. Click Properties > Advanced
  5. Uncheck 'Automatic Metric'
  6. Enter 10 in 'Interface Metric'
  7. Click OK
4
  • cant find the Network Connections option on Windows 10 Commented Oct 13, 2020 at 21:25
  • @KaranSingh in the search bar next to start, type "network connections", that will show View Network Connections which is what you want.
    – monsto
    Commented Feb 12, 2021 at 20:01
  • I've tried, and it's not working
    – Nam Lee
    Commented Sep 2, 2022 at 15:23
  • Using the same wifi on laptop and Mobile fixed it for me. Commented Sep 17, 2022 at 13:04
23

For my case, using wireless adapter, I had to make my Network profile private. 1) Go to Properties of wireless network 2) Make network profile private

Network Profile

2
  • On Windows 10, your solution worked for me. Thanks for sharing! The exact steps: (1) Open the Start menu, and type "network status" (2) Click on "Change connection properties" (3) Change from public to private
    – wfarid
    Commented Feb 5, 2021 at 1:39
  • This really worked for me.
    – PratikD
    Commented Jul 9 at 15:37
14

In my case, the issue was fixed by doing the following on my Android (Galaxy Note 5):

  1. Go to Settings > Apps > Application Manager > Expo
  2. Scroll down to Draw over other apps and toggle it off and then on again
  3. Close out of everything, re-open expo, and try connecting

It still threw an issue once before working perfectly upon further tries.

13

Make sure that you are using the same wireless network for iOS or Android phone as your computer.

11

It was needed to reset "Draw over other apps" permission for Expo mobile app.

How that is fixed on Android 6.

Settings->Apps, press "gear", find "Draw over other apps" item and select it. Find "Expo" app, select it. Enable "Permit drawing over other apps" option in case it is disabled. Otherwise, disable and enable it again.

1
  • That was the fix for my 1Plus also.
    – tim92109
    Commented Sep 4, 2019 at 17:08
4

In my case, I had "host" set to 'localhost' in the XDE - which of course won't work on my physical device ;-) So, if you want to debug on a physical device, make sure your host is set to LAN instead. (Tunnel would work too, but would make debugging painstakingly slow)

2
  • Tunnel doesn't work for me, but LAN does. Can anybody explain the difference here?
    – Stan Luo
    Commented Oct 16, 2017 at 6:39
  • AFAIK, tunnel hosts your app bundle on a CDN online, which means each time you build, you'll have to wait for XDE to upload the new code, and the Expo client to download it again. This makes it easy for remote debugging/developing, but adds latency overhead. LAN, instead, hosts the bundle on your local network, reducing the latency considerably.
    – jhm
    Commented Apr 9, 2018 at 8:21
4

For me its worked by selecting the tunnel connection rather than LAN in metrol Bundler.. Try it out....

3

In my case, expo app was outdated. I just updated expo from store and it started working.

1
  • 2
    This was the case for me. Wish it was more obvious that was the cause.
    – Jay Wick
    Commented Dec 26, 2019 at 5:28
3

In my case, it works when I changed connection LAN to Local. but it requires to connect phone through the data cable.

3

If you have a similar issue but the error says 'Uncought Error: java.lang.Exception: No launchable update', make sure you remove the "runtimeVersion" from your app.json while developing. Strangely enough, having "runtimeVersion" present works on iOS but it will fail to run on Android Expo Go app.

2
  • Thanks, saved my task today. Even more strangely it fails only in the first (test) run. Commented Dec 26, 2021 at 5:47
  • Hey, you made my day! It drove me crazy to find a solution and that fix worked perfectly! Thank you!
    – JuanO
    Commented Feb 7, 2022 at 16:04
3

I had the same issue and fixed it by running this command. -it will clear the cache and start your expo project again.

expo start -c

I hope it will work fine.

2

I had the same problem and I solved it by deactivating the Virtualbox internet connection, that happens because Node take that connection to start the packager.

  1. Control Panel -> Network and Internet -> Network Connections
  2. In my case is "Virtual Box Host-Only Network"
  3. Right clic on that, and Deactivate
2

For anyone that using ESET firewall, you have to go into firewall rules and allow ports 19000,19001,19002, Advanced->Rules->Edit, on General tab select Direction->Both, Action->Allow, then visit Local tab and on port field add the mentioned ports above, click ok. Do this action for every port you need to add.

2

In my case, the problem was not with the firewall the problem was with my internet I was running my computer and phone on two different internets then I connected my phone to the router which is connected to my computer and again I tried it worked

1

I had the same problem and fixed it on Windows 10 by making my machine discoverable on the network:

  1. Click wifi icon in app drawer.
  2. Go to the list of wifi connections and click your connection.
  3. Click "Properties". This opens up the page associated with your connection.
  4. Under "Make this PC discoverable", turn the slider to "On".
1

For macOS users and if you are running over Wi-Fi:

  1. Choose Apple menu > System Preferences, then click Network
  2. Click Wi-Fi in the list at the left, then click Advanced
  3. Find the network you are connected to
  4. Then drag it to the top of the preferred networks list to give highest priority

This procedure solved my problem.

1

For me, expo wasn't started. So expo start in VS Code terminal solved it.

1

enter image description here

Local connection works for me.

prerequisite :

  1. Add the adb.exe path to environment variables.

    (In my case : D:\AppDevTools\Android\Sdk\platform-tools)

  2. Connect your android mobile phone to your pc using a USB cable.

  3. Enable USB debugging on your mobile phone.

1

It depends on what OS are you using. If it is Windows 8 or earlier, try updating the version. In Windows 10 and Windows 11 it should work correctly. Try installing expo globally instead of local install.

You should also install expo in the project root directory after project setup:

npm i expo // or npm i -g expo for global installation

If you are using yarn, then try npm as well.

1
  • "You should also install expo in the project root directory after project setup" bingo! - that fixed the issue for me smacks forehead Commented Sep 30, 2022 at 0:58
1

According to me, what have solved my issue were a few things below:

  1. Restart Expo and then try scanning the barcode once again.
  2. You can also reload the application by clicking R on Code editor. And the caption "Something went Wrong" will reload.
  3. You can check the internet of your mobile device and the laptop/desktop is connected with same network.
  4. Restarting the project sometimes also helped me. As the file does not compile properly it sometime create this issue.

Hope this you will your issue resolved soon.

0

I believe this issue is happening due to mismatch version of your AVD and your expo mobile application. I created new AVD with newer version of Nexus 6 API and issue was resolved. I also needed to reset "Draw over other apps" permission for Expo mobile app.

0

For me, I have to close and kill expo (from RAM) AND close the QR Code overlay view to get it work on Android 5.1.1.

Sometimes I have to wait a few minutes or I get a camera view and a text above about scanning the QR Code (but without a scanner over the camera view).

0

If you're not able to load the http URL in your phone's web browser, try using the tethering/mobile hotspot feature on your phone (beware of data usage, though), connecting your computer to that WiFi network, and restarting the packager. If you are using a VPN you may need to disable it.

0

I solved it by deactivating it, although you could also open port 19000, which is used by Expo.

0

Uninstalling and reinstalling expo on my Mac cleared this for me. Expo was complaining about being out of date.

0

Do some things.

  • ForceStop App.
  • Restart App.
  • Clean Cache and Clear Data.
  • Else due to outdated expo. Update expo from play store.

Note: Expo no longer available for IOS physical devices.

Let me know if any issue occurred!

4
  • Could you please provide a source for the information stating that Expo is no longer available on iOS physical devices?
    – Attila
    Commented Feb 3, 2020 at 19:23
  • blog.expo.io/… Commented Feb 17, 2020 at 20:16
  • That article only mentions that you won't be able to open the app via the QR code or if the app belongs to another Expo account. Besides, that article is 2 years old and is no longer valid. I just tested and I am able to run Expo on my physical devices and scan the QR code to open the Expo app.
    – Attila
    Commented Feb 18, 2020 at 3:36
  • @Attila can you still scan qr?
    – wobsoriano
    Commented Mar 12, 2021 at 10:25
0

In my case was that the phone was connected to a VPN (CyberGhost) and it showed up only a white screen D:

0

In my case, windows firewall was blocking it. So, I made it run by turning the firewall off.

0

I think that the solution for this might be the most simplest thing. What works for me when the app doesn't load on the emulator using expo is just clicking X and closing the info alert that pops up. You'll see the following Info Alert and if you close that out and try hitting the running on Android button again, then it should work. Otherwise deleting and creating a new virtual device also helps incase the cache or expo installation on the device is really causing problems.

enter image description here

Not the answer you're looking for? Browse other questions tagged or ask your own question.