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

Update react-native to 0.60.5 and use Hermes js engine #8672

Closed
22 of 24 tasks
yenda opened this issue Jul 30, 2019 · 7 comments · Fixed by #8943
Closed
22 of 24 tasks

Update react-native to 0.60.5 and use Hermes js engine #8672

yenda opened this issue Jul 30, 2019 · 7 comments · Fixed by #8943

Comments

@yenda
Copy link
Contributor

yenda commented Jul 30, 2019

Problem

react-native recently had a major update to 0.60. It brings a lot of improvements, including auto-linking of libraries and an improved JS engine for Android called Hermes

Hermes is the main reason we want to do this upgrade now, because the Play Store now requires to publish 64bits apks starting 1st of August. As of today are experiencing random freezes on 64bits architectures with these apks and we have tried many options already #8665

This effort will take some time because nix makes the update process less trivial than it uses to be, and we also have a few libraries that are deprecated in favor of community maintain libraries that we need to switch.

Implementation

  • adapt the nix building process
  • enable the Hermes JS engine
  • move from deprecated core libs to community libs

TODO (non-exhaustive)

  • Initial source-code migration work on status-react

    • Disable auto-linking during the initial migration
  • Migration with AndroidX, Jetifier and Hermes disabled

    • Migrate 3rd-party RN modules (includes move from deprecated core libs to community libs)
  • Migration with AndroidX and Jetifier enabled

    • Migrate to AndroidX APIs
    • Fix usage of deprecated ListView reported by RN at startup
  • (OPTIONAL) Enable auto-linking for all RN modules supporting it

  • Migrate Nix release-android build

    • Fix Gradle config overrides not applying correctly to subprojects (not an issue outside of Nix pure builds)
    • Account for :react-native-android:installArchives not existing anymore
    • Get rid of Realm, as it is hardcoded to use JSC
  • migrate to community version of net-info

  • Migration with Hermes enabled

  • get rid of usage of component-will-mount because it is deprecated (Move from componentWillMount to componentDidMount #8858)

  • Fix issue running Hermes command in node_modules/react-native/react.gradle

  • fix migration of react-native-camera (error accessing .RNCamera)

  • migrate to community version of webviews (might be big)

  • Fix CI tests

  • Fix Android build on macOS (Release Android build is broken in 'feature/upgrade-to-rn-hermes' branch #8952)

  • Ensure everything works with iOS

  • Ensure everything works with Desktop

    • net-info replacement for desktop?

Acceptance Criteria

  • project is now using react-native 0.60.5 (including iOS and Desktop)
@pedropombeiro
Copy link
Contributor

pedropombeiro commented Aug 6, 2019

Useful resources:

Some issues observed while migrating:


* What went wrong:
Could not determine the dependencies of task ':react-native-camera:compileDebugAidl'.
> Could not resolve all task dependencies for configuration ':react-native-camera:debugCompileClasspath'.
   > Could not resolve androidx.core:core:{strictly 1.0.0}.
     Required by:
         project :react-native-camera
      > Cannot find a version of 'androidx.core:core' that satisfies the version constraints: 
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.core:core:1.0.0'
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'com.facebook.react:react-native:0.60.4' --> 'androidx.appcompat:appcompat:1.0.2' --> 'androidx.core:core:1.0.1'
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.media:media:1.0.0' --> 'androidx.core:core:1.0.0'
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.legacy:legacy-support-core-utils:1.0.0' --> 'androidx.core:core:1.0.0'
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.legacy:legacy-support-core-ui:1.0.0' --> 'androidx.core:core:1.0.0'
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.fragment:fragment:1.0.0' --> 'androidx.core:core:1.0.0'
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'com.facebook.react:react-native:0.60.4' --> 'androidx.appcompat:appcompat:1.0.2' --> 'androidx.vectordrawable:vectordrawable:1.0.1' --> 'androidx.core:core:1.0.0'
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.legacy:legacy-support-core-utils:1.0.0' --> 'androidx.loader:loader:1.0.0' --> 'androidx.core:core:1.0.0'
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.legacy:legacy-support-core-ui:1.0.0' --> 'androidx.customview:customview:1.0.0' --> 'androidx.core:core:1.0.0'
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.legacy:legacy-support-core-ui:1.0.0' --> 'androidx.viewpager:viewpager:1.0.0' --> 'androidx.core:core:1.0.0'
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.legacy:legacy-support-core-ui:1.0.0' --> 'androidx.coordinatorlayout:coordinatorlayout:1.0.0' --> 'androidx.core:core:1.0.0'
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.legacy:legacy-support-core-ui:1.0.0' --> 'androidx.drawerlayout:drawerlayout:1.0.0' --> 'androidx.core:core:1.0.0'
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.legacy:legacy-support-core-ui:1.0.0' --> 'androidx.slidingpanelayout:slidingpanelayout:1.0.0' --> 'androidx.core:core:1.0.0'
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.legacy:legacy-support-core-ui:1.0.0' --> 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0' --> 'androidx.core:core:1.0.0'
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.legacy:legacy-support-core-ui:1.0.0' --> 'androidx.asynclayoutinflater:asynclayoutinflater:1.0.0' --> 'androidx.core:core:1.0.0'
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0

   > Could not resolve androidx.core:core:1.0.0.
     Required by:
         project :react-native-camera > androidx.legacy:legacy-support-v4:1.0.0
         project :react-native-camera > androidx.media:media:1.0.0
         project :react-native-camera > androidx.legacy:legacy-support-core-utils:1.0.0
         project :react-native-camera > androidx.legacy:legacy-support-core-ui:1.0.0
         project :react-native-camera > androidx.fragment:fragment:1.0.0
         project :react-native-camera > com.facebook.react:react-native:0.60.4 > androidx.appcompat:appcompat:1.0.2 > androidx.vectordrawable:vectordrawable:1.0.1
         project :react-native-camera > androidx.loader:loader:1.0.0
         project :react-native-camera > androidx.customview:customview:1.0.0
         project :react-native-camera > androidx.viewpager:viewpager:1.0.0
         project :react-native-camera > androidx.coordinatorlayout:coordinatorlayout:1.0.0
         project :react-native-camera > androidx.drawerlayout:drawerlayout:1.0.0
         project :react-native-camera > androidx.slidingpanelayout:slidingpanelayout:1.0.0
         project :react-native-camera > androidx.swiperefreshlayout:swiperefreshlayout:1.0.0
         project :react-native-camera > androidx.asynclayoutinflater:asynclayoutinflater:1.0.0
      > Cannot find a version of 'androidx.core:core' that satisfies the version constraints: 
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.core:core:1.0.0'
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'com.facebook.react:react-native:0.60.4' --> 'androidx.appcompat:appcompat:1.0.2' --> 'androidx.core:core:1.0.1'
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.media:media:1.0.0' --> 'androidx.core:core:1.0.0'
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.legacy:legacy-support-core-utils:1.0.0' --> 'androidx.core:core:1.0.0'
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.legacy:legacy-support-core-ui:1.0.0' --> 'androidx.core:core:1.0.0'
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.fragment:fragment:1.0.0' --> 'androidx.core:core:1.0.0'
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'com.facebook.react:react-native:0.60.4' --> 'androidx.appcompat:appcompat:1.0.2' --> 'androidx.vectordrawable:vectordrawable:1.0.1' --> 'androidx.core:core:1.0.0'
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.legacy:legacy-support-core-utils:1.0.0' --> 'androidx.loader:loader:1.0.0' --> 'androidx.core:core:1.0.0'
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.legacy:legacy-support-core-ui:1.0.0' --> 'androidx.customview:customview:1.0.0' --> 'androidx.core:core:1.0.0'
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.legacy:legacy-support-core-ui:1.0.0' --> 'androidx.viewpager:viewpager:1.0.0' --> 'androidx.core:core:1.0.0'
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.legacy:legacy-support-core-ui:1.0.0' --> 'androidx.coordinatorlayout:coordinatorlayout:1.0.0' --> 'androidx.core:core:1.0.0'
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.legacy:legacy-support-core-ui:1.0.0' --> 'androidx.drawerlayout:drawerlayout:1.0.0' --> 'androidx.core:core:1.0.0'
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.legacy:legacy-support-core-ui:1.0.0' --> 'androidx.slidingpanelayout:slidingpanelayout:1.0.0' --> 'androidx.core:core:1.0.0'
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.legacy:legacy-support-core-ui:1.0.0' --> 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0' --> 'androidx.core:core:1.0.0'
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.legacy:legacy-support-core-ui:1.0.0' --> 'androidx.asynclayoutinflater:asynclayoutinflater:1.0.0' --> 'androidx.core:core:1.0.0'
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0

   > Could not resolve androidx.core:core:1.0.1.
     Required by:
         project :react-native-camera > com.facebook.react:react-native:0.60.4 > androidx.appcompat:appcompat:1.0.2
      > Cannot find a version of 'androidx.core:core' that satisfies the version constraints: 
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.core:core:1.0.0'
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'com.facebook.react:react-native:0.60.4' --> 'androidx.appcompat:appcompat:1.0.2' --> 'androidx.core:core:1.0.1'
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.media:media:1.0.0' --> 'androidx.core:core:1.0.0'
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.legacy:legacy-support-core-utils:1.0.0' --> 'androidx.core:core:1.0.0'
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.legacy:legacy-support-core-ui:1.0.0' --> 'androidx.core:core:1.0.0'
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.fragment:fragment:1.0.0' --> 'androidx.core:core:1.0.0'
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'com.facebook.react:react-native:0.60.4' --> 'androidx.appcompat:appcompat:1.0.2' --> 'androidx.vectordrawable:vectordrawable:1.0.1' --> 'androidx.core:core:1.0.0'
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.legacy:legacy-support-core-utils:1.0.0' --> 'androidx.loader:loader:1.0.0' --> 'androidx.core:core:1.0.0'
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.legacy:legacy-support-core-ui:1.0.0' --> 'androidx.customview:customview:1.0.0' --> 'androidx.core:core:1.0.0'
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.legacy:legacy-support-core-ui:1.0.0' --> 'androidx.viewpager:viewpager:1.0.0' --> 'androidx.core:core:1.0.0'
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.legacy:legacy-support-core-ui:1.0.0' --> 'androidx.coordinatorlayout:coordinatorlayout:1.0.0' --> 'androidx.core:core:1.0.0'
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.legacy:legacy-support-core-ui:1.0.0' --> 'androidx.drawerlayout:drawerlayout:1.0.0' --> 'androidx.core:core:1.0.0'
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.legacy:legacy-support-core-ui:1.0.0' --> 'androidx.slidingpanelayout:slidingpanelayout:1.0.0' --> 'androidx.core:core:1.0.0'
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.legacy:legacy-support-core-ui:1.0.0' --> 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0' --> 'androidx.core:core:1.0.0'
           Dependency path 'StatusIm:react-native-camera:unspecified' --> 'androidx.legacy:legacy-support-v4:1.0.0' --> 'androidx.legacy:legacy-support-core-ui:1.0.0' --> 'androidx.asynclayoutinflater:asynclayoutinflater:1.0.0' --> 'androidx.core:core:1.0.0'
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0
           Constraint path 'StatusIm:react-native-camera:unspecified' --> 'androidx.core:core:{strictly 1.0.0}' because of the following reason: debugRuntimeClasspath uses version 1.0.0

Error regarding autolinking:

warn Package react-native-firebase has been ignored because it contains invalid configuration. Reason: Unknown option dependency.platforms.android.buildPatch with value "" implementation project(':react-native-firebase')"" was found. This is either a typing error or a user mistake. Fixing it will remove this message.
warn The following packages use deprecated "rnpm" config that will stop working from next release:
  - realm: https://realm.io
Please notify their maintainers about it. You can find more details at https://github.com/react-native-community/cli/blob/master/docs/configuration.md#migration-guide.
error React Native CLI uses autolinking for native dependencies, but the following modules are linked manually: 
  - react-native-background-timer (to unlink run: "react-native unlink react-native-background-timer")
  - react-native-camera (to unlink run: "react-native unlink react-native-camera")
  - react-native-config (to unlink run: "react-native unlink react-native-config")
  - react-native-dialogs (to unlink run: "react-native unlink react-native-dialogs")
  - react-native-fs (to unlink run: "react-native unlink react-native-fs")
  - react-native-gesture-handler (to unlink run: "react-native unlink react-native-gesture-handler")
  - react-native-http-bridge (to unlink run: "react-native unlink react-native-http-bridge")
  - react-native-image-crop-picker (to unlink run: "react-native unlink react-native-image-crop-picker")
  - react-native-image-resizer (to unlink run: "react-native unlink react-native-image-resizer")
  - react-native-keychain (to unlink run: "react-native unlink react-native-keychain")
  - react-native-languages (to unlink run: "react-native unlink react-native-languages")
  - react-native-screens (to unlink run: "react-native unlink react-native-screens")
  - react-native-securerandom (to unlink run: "react-native unlink react-native-securerandom")
  - react-native-shake (to unlink run: "react-native unlink react-native-shake")
  - react-native-splash-screen (to unlink run: "react-native unlink react-native-splash-screen")
  - react-native-status-keycard (to unlink run: "react-native unlink react-native-status-keycard")
  - react-native-svg (to unlink run: "react-native unlink react-native-svg")
  - react-native-touch-id (to unlink run: "react-native unlink react-native-touch-id")
  - react-native-webview (to unlink run: "react-native unlink react-native-webview")
  - react-native-webview-bridge (to unlink run: "react-native unlink react-native-webview-bridge")
  - realm (to unlink run: "react-native unlink realm")
This is likely happening when upgrading React Native from below 0.60 to 0.60 or above. Going forward, you can unlink this dependency via "react-native unlink <dependency>" and it will be included in your app automatically. If a library isn't compatible with autolinking, disregard this message and notify the library maintainers.
Read more about autolinking: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md

@pedropombeiro pedropombeiro self-assigned this Aug 7, 2019
@pedropombeiro
Copy link
Contributor

Added a non-exhaustive TODO list in the OP for transparency.

@pedropombeiro
Copy link
Contributor

This Realm issue is currently a blocker: realm/realm-js#2455

@pedropombeiro
Copy link
Contributor

pedropombeiro commented Aug 20, 2019

Current state of this PR (work in debug/release can easily be paralelized):

  • Debug app (prioritary to fix):
    • Debug app has an error due to Realm (missing ListView component). Once Realm is removed, there are some deprecation warnings that need to be addressed, regarding moving from componentWillMount to componentDidMount. Reagent also needs updating, but the fix is still unreleased.
    • The commit which removes Realm needs some more work after being rebased, as there are new method calls which need to be removed.
  • Release app:
    • Build phase:

      • A new dependency (@react-native-community/netinfo) includes a Gradle plugin which is not currently detected by our Nix script. Not prioritary until we release, since we can add dependency manually for now.
      • A crash happens when running hermes during the build phase. I can run it from the command line with the same arguments without a problem:
      Stack dump:
      0.      Program arguments: ../../node_modules/hermesvm/linux64-bin/hermes -emit-binary -out /build/project/android/app/build/generated/assets/react/pr/index.android.bundle /build/project/android/app/build/generated/assets/react/pr/index.android.bundle 
      1.      Program arguments: ../../node_modules/hermesvm/linux64-bin/hermes -emit-binary -out /build/project/android/app/build/generated/assets/react/pr/index.android.bundle /build/project/android/app/build/generated/assets/react/pr/index.android.bundle 
      [0x41ba83]
      [0x41abc9]
      [0x41ac6c]
      [0x4265e0]
      [0x499f43]
      [0x49a163]
      [0x43d7ff]
      [0x43d967]
      [0x44003a]
      [0x4399b2]
      [0x439b32]
      [0x42b8b9]
      [0x4308d6]
      [0x40487b]
      [0x712f34]
      [0x7131b1]
      [0x408116]
      [0x41ba83]
      [0x41abc9]
      [0x41ac6c]
      [0x4265e0]
      [0x499f43]
      [0x49a163]
      [0x43d7ff]
      [0x43d967]
      [0x44003a]
      [0x4399b2]
      [0x439b32]
      [0x42b8b9]
      [0x4308d6]
      [0x40487b]
      [0x712f34]
      [0x7131b1]
      [0x408116]
      
      > Task :app:bundlePrJsAndAssets FAILED
      
      FAILURE: Build failed with an exception.
      
      * Where:
      Script '/build/project/node_modules/react-native/react.gradle' line: 142
      
      * What went wrong:
      Execution failed for task ':app:bundlePrJsAndAssets'.
      > Process 'command '../../node_modules/hermesvm/linux64-bin/hermes'' finished with non-zero exit value 135
      
      * Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
      
      * Get more help at https://help.gradle.org
      
      Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
      Use '--warning-mode all' to show the individual deprecation warnings.
      See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings
      
      BUILD FAILED in 1m 59s
      
    • Deployment phase:

      • is missing the code that registers our RN components in the bundle for some reason:
      08-20 09:35:59.671 25122 25180 E ReactNativeJS: Application StatusIm has not been registered.
      08-20 09:35:59.671 25122 25180 E ReactNativeJS: 
      08-20 09:35:59.671 25122 25180 E ReactNativeJS: Hint: This error often happens when you're running the packager (local dev server) from a wrong folder. For example you have multiple apps and the packager is still running for the app you were working on before.
      08-20 09:35:59.671 25122 25180 E ReactNativeJS: If this is the case, simply kill the old packager instance (e.g. close the packager terminal window) and start the packager in the correct app folder (e.g. cd into app folder and run 'npm start').
      08-20 09:35:59.671 25122 25180 E ReactNativeJS: 
      08-20 09:35:59.671 25122 25180 E ReactNativeJS: This error can also happen due to a require() error during initialization or failure to call AppRegistry.registerComponent.
      08-20 09:35:59.671 25122 25180 E ReactNativeJS: 
      

@yenda
Copy link
Contributor Author

yenda commented Aug 20, 2019

Screenshot_1566334992

@pombeirp @flexsurfer looks like everything kinda works in my branch https://github.com/status-im/status-react/tree/hermes
I disabled webviews for now though

@yenda
Copy link
Contributor Author

yenda commented Aug 20, 2019

Apparently web-view is used with svgimages so it's just a matter of replacing it with the community version like I did for net_infos

@pedropombeiro
Copy link
Contributor

@yenda have you tried running the release version? Looks like some Realm stuff is still there: https://ci.status.im/job/status-react/job/combined/job/mobile-android/11647/console. I'll also need to regenerate the Maven offline repos for Nix.

@pedropombeiro pedropombeiro changed the title Update react-native to 0.60.4 and use Hermes js engine Update react-native to 0.60.5 and use Hermes js engine Aug 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants