question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[RN 0.68.2] [New Arch] [Android] App immediately crashes if New Arch enabled

See original GitHub issue

Description

  • RN migrated from 0.66.0 to 0.68.2 using manual upgrade tool instructions;
  • Android; Hermes enabled.
  • If New Arch is disabled: App been built and runs ok in all build flavors.
  • If New Arch is enabled: app crashes immediately after start (short time splash screen visible) in both Debug and PreRelease builds.
  • LOCAL_MODULE := neutron_appmodules
  • Both exceptions are SoLoader: couldn't find DSO to load... (libneutron_appmodules.so for Debug and libfabricjni.so for Release); And I could see both .so files on place in correspondent .apk files (if unzip).

Error log for Release build:

2022-09-01 11:25:59.480 16179-16179/? E/IterableApi:  ❤️ Iterable SDK must be initialized with an API key and user email/userId before calling SDK methods
2022-09-01 11:25:59.538 16179-16179/? E/com.evernote.lifecycle: about to send foreground
2022-09-01 11:25:59.595 16179-16179/? E/unknown:ReactRootView: Unable to update root layout specs for ReactRootView: no rootViewTag set yet
2022-09-01 11:25:59.723 16179-16253/? E/log: error java.lang.ClassNotFoundException: com.facebook.react.fabric.StateWrapperImpl
2022-09-01 11:25:59.724 16179-16253/? E/SoLoader: couldn't find DSO to load: libfabricjni.so caused by: com.facebook.react.fabric.StateWrapperImpl result: 0
    
    --------- beginning of crash
2022-09-01 11:25:59.724 16179-16253/? E/AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
    Process: com.evernote.pre, PID: 16179
    java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libfabricjni.so caused by: com.facebook.react.fabric.StateWrapperImpl result: 0
        at com.facebook.soloader.SoLoader.g(SoLoader.java:50)
        at com.facebook.soloader.SoLoader.t(SoLoader.java:19)
        at com.facebook.soloader.SoLoader.s(SoLoader.java:1)
        at com.facebook.soloader.SoLoader.q(SoLoader.java:7)
        at com.facebook.soloader.SoLoader.p(SoLoader.java:1)
        at com.facebook.react.fabric.d.a(FabricSoLoader.java:4)
        at com.facebook.react.fabric.ComponentFactory.<clinit>(ComponentFactory.java:1)
        at d7.a$a$a.getJSIModuleProvider(MainApplicationReactNativeHost.java:1)
        at com.facebook.react.bridge.JSIModuleHolder.getJSIModule(JSIModuleHolder.java:5)
        at com.facebook.react.bridge.JSIModuleRegistry.getModule(JSIModuleRegistry.java:2)
        at com.facebook.react.bridge.CatalystInstanceImpl.getJSIModule(CatalystInstanceImpl.java:1)
        at com.facebook.react.uimanager.t0.h(UIManagerHelper.java:9)
        at com.facebook.react.uimanager.t0.g(UIManagerHelper.java:1)
        at com.facebook.react.r.q(ReactInstanceManager.java:4)
        at com.facebook.react.r.e0(ReactInstanceManager.java:17)
        at com.facebook.react.r.i(ReactInstanceManager.java:1)
        at com.facebook.react.r$f$b.run(ReactInstanceManager.java:1)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:1)
        at android.os.Looper.loopOnce(Looper.java:226)
        at android.os.Looper.loop(Looper.java:313)
        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:8)
        at java.lang.Thread.run(Thread.java:920)
     Caused by: java.lang.ClassNotFoundException: com.facebook.react.fabric.StateWrapperImpl
        at java.lang.Runtime.nativeLoad(Native Method)
        at java.lang.Runtime.nativeLoad(Runtime.java:1121)
        at java.lang.Runtime.load0(Runtime.java:927)
        at java.lang.System.load(System.java:1620)
        at com.facebook.soloader.SoLoader$a.a(SoLoader.java:19)
        at com.facebook.soloader.c.a(DirectApkSoSource.java:7)
        at com.facebook.soloader.SoLoader.g(SoLoader.java:10)
        at com.facebook.soloader.SoLoader.t(SoLoader.java:19) 
        at com.facebook.soloader.SoLoader.s(SoLoader.java:1) 
        at com.facebook.soloader.SoLoader.q(SoLoader.java:7) 
        at com.facebook.soloader.SoLoader.p(SoLoader.java:1) 
        at com.facebook.react.fabric.d.a(FabricSoLoader.java:4) 
        at com.facebook.react.fabric.ComponentFactory.<clinit>(ComponentFactory.java:1) 
        at d7.a$a$a.getJSIModuleProvider(MainApplicationReactNativeHost.java:1) 
        at com.facebook.react.bridge.JSIModuleHolder.getJSIModule(JSIModuleHolder.java:5) 
        at com.facebook.react.bridge.JSIModuleRegistry.getModule(JSIModuleRegistry.java:2) 
        at com.facebook.react.bridge.CatalystInstanceImpl.getJSIModule(CatalystInstanceImpl.java:1) 
        at com.facebook.react.uimanager.t0.h(UIManagerHelper.java:9) 
        at com.facebook.react.uimanager.t0.g(UIManagerHelper.java:1) 
        at com.facebook.react.r.q(ReactInstanceManager.java:4) 
        at com.facebook.react.r.e0(ReactInstanceManager.java:17) 
        at com.facebook.react.r.i(ReactInstanceManager.java:1) 
        at com.facebook.react.r$f$b.run(ReactInstanceManager.java:1) 
        at android.os.Handler.handleCallback(Handler.java:938) 
        at android.os.Handler.dispatchMessage(Handler.java:99) 
        at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:1) 
        at android.os.Looper.loopOnce(Looper.java:226) 
        at android.os.Looper.loop(Looper.java:313) 
        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:8) 
        at java.lang.Thread.run(Thread.java:920) 
