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

React Native App Crashes on release in Google Play Store with exception: com.facebook.react.common.JavascriptException: Object is not a function (evaluating '(0,babelHelpers.interopRequireDefault(u).default)()') #20861

Closed
tobiloba23 opened this issue Aug 26, 2018 · 13 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@tobiloba23
Copy link

tobiloba23 commented Aug 26, 2018

Environment

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

Packages: (wanted => installed)
react: 16.4.1 => 16.4.1
react-native: 0.55.4 => 0.55.4

Description

App crashes on launch from the Google play store with the above mentioned exception. See stack trace from play store below:

FATAL EXCEPTION: mqt_native_modules
Process: XXXX, PID: 15893
com.facebook.react.common.JavascriptException: Object is not a function (evaluating '(0,babelHelpers.interopRequireDefault(u).default)()'), stack:
@12:88
d@2:768
n@2:339
t@2:262
global code@622: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:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
at android.os.Looper.loop(Looper.java:158)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192)
at java.lang.Thread.run(Thread.java:818)

Reproducible Demo

Issue happens on Google play store so I have no idea how to reproduce. It works perfectly on my local computer.

@tobiloba23
Copy link
Author

The release APK works perfectly on emulator and devices, although some behavior differs between when remote debugging is activated compared to otherwise.

Package.json:

"dependencies": {
"ajv": "^6.5.2",
"babel-polyfill": "^6.26.0",
"eslint": "^5.3.0",
"eslint-plugin-react": "^7.11.1",
"financejs": "^4.1.0",
"prop-types": "^15.6.2",
"react": "16.4.1",
"react-native": "0.55.4",
"react-native-elements": "^0.19.1",
"react-native-modal": "^6.5.0",
"react-native-modal-datetime-picker": "^6.0.0",
"react-native-navigation": "^1.1.479",
"react-native-simple-table": "0.0.3",
"react-native-vector-icons": "^5.0.0",
"react-redux": "^5.0.7",
"redux": "^4.0.0",
"redux-thunk": "^2.3.0"
},
"devDependencies": {
"babel-jest": "23.4.2",
"babel-preset-react-native": "^4.0.0",
"jest": "23.4.2",
"react-test-renderer": "16.4.1"
},
"jest": {
"preset": "react-native"
}

@react-native-bot
Copy link
Collaborator

Can you run react-native info and edit your issue to include these results under the Environment section?

If you believe this information is irrelevant to the reported issue, you may write [skip envinfo] under Environment to let us know.

@abartolo
Copy link

@tobiloba23 I am having a similar issue. Whenever I run locally in android and ios it works fine. However, when I do a release build it crashes in device.

Error

08-27 20:47:42.675 23560-23586/? E/AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
    Process: myApp.main, PID: 23560
    com.facebook.react.common.JavascriptException: Invalid attempt to spread non-iterable instance, stack:
    nonIterableSpread@11:3941
    toConsumableArray@11:4436
    <unknown>@868:215
    c@2:822
    i@2:464
    t@2:324
    <unknown>@865:520
    c@2:822
    i@2:464
    t@2:324
    <unknown>@864:338
    c@2:822
    i@2:464
    t@2:324
    <unknown>@857:235
    c@2:822
    i@2:464
    t@2:324
    <unknown>@458:296
    c@2:822
    i@2:464
    t@2:324
    <unknown>@384:197
    c@2:822
    i@2:464
    t@2:324
    <unknown>@309:246
    c@2:822
    i@2:464
    t@2:324
    <unknown>@12:77
    c@2:822
    i@2:394
    t@2:324
    global code@1026: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: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)

React Native Info

  React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
      Memory: 867.99 MB / 16.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 8.11.3 - ~/.nvm/versions/node/v8.11.3/bin/node
      Yarn: 1.7.0 - /usr/local/bin/yarn
      npm: 5.6.0 - ~/.nvm/versions/node/v8.11.3/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3
      Android SDK:
        Build Tools: 23.0.1, 25.0.2, 26.0.1, 26.0.3, 27.0.3
        API Levels: 23, 25, 26, 27
    IDEs:
      Android Studio: 3.1 AI-173.4720617
      Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.4.1 => 16.4.1
      react-native: 0.56.0 => 0.56.0
    npmGlobalPackages:
      react-native-cli: 2.0.1

@tobiloba23
Copy link
Author

@abartolo is there a way we can escalate this issue. I am running behind on delivering my project.

@abartolo
Copy link

@tobiloba23 I am also not sure. I created #20882 in hope of some more attention.

@brenohq
Copy link

brenohq commented Aug 30, 2018

same issue here

@react-native-bot
Copy link
Collaborator

It looks like you are using an older version of React Native. Please update to the latest release, v0.56 and verify if the issue still exists.

The ":rewind:Old Version" label will be removed automatically once you edit your original post with the results of running react-native info on a project using the latest release.

@abartolo
Copy link

abartolo commented Sep 3, 2018

@tobiloba23 Can you "react-native info" in order to let the bot remove the "Old Version" tag. I am getting error I posted above with the following:

react-native info

  React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
      Memory: 266.08 MB / 16.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 8.11.3 - ~/.nvm/versions/node/v8.11.3/bin/node
      Yarn: 1.7.0 - /usr/local/bin/yarn
      npm: 5.6.0 - ~/.nvm/versions/node/v8.11.3/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3
      Android SDK:
        Build Tools: 23.0.1, 25.0.2, 26.0.1, 26.0.3, 27.0.3
        API Levels: 23, 25, 26, 27
    IDEs:
      Android Studio: 3.1 AI-173.4720617
      Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.4.1 => 16.4.1
      react-native: 0.56.0 => 0.56.0
    npmGlobalPackages:
      react-native-cli: 2.0.1

@tobiloba23
Copy link
Author

I have run info but I am using RN 0.55.4, an old version. 0.56 doesn't work on Windows. I upgraded to 0.57-rc3 and I get a similar error to this on the debug apk

@hramos
Copy link
Contributor

hramos commented Sep 19, 2018

Closing as this is a report for an older version....

@hramos hramos closed this as completed Sep 19, 2018
@amismailz
Copy link

I am facing same issue RN 0.65

@leoxiaoping
Copy link

I am facing same issue RN 0.57,only release version

@rashdan
Copy link

rashdan commented Jul 3, 2019

+1

I am facing same issue, I am using react-native version 0.57.7

@facebook facebook locked as resolved and limited conversation to collaborators Sep 19, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Sep 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

8 participants