41

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.

RMalke
  • 4,048
  • 29
  • 42
humkins
  • 9,635
  • 11
  • 57
  • 75
  • 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 – Carmine Tambascia Sep 09 '22 at 10:08

36 Answers36

58

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.

Steve Carey
  • 2,876
  • 23
  • 34
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
RMalke
  • 4,048
  • 29
  • 42
16

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

Masoud
  • 260
  • 2
  • 9
  • 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 Feb 05 '21 at 01:39
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.

Ewoknroll
  • 141
  • 1
  • 4
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.

humkins
  • 9,635
  • 11
  • 57
  • 75
9

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

Rohit Katariya
  • 119
  • 1
  • 9
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)

jhm
  • 4,379
  • 5
  • 33
  • 49
  • Tunnel doesn't work for me, but LAN does. Can anybody explain the difference here? – Stanley Luo Oct 16 '17 at 06: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 Apr 09 '18 at 08: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.

Swapnil Patwa
  • 4,069
  • 3
  • 25
  • 37
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.

Symyon
  • 388
  • 2
  • 10
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.

iParianos
  • 51
  • 5
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

2

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.

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".
Gob
  • 117
  • 1
  • 4
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.

Andre Oliveira
  • 197
  • 2
  • 10
1

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

Joel Wiklund
  • 1,697
  • 2
  • 18
  • 24
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.

Ali Tourani
  • 1,170
  • 3
  • 21
  • 31
  • "You should also install expo in the project root directory after project setup" bingo! - that fixed the issue for me *smacks forehead* – Jillian Hoenig Sep 30 '22 at 00: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.

Akber Iqbal
  • 14,487
  • 12
  • 48
  • 70
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).

user8036224
  • 420
  • 1
  • 4
  • 11
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.

Yogesh Devgun
  • 1,297
  • 1
  • 19
  • 36
0

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

maucodev
  • 1
  • 2
0

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

Enty
  • 1
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!

  • Could you please provide a source for the information stating that Expo is no longer available on iOS physical devices? – Attila Feb 03 '20 at 19:23
  • https://blog.expo.io/upcoming-limitations-to-ios-expo-client-8076d01aee1a – Muhammad Saqib Javed Feb 17 '20 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 Feb 18 '20 at 03:36
  • @Attila can you still scan qr? – wobsoriano Mar 12 '21 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

Ahmedakhtar11
  • 1,076
  • 11
  • 7
0

That issue was solved very easily following these steps:

  1. Sign in with the expo mobile app using your expo account.
  2. When we run the app using the expo start command can see the localhost web page, In that web page left side can see Connection, by default it is Land, change it to the Tunnel.
  3. Scan the QR code.
Pierre.Vriens
  • 2,117
  • 75
  • 29
  • 42
9Tharaka
  • 1
  • 1
0

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.

Lojith Vinsuka
  • 906
  • 1
  • 10
  • 8
0

for me it was the antivirus security firewall i turned it off it run well

0

None of these solutions worked for me on an Android Emulator. But I figured it out: It was because of the proxy settings I made months ago and I forgot to remove.

For Android Emulator it can be solved by:

  1. Click on the 3-dots icon in the side-bar.
  2. Go to settings --> Proxy.
  3. Check No Proxy.

voila.

ahmelq
  • 593
  • 7
  • 11
0

For me it was due to another server running on port 19000. Node asked permission to run the server on port 19001 to which I responded 'Y'. This was the problem. I stopped the other server and allowed Expo to run on the default 19000 port, and it worked.

Adrian Bartholomew
  • 2,506
  • 6
  • 29
  • 37
0

In my case, I have solved the problem in this way(Windows):

  • First of all, you need to connect to the same Wi-Fi with your computer.
  • Secondly type ipconfig to learn your computer's local IP. Assume that it is 192.168.0.2. Now, type the url exp://192.168.0.2:19000 to your phone browser's addresbar(It is 19000 because metro bundler work at port 19000 as default). Probably, it will direct you to the Expo App and your app will work.
  • If it does not work even so, Enter Control Panel>Network and Internet>Network and Sharing Centre>{the wifi that you are connected}>Properties>Internet Protocol(TCP/IPv4)>Advanced> and disable Automatic metric and type 10 in Interface metric value, probably this will fix the issue. At least, in my case it fixed.

This problem is caused by QR code which directs your phone to the 127.0.0.1, which is localhost and therefore can not access computer from there.

0

Sometimes when you have this kind of errors, the only thing you need to do in order to fix it is disconnect and connect again to your network from your pc and your phone.

I was having this same error and this worked for me!