2022-09-01 11:26:01.352 1003-1038/? E/ANDR-PERF-UTIL: Failed to update node /proc/16179/sched_boost with value 0
2022-09-01 11:26:01.353 1003-1038/? E/ANDR-PERF-OPTSHANDLER: can't reset task 16179

Error log for Debug:

2022-09-01 12:58:45.630 23851-23851/com.evernote E/IterableApi:  ❤️ Iterable SDK must be initialized with an API key and user email/userId before calling SDK methods
2022-09-01 12:58:45.742 23851-23851/com.evernote E/com.evernote.lifecycle: about to send foreground
2022-09-01 12:58:45.784 23851-23851/com.evernote E/unknown:ReactRootView: Unable to update root layout specs for ReactRootView: no rootViewTag set yet
2022-09-01 12:58:47.896 23851-23988/com.evernote E/SoLoader: couldn't find DSO to load: libneutron_appmodules.so
    	SoSource 0: com.facebook.soloader.DirectorySoSource[root = /data/app/~~6vb5Y33tOOGx14cJr59SdQ==/com.evernote-UNelvWwuvY8xAGtp6t4CMw==/lib/arm64 flags = 0]
    	SoSource 1: com.facebook.soloader.DirectApkSoSource[root = (/data/app/~~6vb5Y33tOOGx14cJr59SdQ==/com.evernote-UNelvWwuvY8xAGtp6t4CMw==/base.apk!/lib/arm64-v8a, )]
    	SoSource 2: com.facebook.soloader.DirectorySoSource[root = /system/lib64 flags = 2]
    	SoSource 3: com.facebook.soloader.DirectorySoSource[root = /vendor/lib64 flags = 2]
    	Native lib dir: /data/app/~~6vb5Y33tOOGx14cJr59SdQ==/com.evernote-UNelvWwuvY8xAGtp6t4CMw==/lib/arm64
     result: 0
    
    --------- beginning of crash
2022-09-01 12:58:47.897 23851-23988/com.evernote E/AndroidRuntime: FATAL EXCEPTION: create_react_context
    Process: com.evernote, PID: 23851
    java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libneutron_appmodules.so
    	SoSource 0: com.facebook.soloader.DirectorySoSource[root = /data/app/~~6vb5Y33tOOGx14cJr59SdQ==/com.evernote-UNelvWwuvY8xAGtp6t4CMw==/lib/arm64 flags = 0]
    	SoSource 1: com.facebook.soloader.DirectApkSoSource[root = (/data/app/~~6vb5Y33tOOGx14cJr59SdQ==/com.evernote-UNelvWwuvY8xAGtp6t4CMw==/base.apk!/lib/arm64-v8a, )]
    	SoSource 2: com.facebook.soloader.DirectorySoSource[root = /system/lib64 flags = 2]
    	SoSource 3: com.facebook.soloader.DirectorySoSource[root = /vendor/lib64 flags = 2]
    	Native lib dir: /data/app/~~6vb5Y33tOOGx14cJr59SdQ==/com.evernote-UNelvWwuvY8xAGtp6t4CMw==/lib/arm64
     result: 0
        at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:1127)
        at com.facebook.soloader.SoLoader.loadLibraryBySoNameImpl(SoLoader.java:943)
        at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:855)
        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:802)
        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:772)
        at com.evernote.newarchitecture.modules.MainApplicationTurboModuleManagerDelegate.maybeLoadOtherSoLibraries(MainApplicationTurboModuleManagerDelegate.java:37)
        at com.facebook.react.turbomodule.core.TurboModuleManagerDelegate.<init>(TurboModuleManagerDelegate.java:29)
        at com.facebook.react.ReactPackageTurboModuleManagerDelegate.<init>(ReactPackageTurboModuleManagerDelegate.java:32)
        at com.evernote.newarchitecture.modules.MainApplicationTurboModuleManagerDelegate.<init>(MainApplicationTurboModuleManagerDelegate.java:22)
        at com.evernote.newarchitecture.modules.MainApplicationTurboModuleManagerDelegate$Builder.build(MainApplicationTurboModuleManagerDelegate.java:29)
        at com.evernote.newarchitecture.modules.MainApplicationTurboModuleManagerDelegate$Builder.build(MainApplicationTurboModuleManagerDelegate.java:26)
        at com.facebook.react.ReactPackageTurboModuleManagerDelegate$Builder.build(ReactPackageTurboModuleManagerDelegate.java:146)
        at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1369)
        at com.facebook.react.ReactInstanceManager.access$1200(ReactInstanceManager.java:138)
        at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1111)
        at java.lang.Thread.run(Thread.java:920)

