Failed to load exp: // Something went wrong

I created a project using Expo XDE. I checked it out. I can’t download the exhibition application: something went wrong, but I already turned on “Draw on top of other applications”. It works https://expo.io/@ajaysaini/first-proj when I scan this QR code, but it doesn’t work when I run it on an Android device from XDE.

main.js

import Expo from 'expo'; import React from 'react'; import { StyleSheet, Text, View } from 'react-native'; class App extends React.Component { render() { return ( <View style={styles.container}> <Text>Updating!</Text> </View> ); } } const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: '#fff', alignItems: 'center', justifyContent: 'center', }, }); Expo.registerRootComponent(App); 

When I run it on the device, it shows below error on the Android device. I tried rebooting in XDE several times, but that did not help me.

enter image description here

 Dependency graph loaded. 11:19:21 AM Starting React Native packager... 11:19:24 AM Scanning 528 folders for symlinks in D:\Expo\first-proj\first-proj\node_modules (18ms) 11:19:24 AM Loading dependency graph. 11:19:24 AM Running packager on port 19001. 11:19:25 AM 11:19:33 AM Project opened! You can now use the "Share" or "Device" buttons to view your project. 11:19:44 AM Opening on Android device 11:19:54 AM Dependency graph loaded. 11:21:41 AM Opening on Android device 11:23:31 AM Opening on Android device 

Error:

 There was an unhandled error: Could not load exp:// Stack Trace: 

Can someone help me what goes wrong?

+8
source share
15 answers

It is better to open the XDE client and enable development mode. Then click gray cog to make Host> LAN (Local Area Network), which means sharing packets via WiFi using a real device).

The local parameter can also work, but according to the Expo debugging documents :

If you use a local network, make sure your device is on the same Wi-Fi network as your development machine. This may not work on some public networks. localhost will not work for iOS if you are not in a simulator, and it only works on Android if your device is connected to your machine via USB.

Also, here is a visual informative answer that I wrote a few months ago that may also help: How to run the application on a real iOS device using Expo?

+12
source

I ran into the same problem and none of the solutions helped me. The problem is that Expo is showing the wrong IP address that your phone cannot connect to.

Here's how I got around this. I am going to assume that you are using Windows and using LAN to run the application on your device.

  1. Open cmd, enter ipconfig and find out your local IP address. It should be listed as IPv4 Address in the Wireless LAN Adapter section. It will look something like this: 192.168.xx.x
  2. Now open any text editor on your phone and enter exp://192.168.xx.x:19000 . Copy this text to the clipboard.
  3. Open Expo app. You will now see the Open from Clipboard option at the top. Click on it and your application should load.

Now, anytime you want to download the application, you can copy the same address and open it in Expo.

I found another simpler workaround. Run set REACT_NATIVE_PACKAGER_HOSTNAME=192.168.xx.x commands before expo start . This will set the correct IP in Expo Dev Tools.

Hope this helps.

+6
source

Sometimes the problem is due to using the wrong priority of the network adapter.

open terminal and run

 ipconfig 

if the main LAN adapter is not listed as the first, then changing the adapter priority may solve the problem. Just follow the instructions:

  1. Go to Control Panel> Network and Internet> Network Connections

  2. Right click on your primary LAN

  3. Click Properties> Internet Protocol Version 4

  4. Click Properties> Advanced

  5. Uncheck "Auto metric"

  6. Enter 10 in "Interface Metric"

  7. Click OK

+4
source

Maybe your network does not support LAN communications. Switching the local network to the local one worked for me. From your MAC you can go to http://localhost:[portnumber] as shown in the image below.

enter image description here

+3
source

I solved the same problem with the recommendation of the React Native team - to install and run the Genymotion software ::

  • Install Genymotion with VirtualBox
  • SignUp on Genymotion
  • Launch the Genymotion program and! Signin
  • Quit npm using the project and run it again
  • npm start (in the npm promt window in the project directory)
  • Close and run the Expo application, scan the barcode

If my application works successfully, the IPv addresses are identical, for example:

 exp://10.0.0.125:19000 and ipconfig -> IPv4 Address. . . . . . . . . . . : 10.0.0.125 
0
source

If someone had a similar problem, my problem was to make it possible to connect the node.js node to the network, and it worked.

0
source

for some reason, I was creating conflicts with the docker, I turned it off, and it worked without problems, I'm almost sure that this is hyper-V

0
source

Maybe it can be useful to simply explain that such an error occurs if your phone and computer are on different networks.

I solved this problem by binding and so my two devices were not on the same network.

This means that you can probably connect both devices to the same WiFi, it should work.

0
source

Assumptions: Expo is installed ( https://expo.io ) on the computer via NPM / Yarn and Expo is installed on Android / iPhone. In addition, the phone is on the same Wi-Fi network as the computer.

My computer was connected via WiFI and this was a problem for me. Windows: Command line: $ ipconfig Find Wifi IP address of your computer. I had Ip v4: 192.168.1.xxx. Enter a web browser on the phone web browser . URL: exp: //192.168.1.xxx: 19000. Then a text should appear, which means that the phone is connecting via the network (okay. Sign) Then open the exhibition on the phone, and should see the link through the clipboard. Click on the link through the clipboard, which is located inside the Expo program on the phone. Then he should download the application to his phone. It worked for me. Ps Follow the instructions for granting permission to Expo, etc., When it works for the first time.

0
source

I fixed the problem by updating npm and the node.

0
source

I think many people must have done all of the above and still something went wrong, mistake

Documents can indicate when building locally, and your device is connected to your machine, you should click on the Local section on the web debugging page, which displays the image of the QR code.

enter image description here

Then, after clicking on Local, try to scan the QR code again, your error should disappear and displays downloadable javascripts packages of assets.

0
source

I ONLY delete VMWARE Player .... THIS PROBLEM IS SOLVED! ipconfig showed vmware ipv4 ip address

0
source

In my case, it was a VPN - I connected my mobile phone to the VPN after it was successfully disconnected.

0
source

If you guys are using a firewall, make sure ports 19000 and 19001 are whitelisted.

0
source

Make sure your laptop and Android device are connected to the same network, and this should fix the problem you just did for me.

0
source

Source: https://habr.com/ru/post/1269009/


All Articles