jpudysz / react-native-unistyles

Level up your React Native StyleSheet

Home Page:https://unistyl.es

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fatal Exception: java.lang.UnsatisfiedLinkError

jafar-jabr opened this issue · comments

Description

Firebase Crashlytics in my app reported this crash:

Fatal Exception: java.lang.UnsatisfiedLinkError: No implementation found for void com.unistyles.UnistylesModule.nativeDestroy() (tried Java_com_unistyles_UnistylesModule_nativeDestroy and Java_com_unistyles_UnistylesModule_nativeDestroy__)
       at com.unistyles.UnistylesModule.nativeDestroy(UnistylesModule.kt)
       at com.unistyles.UnistylesModule.onCatalystInstanceDestroy(UnistylesModule.kt:76)
       at com.facebook.react.bridge.BaseJavaModule.invalidate(BaseJavaModule.java:71)
       at com.facebook.react.bridge.ModuleHolder.destroy(ModuleHolder.java:109)
       at com.facebook.react.bridge.NativeModuleRegistry.notifyJSInstanceDestroy(NativeModuleRegistry.java:86)
       at com.facebook.react.bridge.CatalystInstanceImpl$1.run(CatalystInstanceImpl.java:353)
       at android.os.Handler.handleCallback(Handler.java:942)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
       at android.os.Looper.loopOnce(Looper.java:201)
       at android.os.Looper.loop(Looper.java:288)
       at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:234)
       at java.lang.Thread.run(Thread.java:1012)

Steps to reproduce

no steps.

Snack or a link to a repository (optional)

No response

Unistyles version

2.5.3

React Native version

0.73.6

Platforms

Android

Engine

Hermes

Architecture

Paper (old)

This method is called when you close the app, so it's not visible to the end user.

This error may occur when your app is using ProGuard, and you didn't set it up propetly.

Do you use ProGuard?

Check this thread please: #151

If you're not using ProGuard, then the other possibility is that Unistyles was not loaded at all, perhaps because the app was immediately closed or crashed due to another exception, and Unistyles didn't have a chance to initialize. I can add if statement to prevent the crash.

Looking forward to your response.

@jpudysz
The ProGuard is enabled for release builds but no release build ever made, the app still in development,
Thank you.

So, did it happen during development on your machine?

Maybe it's a hot reload issue under certain circumstances. I can add one more if to prevent a crash 🙂

@jpudysz
Yes, during development on two different devices which is 100% of users for now.

Published 2.5.4 😇