react-native icon indicating copy to clipboard operation
react-native copied to clipboard

React Native 0.73.3 crashes directly on some devices (Debug Mode)

Open wcfreebeespay opened this issue 2 years ago • 2 comments

Description

I upgraded the react native project from 0.68 to 0.73, following the upgrade guide. on some devices the application works fine, but on others it doesn't even launch. At first I thought I had a problem with the files or that I'd forgotten something during the upgrade. Finally I created a whole new application with react native 0.73.3, when I install it on the devices that work, everything's fine, but on the devices on which my application didn't work, the new application doesn't work either.

I tried to see the difference between the different devices, and came to the following conclusion: Pax A920 | (Android 5.1.1) | armV7l architecture ==> doesn't work
Pax A920 Pro | (Android 8.1) | armV7l architecture ==> doesn't work
Pax A35 | (Android 10) | armV8l architecture ==> does not work
Pax A80 | (Android 6.0.1) | aarch64 architecture ==> works fine OnePlus Nord | (Android 12) | aarch64 architecture ==> works well

Another very important information: the problem only occurs in Debug mode. When I install the APK, everything's fine, I don't have any problems and the application launches normally.

Steps to reproduce

Just create new application with react 0.73.3 npm install install it on android with armV7l or armV8l architecture (Debug Mode)

React Native Version

0.73.3

Affected Platforms

Runtime - Android

Output of npx react-native info

info Fetching system and libraries information...
System:
  OS: Windows 11 10.0.22635
  CPU: (20) x64 12th Gen Intel(R) Core(TM) i9-12900H
  Memory: 12.47 GB / 31.67 GB
Binaries:
  Node:
    version: 20.10.0
    path: C:\Program Files\nodejs\node.EXE
  Yarn: Not Found
  npm:
    version: 10.2.3
    path: C:\Program Files\nodejs\npm.CMD
  Watchman: Not Found
SDKs:
  Android SDK:
    API Levels:
      - "28"
      - "30"
      - "31"
      - "33"
      - "34"
    Build Tools:
      - 28.0.2
      - 30.0.3
      - 34.0.0
    System Images:
      - android-34 | Google APIs Intel x86_64 Atom
    Android NDK: Not Found
  Windows SDK: Not Found
IDEs:
  Android Studio: Not Found
  Visual Studio: Not Found
Languages:
  Java: 17.0.8
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.73.3
    wanted: 0.73.3
  react-native-windows: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Stacktrace or Logs

E  FATAL EXCEPTION: FlipperEventBaseThread
    Process: com.freebees.terminal, PID: 3802
    java.lang.NoClassDefFoundError: <clinit> failed for class com.facebook.flipper.android.EventBase; see exception in other thread
    	at com.facebook.flipper.android.FlipperThread.run(FlipperThread.java:25)
 E  FATAL EXCEPTION: FlipperConnectionThread
    Process: com.freebees.terminal, PID: 3802
    java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "BN_set_flags" referenced by "/data/app/com.freebees.terminal-1zNbUPopzTozndNONcQDng==/lib/arm/libflipper.so"...
    	at java.lang.Runtime.loadLibrary0(Runtime.java:1016)
    	at java.lang.System.loadLibrary(System.java:1657)
    	at com.facebook.soloader.nativeloader.SystemDelegate.loadLibrary(SystemDelegate.java:24)
    	at com.facebook.soloader.nativeloader.NativeLoader.loadLibrary(NativeLoader.java:52)
    	at com.facebook.soloader.nativeloader.NativeLoader.loadLibrary(NativeLoader.java:30)
    	at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:869)
    	at com.facebook.flipper.android.EventBase.<clinit>(EventBase.java:19)
    	at com.facebook.flipper.android.FlipperThread.run(FlipperThread.java:25)
 I  Late-enabling -Xcheck:jni
 E  setrlimit(RLIMIT_CORE) failed for pid 3834: Operation not permitted
 W  Using default instruction set features for ARM CPU variant (generic) using conservative defaults
 V  Init System Loader delegate
 D  No Network Security Config specified, using platform default
 D  printLog => NativeCrypto_SSL_CTX_new
 D  printLog => NativeCrypto_SSL_CTX_new
 E  FATAL EXCEPTION: FlipperConnectionThread
    Process: com.freebees.terminal, PID: 3834
    java.lang.NoClassDefFoundError: <clinit> failed for class com.facebook.flipper.android.EventBase; see exception in other thread
    	at com.facebook.flipper.android.FlipperThread.run(FlipperThread.java:25)
 D  Create HprofDebugEx
 E  FATAL EXCEPTION: FlipperEventBaseThread
    Process: com.freebees.terminal, PID: 3834
    java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "BN_set_flags" referenced by "/data/app/com.freebees.terminal-1zNbUPopzTozndNONcQDng==/lib/arm/libflipper.so"...
    	at java.lang.Runtime.loadLibrary0(Runtime.java:1016)
    	at java.lang.System.loadLibrary(System.java:1657)
    	at com.facebook.soloader.nativeloader.SystemDelegate.loadLibrary(SystemDelegate.java:24)
    	at com.facebook.soloader.nativeloader.NativeLoader.loadLibrary(NativeLoader.java:52)
    	at com.facebook.soloader.nativeloader.NativeLoader.loadLibrary(NativeLoader.java:30)
    	at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:869)
    	at com.facebook.flipper.android.EventBase.<clinit>(EventBase.java:19)
    	at com.facebook.flipper.android.FlipperThread.run(FlipperThread.java:25)
 I  Sending signal. PID: 3834 SIG: 9

Reproducer

no

Screenshots and Videos

image

wcfreebeespay avatar Feb 09 '24 00:02 wcfreebeespay

:warning: Newer Version of React Native is Available!
:information_source: You are on a supported minor version, but it looks like there's a newer patch available - 0.73.4. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

github-actions[bot] avatar Feb 09 '24 00:02 github-actions[bot]

:warning: Missing Reproducible Example
:information_source: We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.

github-actions[bot] avatar Feb 09 '24 00:02 github-actions[bot]

We can't help without a repro. I'd suggest you remove the flipper integration code from your MainApplication class and try again.

cortinico avatar Feb 09 '24 10:02 cortinico

We can't help without a repro. I'd suggest you remove the flipper integration code from your MainApplication class and try again.

Thank you for your response ! that's working fine ! 😃 💯 but just to be sure : removing this line doesnt have any effect on the app ? ### //ReactNativeFlipper.initializeFlipper(this, getReactNativeHost().getReactInstanceManager());

wcfreebeespay avatar Feb 09 '24 17:02 wcfreebeespay

but just to be sure : removing this line doesnt have any effect on the app ?

It disables Flipper so you won't be able to use it to debug the app. We're moving away from Flipper though so this should not be a major problem for you, unless you're heavily using Flipper. See: https://reactnative.dev/blog/2023/12/06/0.73-debugging-improvements-stable-symlinks#experimental-new-debugger

cortinico avatar Feb 09 '24 18:02 cortinico

but just to be sure : removing this line doesnt have any effect on the app ?

It disables Flipper so you won't be able to use it to debug the app. We're moving away from Flipper though so this should not be a major problem for you, unless you're heavily using Flipper. See: https://reactnative.dev/blog/2023/12/06/0.73-debugging-improvements-stable-symlinks#experimental-new-debugger

No No ! Thank you all your informations ! and you're right ! i just started using new "experimental-debugger" Have a nice day !

wcfreebeespay avatar Feb 09 '24 18:02 wcfreebeespay