Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App is stuck on splash screen when opening it in Testflight #5440

Closed
nikasvan opened this issue Aug 26, 2019 · 10 comments
Closed

App is stuck on splash screen when opening it in Testflight #5440

nikasvan opened this issue Aug 26, 2019 · 10 comments
Labels

Comments

@nikasvan
Copy link

🐛 Bug Report

Environment

Expo CLI 3.0.10 environment info:
    System:
      OS: macOS 10.14.6
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 10.14.2 - /usr/local/bin/node
yarn install v0.15.1
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 6.66s. - /usr/local/bin/yarn
      npm: 6.10.3 - /usr/local/bin/npm
      Watchman: 4.7.0 - /usr/local/bin/watchman
    IDEs:
      Android Studio: 3.4 AI-183.6156.11.34.5692245
      Xcode: 10.3/10G8 - /usr/bin/xcodebuild
    npmPackages:
      expo: ^33.0.0 => 33.0.7 
      react: 16.8.3 => 16.8.3 
      react-native: https://github.com/expo/react-native/archive/sdk-33.0.0.tar.gz => 0.59.8 
      react-navigation: ^3.11.0 => 3.11.1 
    npmGlobalPackages:
      expo-cli: 3.0.10

I am trying to run the app through(testflight). Upload went well but when I downloaded app on Testflight and opened it, it seems to be stuck on splash screen(waiting for more then an hour but no luck).

Steps to Reproduce

Upload app on testflight and run the app from there.

Expected Behavior

App to work the same as it works in development or when running it on expo.io. Seems to work on expo.io when I published app over there and scanned/opened it with expo app.

Actual Behavior

App is stuck on Splash screen.

Reproducible Demo

Upload app on Testflight and run it there.

Sharing my app.js below

import { AppLoading } from "expo"
import { Asset } from "expo-asset"
import * as Font from "expo-font"
import React from "react"
import { Ionicons } from "@expo/vector-icons"
import { Provider } from "react-redux"
import store from "./store"
import Root from "./Root.js"
import { YellowBox } from "react-native"
import AppNavigator from "./navigation/AppNavigator"

YellowBox.ignoreWarnings(["Remote debugger"])

export default class App extends React.Component {
  constructor(props) {
    super(props)
    this.state = { isReady: false }
  }

  async loadResourcesAsync() {
    await Promise.all([
      Asset.loadAsync([
        require("./assets/images/robot-dev.png"),
        require("./assets/images/robot-prod.png")
      ]),
      Font.loadAsync({
        // This is the font that we are using for our tab bar
        ...Ionicons.font,
        "Rubik-medium": require("./assets/fonts/Rubik-Medium.ttf"),
        "Rubik-regular": require("./assets/fonts/Rubik-Regular.ttf"),
        "Rubik-light": require("./assets/fonts/Rubik-Light.ttf"),
        geo: require("./assets/fonts/geogrotesque.ttf")
      })
    ])
  }

  render() {
    if (!this.state.isReady) {
      return (
        <AppLoading
          startAsync={this.loadResourcesAsync}
          onError={error => console.warn(error)}
          onFinish={() => this.setState({ isReady: true })}
        />
      )
    }

    return (
      <Provider store={store}>
        <AppNavigator />
      </Provider>
    )
  }
}

Any suggestions would be appreciated, thanks.

@nikasvan nikasvan added the bug label Aug 26, 2019
@cruzach
Copy link
Contributor

cruzach commented Aug 26, 2019

Is this after upgrading SDK versions? If it is, let me know what version you're upgrading from.

Also, do you see this error if you run it locally in production mode via expo start --no-dev --minify?

@cruzach cruzach added needs more info To be used when awaiting reporter response iOS and removed bug labels Aug 26, 2019
@nikasvan
Copy link
Author

@cruzach Thanks for response. I have not upgraded SDK. Started the project with v33.
When running expo start --no-dev --minify app has no problem launching. This only happens on Testflight.

@cruzach cruzach removed the needs more info To be used when awaiting reporter response label Aug 26, 2019
@cruzach
Copy link
Contributor

cruzach commented Aug 26, 2019

What is your assetBundlePatterns set to? Also, same question for updates

@nikasvan
Copy link
Author

@cruzach this is my app.json

{
  "expo": {
    "name": "APPNAME",
    "slug": "APPNAME",
    "privacy": "public",
    "sdkVersion": "33.0.0",
    "platforms": ["ios", "android", "web"],
    "version": "1.0.3",
    "orientation": "portrait",
    "splash": {
      "image": "./assets/images/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": ["**/*"],
    "ios": {
      "bundleIdentifier": "com.APPNAME.iosapp"
    },
    "android": {
      "package": "com.APPNAME.android"
    }
  }
}

@cruzach
Copy link
Contributor

cruzach commented Aug 26, 2019

Tried to reproduce this with the Expo tabs template app, and didn't see this problem. Not sure exactly what could cause this. When did you build? Do you still have the build ID?

Might be worth upgrading to SDK 34 and rebuilding and seeing if you still see the same problem

@nikasvan
Copy link
Author

@cruzach here's build ID f49177cc-b3db-4cc5-bb3d-631dedde8bc0

I'll update SDK to 34 and test that out in meantime.

BTW here is my app.js if it helps.

import { AppLoading } from "expo"
import { Asset } from "expo-asset"
import * as Font from "expo-font"
import React from "react"
import { Ionicons } from "@expo/vector-icons"
import { Provider } from "react-redux"
import store from "./store"
import Root from "./Root.js"
import { YellowBox } from "react-native"
import AppNavigator from "./navigation/AppNavigator"

YellowBox.ignoreWarnings(["Remote debugger"])

export default class App extends React.Component {
  constructor(props) {
    super(props)
    this.state = { isReady: false }
  }

  async loadResourcesAsync() {
    await Promise.all([
      Asset.loadAsync([
        require("./assets/images/robot-dev.png"),
        require("./assets/images/robot-prod.png")
      ]),
      Font.loadAsync({
        // This is the font that we are using for our tab bar
        ...Ionicons.font,
        "Rubik-medium": require("./assets/fonts/Rubik-Medium.ttf"),
        "Rubik-regular": require("./assets/fonts/Rubik-Regular.ttf"),
        "Rubik-light": require("./assets/fonts/Rubik-Light.ttf"),
        geo: require("./assets/fonts/geogrotesque.ttf")
      })
    ])
  }

  render() {
    if (!this.state.isReady) {
      return (
        <AppLoading
          startAsync={this.loadResourcesAsync}
          onError={error => console.warn(error)}
          onFinish={() => this.setState({ isReady: true })}
        />
      )
    }

    return (
      <Provider store={store}>
        <AppNavigator />
      </Provider>
    )
  }
}

@nikasvan
Copy link
Author

UPDATE - SDK 34 did not help.

@nikasvan
Copy link
Author

Issues is fixed and everything is working fine. I disabled splash screen and exact error cause was shown, which I fixed it.
BTW it was a deep linking problem.

@cruzach
Copy link
Contributor

cruzach commented Aug 27, 2019

Great 😄
What was the exact error cause/fix?

@nikasvan
Copy link
Author

It's still weird that there was no error message of any kind when Splash screen was present.
This

@cruzach cruzach closed this as completed Aug 27, 2019
@lock lock bot added the outdated label Feb 23, 2020
@lock lock bot locked and limited conversation to collaborators Feb 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants