reactwg / react-native-releases

React Native Releases Working Group
356 stars 7 forks source link

Errors while Upgrading from 0.72.14 to 0.73.0 #282

Closed naheedsa closed 5 months ago

naheedsa commented 6 months ago

Old Version

0.72.14

New Version

0.73.0

Description

Getting this error, seems like related to flipper? not sure. Do I need to migrate .java files to kotlin also?

Steps to reproduce

./gradlew clean && npm run android

Affected Platforms

Runtime - Android

Output of npx react-native info

System:
  OS: Linux 6.5 KDE neon 6.0 6.0
  CPU: (8) x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
  Memory: 10.10 GB / 31.14 GB
  Shell:
    version: 5.1.16
    path: /bin/bash
Binaries:
  Node:
    version: 18.18.2
    path: ~/.nvm/versions/node/v18.18.2/bin/node
  Yarn:
    version: 1.22.21
    path: ~/.nvm/versions/node/v18.18.2/bin/yarn
  npm:
    version: 10.2.3
    path: ~/.nvm/versions/node/v18.18.2/bin/npm
  Watchman:
    version: 4.9.0
    path: /usr/bin/watchman
SDKs:
  Android SDK:
    API Levels:
      - "28"
      - "30"
      - "31"
      - "32"
      - "33"
      - "34"
    Build Tools:
      - 30.0.2
      - 30.0.3
      - 31.0.0
      - 33.0.0
      - 33.0.1
      - 34.0.0
      - 35.0.0
    System Images:
      - android-30 | Google APIs Intel x86 Atom
      - android-30 | Google Play Intel x86 Atom
      - android-31 | Google APIs Intel x86_64 Atom
      - android-32 | Google APIs Intel x86_64 Atom
      - android-33 | Google APIs Intel x86_64 Atom
      - android-34 | Google Play Intel x86_64 Atom
    Android NDK: Not Found
IDEs:
  Android Studio: Not Found
Languages:
  Java:
    version: 11.0.22
    path: /usr/bin/javac
  Ruby:
    version: 3.0.2
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 11.3.8
    wanted: 11.3.8
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.73.0
    wanted: 0.73.0
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: false

Stacktrace or Logs

> Task :app:compileDebugJavaWithJavac FAILED
ASM Instrumentation process wasn't able to resolve some classes, this means that
the instrumented classes might contain corrupt stack frames. Make sure the
dependencies that contain these classes are on the runtime or the provided
classpath. Otherwise, the jvm might fail to load the corrupt classes at runtime
when running in a jvm environment like unit tests.

Classes that weren't resolved:
> com.facebook.react.bridge.WritableMap
> androidx.appcompat.view.ContextThemeWrapper
> sun.misc.Unsafe
> com.google.crypto.tink.subtle.Ed25519Sign$KeyPair

Reproducer

could not find relevant issue

Screenshots and Videos

Screenshot_20240505_101250 Screenshot_20240505_101306

cortinico commented 5 months ago

Can you provide the full build log not as an image but as text?

naheedsa commented 5 months ago

sure: here are they @cortinico


> Task :app:compileDebugJavaWithJavac FAILED
ASM Instrumentation process wasn't able to resolve some classes, this means that
the instrumented classes might contain corrupt stack frames. Make sure the
dependencies that contain these classes are on the runtime or the provided
classpath. Otherwise, the jvm might fail to load the corrupt classes at runtime
when running in a jvm environment like unit tests.

Classes that weren't resolved:
> com.facebook.react.bridge.WritableMap

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/8.0.1/userguide/command_line_interface.html#sec:command_line_warnings
649 actionable tasks: 604 executed, 45 up-to-date

info 💡 Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor 

Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/stellarmate/Projects/test/stellarmateapp2/node_modules/@react-native-camera-roll/camera-roll/android/src/main/java/com/reactnativecommunity/cameraroll/CameraRollPackage.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/stellarmate/Projects/test/stellarmateapp2/node_modules/@react-native-async-storage/async-storage/android/src/javaPackage/java/com/reactnativecommunity/asyncstorage/AsyncStoragePackage.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/stellarmate/Projects/test/stellarmateapp2/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/stellarmate/Projects/test/stellarmateapp2/node_modules/react-native-color-matrix-image-filters/android/src/newarch/iyegoroff/RNColorMatrixImageFilters/ColorMatrixImageFilterManager.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/stellarmate/Projects/test/stellarmateapp2/node_modules/react-native-color-matrix-image-filters/android/src/newarch/iyegoroff/RNColorMatrixImageFilters/ColorMatrixImageFilterManager.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: [2] Wrote GeneratedAppGlideModule with: [com.bumptech.glide.integration.okhttp3.OkHttpLibraryGlideModule, com.dylanvann.fastimage.FastImageOkHttpProgressGlideModule]
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/stellarmate/Projects/test/stellarmateapp2/node_modules/react-native-file-logger/android/src/main/java/com/betomorrow/rnfilelogger/FileLoggerModule.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/stellarmate/Projects/test/stellarmateapp2/node_modules/react-native-flipper/android/src/debug/java/com/facebook/flipper/reactnative/FlipperModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/stellarmate/Projects/test/stellarmateapp2/node_modules/react-native-linear-gradient/android/src/main/java/com/rnlineargradient/LinearGradientManager.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/stellarmate/Projects/test/stellarmateapp2/node_modules/react-native-immersive/android/src/main/java/com/rnimmersive/RNImmersiveModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/stellarmate/Projects/test/stellarmateapp2/node_modules/react-native-localization/android/src/main/java/com/babisoft/ReactNativeLocalization/ReactNativeLocalization.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/stellarmate/Projects/test/stellarmateapp2/node_modules/react-native-permissions/android/src/main/java/com/zoontek/rnpermissions/RNPermissionsPackage.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/stellarmate/Projects/test/stellarmateapp2/node_modules/react-native-sound/android/src/main/java/com/zmxv/RNSound/RNSoundModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
/home/stellarmate/Projects/test/stellarmateapp2/node_modules/react-native-svg/android/src/main/java/com/horcrux/svg/RNSVGRenderableManager.java:11: warning: [removal] StandardCharsets in com.facebook.react.common has been deprecated and marked for removal
import static com.facebook.react.common.StandardCharsets.UTF_8;
                                       ^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 warning
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/stellarmate/Projects/test/stellarmateapp2/node_modules/react-native-zeroconf/android/src/main/java/com/balthazargronon/RCTZeroconf/rx2dnssd/DnssdImpl.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/stellarmate/Projects/test/stellarmateapp2/node_modules/@sayem314/react-native-keep-awake/android/src/main/java/com/sayem/keepawake/KCKeepAwakePackage.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
/home/stellarmate/Projects/test/stellarmateapp2/android/app/src/main/java/com/ikarustech/stellarmate/MainApplication.java:134: error: incompatible types: String cannot be converted to boolean
      DefaultNewArchitectureEntryPoint.load(false, true, "appmodules");
                                                         ^
Note: /home/stellarmate/Projects/test/stellarmateapp2/android/app/src/main/java/com/ikarustech/stellarmate/MainActivity.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* 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

BUILD FAILED in 51s
error Failed to install the app. Command failed with exit code 1: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/stellarmate/Projects/test/stellarmateapp2/node_modules/@react-native-camera-roll/camera-roll/android/src/main/java/com/reactnativecommunity/cameraroll/CameraRollPackage.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/stellarmate/Projects/test/stellarmateapp2/node_modules/@react-native-async-storage/async-storage/android/src/javaPackage/java/com/reactnativecommunity/asyncstorage/AsyncStoragePackage.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/stellarmate/Projects/test/stellarmateapp2/node_modules/react-native-code-push/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/stellarmate/Projects/test/stellarmateapp2/node_modules/react-native-color-matrix-image-filters/android/src/newarch/iyegoroff/RNColorMatrixImageFilters/ColorMatrixImageFilterManager.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/stellarmate/Projects/test/stellarmateapp2/node_modules/react-native-color-matrix-image-filters/android/src/newarch/iyegoroff/RNColorMatrixImageFilters/ColorMatrixImageFilterManager.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: [2] Wrote GeneratedAppGlideModule with: [com.bumptech.glide.integration.okhttp3.OkHttpLibraryGlideModule, com.dylanvann.fastimage.FastImageOkHttpProgressGlideModule]
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/stellarmate/Projects/test/stellarmateapp2/node_modules/react-native-file-logger/android/src/main/java/com/betomorrow/rnfilelogger/FileLoggerModule.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/stellarmate/Projects/test/stellarmateapp2/node_modules/react-native-flipper/android/src/debug/java/com/facebook/flipper/reactnative/FlipperModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/stellarmate/Projects/test/stellarmateapp2/node_modules/react-native-linear-gradient/android/src/main/java/com/rnlineargradient/LinearGradientManager.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/stellarmate/Projects/test/stellarmateapp2/node_modules/react-native-immersive/android/src/main/java/com/rnimmersive/RNImmersiveModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/stellarmate/Projects/test/stellarmateapp2/node_modules/react-native-localization/android/src/main/java/com/babisoft/ReactNativeLocalization/ReactNativeLocalization.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/stellarmate/Projects/test/stellarmateapp2/node_modules/react-native-permissions/android/src/main/java/com/zoontek/rnpermissions/RNPermissionsPackage.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/stellarmate/Projects/test/stellarmateapp2/node_modules/react-native-sound/android/src/main/java/com/zmxv/RNSound/RNSoundModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
/home/stellarmate/Projects/test/stellarmateapp2/node_modules/react-native-svg/android/src/main/java/com/horcrux/svg/RNSVGRenderableManager.java:11: warning: [removal] StandardCharsets in com.facebook.react.common has been deprecated and marked for removal
import static com.facebook.react.common.StandardCharsets.UTF_8; ^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 warning
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/stellarmate/Projects/test/stellarmateapp2/node_modules/react-native-zeroconf/android/src/main/java/com/balthazargronon/RCTZeroconf/rx2dnssd/DnssdImpl.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/stellarmate/Projects/test/stellarmateapp2/node_modules/@sayem314/react-native-keep-awake/android/src/main/java/com/sayem/keepawake/KCKeepAwakePackage.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
/home/stellarmate/Projects/test/stellarmateapp2/android/app/src/main/java/com/ikarustech/stellarmate/MainApplication.java:134: error: incompatible types: String cannot be converted to boolean DefaultNewArchitectureEntryPoint.load(false, true, "appmodules"); ^
cortinico commented 5 months ago

You have a compilation error here:

/home/stellarmate/Projects/test/stellarmateapp2/android/app/src/main/java/com/ikarustech/stellarmate/MainApplication.java:134: error: incompatible types: String cannot be converted to boolean DefaultNewArchitectureEntryPoint.load(false, true, "appmodules"); ^

Please refer to the upgrade helper to make sure you update your app correctly, or consider using Expo:

Screenshot 2024-06-04 at 11 37 48