Version

0.68.2

Output of npx react-native info

√ ~/stash/neutron/>yarn react-native info yarn run v1.22.19 $ /Users/alexkrav/stash/neutron/node_modules/.bin/react-native info warn Package marked-terminal has been ignored because it contains invalid configuration. Reason: Package subpath ‘./package.json’ is not defined by “exports” in /Users/alexkrav/stash/neutron/node_modules/marked-terminal/package.json info Fetching system and libraries information… System: OS: macOS 12.2 CPU: (16) x64 Intel® Core™ i9-9880H CPU @ 2.30GHz Memory: 226.80 MB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 16.15.0 - /var/folders/y6/tl91k7_15xb6fjsgr1817yw40000gp/T/yarn–1662056691464-0.747260586704783/node Yarn: 1.22.19 - /var/folders/y6/tl91k7_15xb6fjsgr1817yw40000gp/T/yarn–1662056691464-0.747260586704783/yarn npm: 8.5.5 - ~/.nvm/versions/node/v16.15√ ~/stash/neutron/>yarn react-native info yarn run v1.22.19 $ /Users/alexkrav/stash/neutron/node_modules/.bin/react-native info warn Package marked-terminal has been ignored because it contains invalid configuration. Reason: Package subpath ‘./package.json’ is not defined by “exports” in /Users/alexkrav/stash/neutron/node_modules/marked-terminal/package.json info Fetching system and libraries information… System: OS: macOS 12.2 CPU: (16) x64 Intel® Core™ i9-9880H CPU @ 2.30GHz Memory: 226.80 MB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 16.15.0 - /var/folders/y6/tl91k7_15xb6fjsgr1817yw40000gp/T/yarn–1662056691464-0.747260586704783/node Yarn: 1.22.19 - /var/folders/y6/tl91k7_15xb6fjsgr1817yw40000gp/T/yarn–1662056691464-0.747260586704783/yarn npm: 8.5.5 - ~/.nvm/versions/node/v16.15.0/bin/npm Watchman: 2022.05.30.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.3 - /Users/alexkrav/.rbenv/shims/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5 Android SDK: API Levels: 23, 28, 29, 30, 31 Build Tools: 27.0.3, 28.0.3, 29.0.2, 29.0.3, 30.0.2, 30.0.3, 31.0.0, 31.0.0 System Images: android-27 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom, android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom, android-31 | Google APIs Intel x86 Atom_64 Android NDK: 21.4.7075529 IDEs: Android Studio: 4.1 AI-201.8743.12.41.7042882 Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild Languages: Java: 11.0.15 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.68.2 => 0.68.2 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found ✨ Done in 3.58s…0/bin/npm Watchman: 2022.05.30.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.3 - /Users/alexkrav/.rbenv/shims/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5 Android SDK: API Levels: 23, 28, 29, 30, 31 Build Tools: 27.0.3, 28.0.3, 29.0.2, 29.0.3, 30.0.2, 30.0.3, 31.0.0, 31.0.0 System Images: android-27 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom, android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom, android-31 | Google APIs Intel x86 Atom_64 Android NDK: 21.4.7075529 IDEs: Android Studio: 4.1 AI-201.8743.12.41.7042882 Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild Languages: Java: 11.0.15 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.68.2 => 0.68.2 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found ✨ Done in 3.58s.

Steps to reproduce

yarn install yarn run android

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:16 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
alexkravcommented, Sep 17, 2022

I’ll try Just hoped that there is a way to skip a lot of manual changes.

0reactions
cortinicocommented, Nov 23, 2022

Hey all, Please share:

  1. The stacktrace of the crash
  2. A reproducer where we can see what’s going on
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix “pod install” error in React Native on Mac M1
Run again the same command React Native suggested you earlier, but using Apple's Rosetta 2: cd ./AwesomeApp/ios && sudo arch -x86_64 pod install...
Read more >
Expo app crashes when attempting to write a new record with ...
Created a new project using the Expo template code only, ran the command: expo run:android with the Android Studio Emulator open, ...
Read more >
An update on the New Architecture Rollout - React Native
Invoke Gradle with -PnewArchEnabled=true. Then you can run your app with yarn react-native run-android or run-ios and you'll ...
Read more >
Crashing app (my own TKCompanionApp) after updates
3, NPM 8.19.2, NodeJS 16.17.1 and Android NDK r23c)adb, it seems I'm not able to run the downloaded version(s) anymore.
Read more >
Fix App Instant Crash Due to Rooted Device Detection
The possible reason for the issue is that your emulator has enabled root permission and this conflicts with the launching of your apps....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found