Skip to content

[Android] Release apk crashes on app start (React Native 0.58.0) #23312

@NemanjaManot

Description

@NemanjaManot

Environment

System:
OS: Ubuntu 18.04.1 LTS
CPU: Intel® Core™ i5-4440 CPU @ 3.10GHz × 4
Memory: 15,6 GiB
Binaries:
Node: 10.10.0.
Npm: 6.4.1.
Watchman: 4.9.0
IDEs:
Android Studio: 3.0 AI-171.4443003

npmPackages:

  "dependencies": {
    "@babel/cli": "^7.0.0",
    "@babel/core": "^7.1.2",
    "@babel/polyfill": "^7.0.0",
    "@babel/runtime": "^7.0.0",
    "arc": "^0.1.1",
    "axios": "^0.16.2",
    "babel-plugin-transform-remove-console": "^6.8.5",
    "debounce-promise": "^3.1.0",
    "deepmerge": "^2.1.1",
    "kdbush": "^3.0.0",
    "lottie-react-native": "^2.3.2",
    "metro-react-native-babel-preset": "^0.45.1",
    "moment": "^2.21.0",
    "moment-timezone": "^0.5.14",
    "prop-types": "^15.6.0",
    "react": "^16.2.0",
    "react-mixin": "^4.0.0",
    "react-native": "^0.58.0",
    "react-native-animatable": "^1.3.0",
    "react-native-calendars": "^1.19.3",
    "react-native-device-info": "^0.17.3",
    "react-native-fcm": "^11.0.1",
    "react-native-geojson": "^0.1.1",
    "react-native-gesture-handler": "^1.0.12",
    "react-native-google-analytics": "^1.3.2",
    "react-native-highcharts": "https://github.com/rahmanmarija/react-native-highcharts",
    "react-native-image-picker": "^0.26.10",
    "react-native-linear-gradient": "git+https://github.com/react-native-community/react-native-linear-gradient.git",
    "react-native-maps": "https://github.com/rahmanmarija/react-native-maps",
    "react-native-modal-dropdown": "^0.4.4",
    "react-native-orientation": "https://github.com/manotnemanja/react-native-orientation",
    "react-native-progress": "^3.5.0",
    "react-native-simple-gauge": "https://github.com/manotnemanja/react-native-simple-gauge",
    "react-native-sortable-list": "https://github.com/rahmanmarija/react-native-sortable-list",
    "react-native-splash-screen": "3.0.6",
    "react-navigation": "1.0.0-beta.19",
    "react-redux": "^5.0.5",
    "react-static-container": "^1.0.1",
    "react-timer-mixin": "^0.13.3",
    "redux": "^3.7.1",
    "redux-saga": "^0.15.4",
    "reselect": "^3.0.1"
  },
  "devDependencies": {
    "@babel/core": "^7.0.0",
    "@babel/plugin-external-helpers": "^7.0.0",
    "@babel/plugin-transform-react-constant-elements": "^7.0.0",
    "@babel/runtime": "^7.3.1",
    "babel-core": "^7.0.0-bridge.0",
    "babel-eslint": "^9.0.0",
    "babel-jest": "^23.4.2",
    "babel-preset-react-native": "5.0.0",
    "eslint": "^4.1.1",
    "eslint-plugin-react": "^7.5.1",
    "eslint-plugin-react-native": "^3.2.0",
    "jest": "^23.6.0",
    "@babel/preset-flow": "^7.0.0"
  },
  "jest": {
    "preset": "react-native",
    "transform": {
      "^.+\\.js$": "<rootDir>/node_modules/react-native/jest/preprocessor.js"
    },
    "transformIgnorePatterns": [
      "node_modules/(?!react-native|react-navigation)"
    ],
    "setupFiles": [
      "<rootDir>/__mocks__/mocks.js"
    ],
    "globals": {
      "window": true
    }
  }

react-native run-android working fine.
But i am getting this issue while running release apk on app start:

Fatal Exception: java.lang.RuntimeException: com.facebook.react.devsupport.JSException: Can't find variable: babelHelpers
       at com.facebook.react.bridge.DefaultNativeModuleCallExceptionHandler.handleException(DefaultNativeModuleCallExceptionHandler.java:22)
       at com.facebook.react.devsupport.DisabledDevSupportManager.handleException(DisabledDevSupportManager.java:170)
       at com.facebook.react.bridge.CatalystInstanceImpl.onNativeException(CatalystInstanceImpl.java:547)
       at com.facebook.react.bridge.CatalystInstanceImpl.access$1000(CatalystInstanceImpl.java:44)
       at com.facebook.react.bridge.CatalystInstanceImpl$NativeExceptionHandler.handleException(CatalystInstanceImpl.java:563)
       at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
       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)

And this:

Caused by com.facebook.jni.CppException: Can't find variable: babelHelpers

index.android.bundle:17:707
index.android.bundle:17:3756
_@index.android.bundle:2:1514
d@index.android.bundle:2:967
o@index.android.bundle:2:435
index.android.bundle:16:53
_@index.android.bundle:2:1514
d@index.android.bundle:2:967
o@index.android.bundle:2:435
index.android.bundle:15:49
_@index.android.bundle:2:1514
d@index.android.bundle:2:967
o@index.android.bundle:2:435
index.android.bundle:82:49
_@index.android.bundle:2:1514
d@index.android.bundle:2:967
o@index.android.bundle:2:435
index.android.bundle:81:43
_@index.android.bundle:2:1514
d@index.android.bundle:2:967
o@index.android.bundle:2:435
index.android.bundle:65:92
_@index.android.bundle:2:1514
d@index.android.bundle:2:897
o@index.android.bundle:2:435
global code@index.android.bundle:1299:4
       at com.facebook.react.bridge.queue.NativeRunnable.run(NativeRunnable.java)
       at android.os.Handler.handleCallback(Handler.java:789)
       at android.os.Handler.dispatchMessage(Handler.java:98)
       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)

Please help me with this issue. :)
Thanks.

Activity

react-native-bot

react-native-bot commented on Feb 6, 2019

@react-native-bot
Collaborator

We are automatically closing this issue because it does not appear to follow any of the provided issue templates.

👉 Click here if you want to report a reproducible bug or regression in React Native.

joaodematejr

joaodematejr commented on Feb 21, 2019

@joaodematejr

+1

est7

est7 commented on Mar 7, 2019

@est7

i have same issue @NemanjaManot did you solve it?

joaodematejr

joaodematejr commented on Mar 7, 2019

@joaodematejr

+1

Sohail-Ansari

Sohail-Ansari commented on Jul 3, 2019

@Sohail-Ansari

+1 in RN 0.59.9 and RN 0.59.10 aswell

locked as resolved and limited conversation to collaborators on Feb 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Platform: AndroidAndroid applications.Ran CommandsOne of our bots successfully processed a command.Resolution: LockedThis issue was locked by the bot.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @est7@joaodematejr@NemanjaManot@Sohail-Ansari@react-native-bot

        Issue actions

          [Android] Release apk crashes on app start (React Native 0.58.0) · Issue #23312 · facebook/react-native