问题
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.
回答1:
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:
- Go to Control Panel > Network and Internet > Network Connections
- Right click the desired connection (Higher Priority Connection)
- Click Properties > Internet Protocol Version 4
- Click Properties > Advanced
- Uncheck 'Automatic Metric'
- Enter 10 in 'Interface Metric'
- Click OK
回答2:
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.
回答3:
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)
回答4:
In my case, the issue was fixed by doing the following on my Android (Galaxy Note 5):
- Go to Settings > Apps > Application Manager > Expo
- Scroll down to Draw over other apps and toggle it off and then on again
- Close out of everything, re-open expo, and try connecting
It still threw an issue once before working perfectly upon further tries.
回答5:
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.
回答6:
In my case, expo app was outdated. I just updated expo from store and it started working.
回答7:
I had the same problem and fixed it on Windows 10 by making my machine discoverable on the network:
- Click wifi icon in app drawer.
- Go to the list of wifi connections and click your connection.
- Click "Properties". This opens up the page associated with your connection.
- Under "Make this PC discoverable", turn the slider to "On".
回答8:
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
回答9:
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.
- Control Panel -> Network and Internet -> Network Connections
- In my case is "Virtual Box Host-Only Network"
- Right clic on that, and Deactivate
回答10:
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.
回答11:
Make sure that you are using the same wireless network for iOS or Android phone as your computer.
回答12:
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).
回答13:
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.
回答14:
I solved it by deactivating it, although you could also open port 19000, which is used by Expo.
回答15:
Uninstalling and reinstalling expo on my Mac cleared this for me. Expo was complaining about being out of date.
回答16:
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.
来源:https://stackoverflow.com/questions/43002144/cant-load-expo-app-something-went-wrong