Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not load exp:// Something went wrong

I have created a project using Expo XDE. I checked this Can't load expo app: Something went wrong but I have already enabled "Draw over other apps". It works https://expo.io/@ajaysaini/first-proj when I scan this QR code but it doesn't when I run it on 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 am running it on device it shows below error on android device. I tried restart in XDE multiple times but it didn't 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 anyone help me what is going wrong ?

like image 555
N Sharma Avatar asked Jun 20 '17 06:06

N Sharma


People also ask

How do I fix Expo something went wrong?

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.

Why expo go keeps stopping?

Summary of IssueThe app frequently crashes when killed if the background task is active. The Expo client refuses to start unless clearing its storage on Android.

How do you use Expo tunnel?

Expo runs the application in LAN by default and you can switch to Tunnel by simply clicking on it. Expo might prompt you to register to their platform and create an account if you haven't. This will take only a few minutes. After you have an account, switching yo tunnel mode should be enable for your application.


1 Answers

You better open XDE Client and enable development mode. Then, click on the gray cog to make Host > LAN (Local area network - which means sharing packages over WiFi with a real device).

Localhost option may work as well but according to Expo Debugging docs:

If you are using LAN, make sure your device is on the same wifi network as your development machine. This may not work on some public networks. localhost will not work for iOS unless you are in the 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 do I run an app on a real iOS device using Expo?

like image 142
eden Avatar answered Oct 12 '22 21:10

eden