Skip to content

Failing to build release APK and IOS on RN v56 #20882

@abartolo

Description

@abartolo

Hello,

I am having issues building release APK and IOS after upgrading to v56. Dev builds work as expected on both android and ios emulators.

I am seeing the following error below only on release builds.

Error

08-27 20:47:42.675 23560-23586/? E/AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
    Process: miPrivateApp.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)

.babelrc

{
  "presets": ["react-native", "@babel/flow"],
  "env": {
    "production": {
      "plugins": ["transform-remove-console"]
    }
  }
}

Package.json

{
  "name": "AppleJeans",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest",
    "flow": "flow",
    "flow-full": "flow --show-all-errors > tmp-flow-results.log",
    "flow-stop": "flow stop",
    "eslint": "eslint 'src/**'",
    "eslint-fix": "eslint 'src/**' --fix"
  },
  "dependencies": {
    "babel-plugin-transform-remove-console": "^6.9.2",
    "cloudinary-core": "^2.4.0",
    "lodash": "^4.17.5",
    "moment": "^2.20.1",
    "pouchdb-adapter-react-native-sqlite": "^1.0.3",
    "pouchdb-find": "^6.4.3",
    "pouchdb-react-native": "^6.4.0",
    "prop-types": "^15.6.1",
    "react": "16.4.1",
    "react-native": "0.56.0",
    "react-native-action-button": "^2.8.4",
    "react-native-app-intro": "^1.1.5",
    "react-native-color-picker": "^0.4.0",
    "react-native-device-info": "0.21.5",
    "react-native-display": "^1.0.8",
    "react-native-easy-grid": "0.2.0",
    "react-native-elements": "^0.19.0",
    "react-native-hideable-view": "^1.0.3",
    "react-native-keep-awake": "3.1.0",
    "react-native-keyboard-aware-scroll-view": "^0.4.3",
    "react-native-material-dropdown": "^0.7.2",
    "react-native-material-textfield": "^0.12.0",
    "react-native-modal": "6.4.0",
    "react-native-modal-datetime-picker": "^4.13.0",
    "react-native-orientation": "git+https://github.com/leandrosimoes/react-native-orientation#master",
    "react-native-popup-menu": "0.13.2",
    "react-native-snackbar": "0.5.0",
    "react-native-step-indicator": "^0.0.7",
    "react-native-tab-view": "^0.0.74",
    "react-native-uuid": "^1.4.9",
    "react-native-vector-icons": "^4.5.0",
    "react-navigation": "1.5.0",
    "react-redux": "^5.0.6",
    "redux": "^3.7.2"
  },
  "devDependencies": {
    "@babel/preset-flow": "^7.0.0-rc.1",
    "babel-eslint": "^8.2.6",
    "babel-jest": "23.4.0",
    "babel-plugin-transform-regenerator": "^6.26.0",
    "babel-preset-react-native": "^5",
    "eslint": "^5.4.0",
    "eslint-config-airbnb": "^17.1.0",
    "eslint-plugin-import": "^2.14.0",
    "eslint-plugin-jsx-a11y": "^6.1.1",
    "eslint-plugin-react": "^7.11.1",
    "flow-bin": "^0.75.0",
    "jest": "23.4.0",
    "react-test-renderer": "16.4.1",
    "reactotron-react-native": "2.0.0"
  },
  "jest": {
    "preset": "react-native"
  }
}

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions