-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Description
Overview
I am able to run my app perfectly fine with react-native run-android after creating a dev bundle.
However when I try to run react-native run-android --variant=release after creating a release bundle, the app crashes immediately when started.
Bundle command being used for release: react-native bundle --platform android --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle
React Native version:
System:
OS: Windows 10 10.0.18362
CPU: (12) x64 AMD Ryzen 5 3600 6-Core Processor
Memory: 7.01 GB / 15.93 GB
Binaries:
Node: 10.16.2 - C:\Program Files\nodejs\node.EXE
npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version 3.4.0.0 AI-183.6156.11.34.5692245
npmPackages:
react: 16.11.0 => 16.11.0
react-native: 0.62.0-rc.1 => 0.62.0-rc.1
Package.json
{
"name": "wesleyapp",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest"
},
"dependencies": {
"@babel/runtime": "^7.7.7",
"react": "16.11.0",
"react-native": "0.62.0-rc.1",
"react-native-audio": "^4.3.0",
"react-native-image-picker": "^1.1.0",
"react-native-sound": "^0.11.0",
"react-native-tts": "^3.0.0",
"vue-native-core": "0.0.8",
"vue-native-helper": "0.0.11",
"vuex": "^3.1.1"
},
"devDependencies": {
"@babel/core": "^7.6.2",
"@babel/runtime": "^7.6.2",
"@react-native-community/eslint-config": "^0.0.5",
"babel-jest": "^24.9.0",
"jest": "^24.9.0",
"metro-react-native-babel-preset": "^0.56.0",
"react-test-renderer": "16.11.0",
"vue-native-scripts": "0.0.16"
},
"jest": {
"preset": "react-native"
}
}
Logs
When I build release bundle and deploy it, then the app installs and crashes immediately with the following logs:
[21:38:37] D | ReactNative ▶︎ ReactInstanceManager.ctor()
[21:38:37] D | ReactNative ▶︎ ReactInstanceManager.createReactContextInBackground()
└ ReactInstanceManager.recreateReactContextInBackgroundInner()
[21:38:37] D | ReactNative ▶︎ ReactInstanceManager.recreateReactContextInBackgroundFromBundleLoader()
│ ReactInstanceManager.recreateReactContextInBackground()
└ ReactInstanceManager.runCreateReactContextOnNewThread()
[21:38:37] D | ReactNative ▶︎ ReactInstanceManager.createReactContext()
[21:38:37] D | ReactNative ▶︎ Initializing React Xplat Bridge.
[21:38:37] D | ReactNative ▶︎ Initializing React Xplat Bridge before initializeBridge
[21:38:37] D | ReactNative ▶︎ Initializing React Xplat Bridge after initializeBridge
└ CatalystInstanceImpl.runJSBundle()
[21:38:37] D | ReactNative ▶︎ ReactInstanceManager.setupReactContext()
[21:38:37] D | ReactNative ▶︎ CatalystInstanceImpl.initialize()
[21:38:37] D | ReactNative ▶︎ ReactInstanceManager.attachRootViewToInstance()
[21:38:37] D | ReactNative ▶︎ ReactInstanceManager.createReactContextInBackground()
[21:38:37] D | ReactNative ▶︎ ReactInstanceManager.attachRootViewToInstance()
[21:38:38] I | ReactNativeJS ▶︎ Running "wesleyapp" with {"rootTag":1}
[21:38:38] E | ReactNativeJS ▶︎ RangeError: Maximum call stack size exceeded.
ReactNativeJS ▶︎ RangeError: Maximum call stack size exceeded. has a stack trace of
get
index.android.bundle:394:5662
addDep
index.android.bundle:394:15002
depend
index.android.bundle:394:4355
get
index.android.bundle:394:5662
...