Create-react-native-app: Expo stuck on loading my app

Created on 19 Jun 2017  路  17Comments  路  Source: expo/create-react-native-app

Description

After scanning the qrcode, Expo stuck on loading my app.

Expected Behavior

Expo should load my app.

Observed Behavior

Expo stuck in showing it's loading icon, as shown below. Attention, the icon blinks all the time.
image

  1. At the beginning, the problem does not exist. But later it comes, and I don't know why.
  2. The phone and mac is in the same network, and the phone can visit the address : http://myId:19000, which is shown on the terminal. The phone also can visit the JS bundle File, such as : http://myIp:19001/node_modules/react-native-scripts/build/bin/crna-entry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=expo/tools/hashAssetFiles
  3. I have tried reinstall the Expo APP and restart the npm start, it doesn't work.

Environment

  • npm ls react-native-scripts: @0.0.31
  • npm ls react-native: @0.44.3
  • npm ls expo: @17.0.0
  • node -v: v7.7.4
  • npm -v: v4.1.2
  • yarn --version: 0.20.3
  • watchman version: command not found

Also specify:

  1. Operating system: macOS Sierra 10.12.1
  2. Phone/emulator/simulator & version: Redmi Note 2, Android 5.0.2LRX22G

Reproducible Demo

The demo is here : https://github.com/youngwind/react-native-demo
Any suggestion may help, thanks!

Most helpful comment

Had the same problem, and completely closing the expo app and reopening it again works for me.

All 17 comments

Sorry, I make a stupid mistake.

// my code missing return in the render function!!
render() {
    <Text>sdfhh</Text>
}

When I solve this bug, it works.

However, I want to put forward a suggestion:"Why it doesn't show any error log in this case?"
For example:

// the return keyword has a spelling mistake
render() {
    retun(
        <Text>sdfhh</Text>
    );
}

In this case, it neither show any error log in the terminal.

we definitely should provide some information when this happens -- I'm not able to reproduce this though, I get an error message like expected:

screenshot_20170619-092635

this happens on a brand new project with

import React from 'react';
import { StyleSheet, Text, View } from 'react-native';

export default class App extends React.Component {
  render() {
    retun (
      <View style={styles.container}>
        <Text>Hello</Text>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
});

how can I reproduce your case of not seeing any error?

I'm not able to steadily reproduce this case now.
When I meet this issue again, I would provide more information.
Thanks for your Help!

For me the way to reliably reproduce this is to start react-native-scripts android with phone plugged-in. Then the Expo app will be automatically started and it will load forever. The way to fix it is to close the app then open it again, or never let Expo app be started automatically.

Had the same problem, and completely closing the expo app and reopening it again works for me.

Have the same problem, application does not show any error logs on my phone.

I was also running in this problem on a virtual android device. Running yarn start and then at the prompt pressing R to restart the packager and clear the cache solved the issue for me.

Im having the same problem, I've cleared the cache, reinstalled the app...nothing. loads to 100% then just hangs there for about 5 minutes before crashing with no errors. Even stranger, my app was working fine with expo yesterday, and i haven't changed any code.

Im having exacly the same problem with @sambragge. Start happening when I upgrade from 22 to 23.

I am having the same issue here. It was all working fine yesterday, but now for whatever reason the app just hangs on the expo logo, both on my actual Android device and on the virtual one.

use return instead retun at line 7 @brentvatne

How did you resolve this issue? Mine is also stuck in the loading.

for me I was testing the app on both the simulator and my phone at the same time and I had to close expo, the expo app on my phone, the simulator as well as the remote debugging tab in the browser. then after opening expo again and the app on my phone it loaded fine. There are most likely unnecessary steps here but anyway

I have the same issue

  1. I checked my code is not missing "return"

  2. They are on the same wifi network and it is not a public network. it is my private house wifi.

. It was working just two hours ago and since then it stuck in Building Javascript bundle [ ] 0% I tried to reload it sooo many times, I restarted my pc and mobile but nothing work! and I got no message just white page with expo logo in the center.

Same for me as @Nermin-K
How did you solve this?

@krish512 I cleared my mobile cashed data and it did work for a while but later it struck again, so I tried to uninstall some apps and it worked!!馃し It is a little confusing because I had a very enough space for Expo to work! anyway, this is what worked for me

I cleared cache and all the data used by expo. It worked.
A simple way is to just reinstall expo application.

Was this page helpful?
0 / 5 - 0 ratings