Android and iOS app crash at startup in production build
See original GitHub issueEnvironment
React Native Environment Info: System: OS: Linux 4.15 Ubuntu 18.04.1 LTS (Bionic Beaver) CPU: x64 Intel® Core™ i3-4150 CPU @ 3.50GHz Memory: 399.68 MB / 15.54 GB Shell: 4.4.19 - /bin/bash Binaries: Node: 8.10.0 - /usr/bin/node Yarn: 1.8.0 - /home/linuxbrew/.linuxbrew/bin/yarn npm: 5.10.0 - /home/linuxbrew/.linuxbrew/bin/npm Watchman: 4.9.0 - /home/linuxbrew/.linuxbrew/bin/watchman SDKs: Android SDK: Build Tools: 19.0.1, 19.1.0, 20.0.0, 21.1.2, 22.0.1, 23.0.1, 23.0.2, 23.0.3, 24.0.0, 24.0.1, 24.0.2, 24.0.3, 25.0.0, 25.0.1, 25.0.2, 25.0.3, 26.0.0, 26.0.0, 26.0.1, 26.0.2, 26.0.3, 27.0.0, 27.0.1, 27.0.2, 27.0.3, 28.0.0, 28.0.0, 28.0.1, 28.0.2 API Levels: 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28 npmPackages: react: 16.4.1 => 16.4.1 react-native: 0.57.0 => 0.57.0 npmGlobalPackages: create-react-native-app: 1.0.0 react-native-cli: 2.0.1 react-native-scripts: 1.14.1
Description
Android and Ios app crash at startup in production build
here is a crash log
--------- beginning of crash
2018-10-13 09:45:01.052 4989-5013/? E/AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
Process: com.elamusic.android, PID: 4989
com.facebook.react.common.JavascriptException: undefined is not an object (evaluating 'r.default'), stack:
b@396:1621
<unknown>@404:2778
c@2:822
i@2:464
t@2:324
<unknown>@403:108
c@2:822
i@2:464
t@2:324
<unknown>@338:187
c@2:822
i@2:464
t@2:324
<unknown>@306:174
c@2:822
i@2:464
t@2:324
<unknown>@12:77
c@2:822
i@2:394
t@2:324
global code@798:8
at com.facebook.react.modules.core.ExceptionsManagerModule.showOrThrowError(ExceptionsManagerModule.java:54)
at com.facebook.react.modules.core.ExceptionsManagerModule.reportFatalException(ExceptionsManagerModule.java:38)
at java.lang.reflect.Method.invoke(Native Method)
at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:160)
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
at android.os.Looper.loop(Looper.java:164)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192)
at java.lang.Thread.run(Thread.java:764)
2018-10-13 09:45:01.121 1406-1406/? E/EGL_emulation: tid 1406: eglCreateSyncKHR(1962): error 0x3004 (EGL_BAD_ATTRIBUTE)
2018-10-13 09:45:01.134 4989-5012/? E/ReactNativeJS: Module AppRegistry is not a registered callable module (calling unmountApplicationComponentAtRootTag)
2018-10-13 09:45:01.168 4989-4989/? E/WindowManager: android.view.WindowLeaked: Activity com.elamusic.android.MainActivity has leaked window DecorView@e75656b[] that was originally added here
at android.view.ViewRootImpl.<init>(ViewRootImpl.java:485)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:346)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:93)
at android.app.Dialog.show(Dialog.java:330)
at org.devio.rn.splashscreen.SplashScreen$1.run(SplashScreen.java:36)
at android.app.Activity.runOnUiThread(Activity.java:6184)
at org.devio.rn.splashscreen.SplashScreen.show(SplashScreen.java:27)
at org.devio.rn.splashscreen.SplashScreen.show(SplashScreen.java:49)
at org.devio.rn.splashscreen.SplashScreen.show(SplashScreen.java:56)
at com.elamusic.android.MainActivity.onCreate(MainActivity.java:19)
at android.app.Activity.performCreate(Activity.java:7009)
at android.app.Activity.performCreate(Activity.java:7000)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Following are the dependencies in package.json file
"dependencies": {
"axios": "^0.18.0",
"lodash.debounce": "^4.0.8",
"moment": "^2.22.2",
"prop-types": "^15.6.2",
"react": "16.4.1",
"react-native": "0.57.0",
"react-native-bottomsheet": "^1.9.0",
"react-native-collapsible": "^0.13.0",
"react-native-color-palette": "^2.0.1",
"react-native-device-info": "^0.22.5",
"react-native-htmlview": "^0.13.0",
"react-native-image-crop-picker": "^0.21.1",
"react-native-keyboard-aware-scroll-view": "^0.7.2",
"react-native-linear-gradient": "^2.4.2",
"react-native-loading-spinner-overlay": "^0.5.2",
"react-native-localization": "^2.0.1",
"react-native-modal-popover": "0.0.10",
"react-native-modalbox": "^1.6.0",
"react-native-music-control": "^0.7.3",
"react-native-palette-full": "^1.0.6",
"react-native-parallax-scroll-view": "^0.21.3",
"react-native-permissions": "^1.1.1",
"react-native-slider": "^0.11.0",
"react-native-snackbar": "^0.5.1",
"react-native-splash-screen": "^3.1.1",
"react-native-vector-icons": "^5.0.0",
"react-native-video": "^3.2.1",
"react-navigation": "^1.0.0-beta.27",
"react-redux": "^5.0.7",
"redux": "^4.0.0",
"redux-persist": "^5.10.0",
"validate.js": "^0.12.0"
}
Steps to reproduce
For iOS:
- Open Xcode and open the project.
- Setup release configurations.
- Connect a device, and click on run to deploy into device.
For Android:
- Setup release configurations.
- Open the Terminal and run:
react-native run-android --variant=release
. - After the build is successful, the app is deployed to the connected device
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:7
‘com.android.tools.build:gradle:3.2.1’ app crashed at startup
working normal after downgrade 3.2.1 to ‘com.android.tools.build:gradle:3.1.4’
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.