Android APK shows blank screen after brief loading screen. Published project from Expo app works fine.

See original GitHub issue

I’ve developed a project using CRNA. I published and that app works just fine. I’ve built an APK using expo build:android. Whether testing on my own device or an emulator, the APK app runs the loading screen very briefly and then goes to white instead of loading my Navigator Component.

App.js looks like this:


import { Provider } from 'react-redux';
import { store, persistor } from './src/redux/ConfigureStore';
import { Navigator } from './src/components/NavigationComponent';
import React from 'react';
import { PersistGate } from 'redux-persist/lib/integration/react';
import Loading from './src/components/LoadingComponent';


export default class App extends React.Component {
	render() {
		return (
			<Provider store={store}>
				<PersistGate loading={<Loading />} persistor={persistor} >
					<Navigator />
				</PersistGate>
			</Provider>
		);
	}
}

Environment

Environment: OS: Windows 10 Node: 10.6.0 Yarn: 1.7.0 npm: 6.1.0 Watchman: Not Found Xcode: N/A Android Studio: Version 3.2.0.0 AI-181.5540.7.32.5014246

Packages: (wanted => installed) expo: ^27.0.1 => 27.1.1 react: ^16.3.1 => 16.3.1 react-native: ~0.55.2 => 0.55.4

Diagnostics report: https://exp-xde-diagnostics.s3.amazonaws.com/savvycat-9c023f97-2652-4502-9f5d-1147f6da9212.tar.gz

package.json:

{
  "name": "sphinx",
  "version": "0.1.0",
  "private": true,
  "devDependencies": {
    "jest-expo": "~27.0.0",
    "react-native-scripts": "1.14.0",
    "react-test-renderer": "16.3.1"
  },
  "main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
  "scripts": {
    "start": "react-native-scripts start",
    "eject": "react-native-scripts eject",
    "android": "react-native-scripts android",
    "ios": "react-native-scripts ios",
    "test": "jest"
  },
  "jest": {
    "preset": "jest-expo"
  },
  "dependencies": {
    "expo": "^27.0.1",
    "react": "^16.3.1",
    "react-native": "~0.55.2",
    "react-native-elements": "^0.19.1",
    "react-native-hyperlink": "0.0.14",
    "react-native-keyboard-aware-scroll-view": "^0.7.1",
    "react-native-loading-spinner-overlay": "^0.5.2",
    "react-native-modal-selector": "0.0.28",
    "react-native-radio-buttons-group": "^1.0.7",
    "react-native-sticky-header-footer-scroll-view": "^2.1.3",
    "react-native-swipeout": "^2.3.6",
    "react-navigation": "^2.11.2",
    "react-redux": "^5.0.7",
    "redux": "^4.0.0",
    "redux-logger": "^3.0.6",
    "redux-persist": "^5.10.0",
    "yarn": "^1.9.4"
  },
  "description": "This project was bootstrapped with [Create React Native App](https://github.com/react-community/create-react-native-app).",
  "repository": {
    "type": "git",
    "url": "git+https://savvycat@bitbucket.org/savvycat/sphinx.git"
  },
  "author": "",
  "license": "ISC",
  "homepage": "https://bitbucket.org/savvycat/sphinx#readme"
}

Steps to Reproduce

  1. Publish app using expo publish
  2. Build out using expo build:android
  3. Install APK on device / emulator and open

Expected Behavior

I expect the APK standalone to function the same as the published app in Expo.

Actual Behavior

After briefly flashing to <Loading /> component (not always noticeably) screen goes to blank white.

Reproducible Demo

The working published app is at: https://expo.io/@savvycat/sphinx The APK is at: https://expo.io/artifacts/92985a3a-6d03-4adf-b0fa-c6459933b6df

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

9reactions
DoctorFishycommented, Oct 4, 2018

This issue was closed prematurely.

The proposed solution does not help. Running that command creates a working app just like the one that you can access in dev or by looking at the published app.

The non-working version is coming from a built apk for android. It is not behaving in the same way as the app produced by the command suggest, the app in dev, or the app that is published to expo.

4reactions
EvanBaconcommented, Oct 2, 2018

you can test how your app will work in prod by running: expo start --no-dev --minify this should help you to debug your error.

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-native expo publish showing a white screen
I have a very strange behaviour with a react native app building with Expo Kit. Things can run local, but just show a...
Read more >
App is stuck on Splash screen - Expo Development Tools
The app is stuck on the splash screen. ... same here, expo go and simulator works fine, but when I do expo publish...
Read more >
React Native Navigation: Tutorial with examples
In this React Native Navigation tutorial, we'll show you some examples of navigation patterns you can implement with React Navigation.
Read more >
Crashes - Android Developers
An app doesn't need to be running in the foreground for it to crash. Any app component, even components like broadcast receivers or...
Read more >
How to create React Native App for Android, iOS and Web ...
Open command Prompt and go to the path where you want to create the project, In my case the path is C:\Users\shivam\Desktop\React ....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found