Can't load expo app: Something went wrong

匿名 (未验证) 提交于 2019-12-03 02:56:01

问题:

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:

  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


回答2:

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)



回答3:

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.



回答4:

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



回答5:

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


回答6:

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



回答7:

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.



回答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 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.



易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!