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

[2.3.0] java.lang.UnsatisfiedLinkError

efstathiosntonas opened this issue · comments

Description

It only appeared once in a huge user base and it happened on MainActivity#onResume() on Android 13 Samsung S20 FE 5G:

java.lang.UnsatisfiedLinkError: No implementation found for void com.unistyles.UnistylesModule.nativeOnOrientationChange(int, int) (tried Java_com_unistyles_UnistylesModule_nativeOnOrientationChange and Java_com_unistyles_UnistylesModule_nativeOnOrientationChange__II) - is the library loaded, e.g. System.loadLibrary?
        at com.unistyles.UnistylesModule.nativeOnOrientationChange(UnistylesModule.kt:-2)
        at com.unistyles.UnistylesModule.onConfigChange$lambda$0(UnistylesModule.kt:51)
        at com.unistyles.UnistylesModule.$r8$lambda$Y5cS3iwg3AGCEcfvPfDYHsquXR0(Unknown)
        at com.unistyles.UnistylesModule$$ExternalSyntheticLambda0.run(Unknown:4)
        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:226)
        at android.os.Looper.loop(Looper.java:313)
        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:234)
        at java.lang.Thread.run(Thread.java:1012)

Steps to reproduce

  1. Can't reproduce it

Snack or a link to a repository (optional)

No response

Unistyles version

2.3.0

React Native version

0.73.4

Platforms

Android

Engine

Hermes

Architecture

Paper (old)

Hey @efstathiosntonas, I appreciate your report.

Although you haven't provided reproducible steps and the error is both cryptic and nonsensical, I actually have one idea why it may happen. I will address it in the next release (this week) with a potential fix.

Thanks for looking into this Jacek. Truth is I cannot reproduce it, I'm not doing anything fancy in unistyles setup and it's working as a charm.

It happened only in 1 Android device/user among thousands of them in a timespan of 1 month.

I see. I also didn't encounter any errors in Sentry. I hope version 2.4.0 will resolve this. I will keep the issue open until the next release.

Today the crashes counter increased to 4, not that it will help much but the error changed slightly:

java.lang.UnsatisfiedLinkError: No implementation found for void com.unistyles.UnistylesModule.nativeOnOrientationChange(int, int) (tried Java_com_unistyles_UnistylesModule_nativeOnOrientationChange and Java_com_unistyles_UnistylesModule_nativeOnOrientationChange__II)
        at com.unistyles.UnistylesModule.nativeOnOrientationChange(UnistylesModule.kt:-2)
        at com.unistyles.UnistylesModule.onConfigChange$lambda$0(UnistylesModule.kt:51)
        at com.unistyles.UnistylesModule.$r8$lambda$Y5cS3iwg3AGCEcfvPfDYHsquXR0(Unknown)
        at com.unistyles.UnistylesModule$$ExternalSyntheticLambda0.run(Unknown:4)
        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:29)
        at android.os.Looper.loop(Looper.java:223)
        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:234)
        at java.lang.Thread.run(Thread.java:923)

I already have a fix on the branch 🙏

@jpudysz hi, sorry for asking but is there an eta for this fix? I'm about to ship an update 😓

Yeah, sorry I had to fully test Android. I will be able to ship this evening / tomorrow morning CET time as I'm almost ready

perfect, thanks @jpudysz, keep it up!

Thanks @efstathiosntonas for being patient, this release will be huge!

yeah, one more reason to ask before shipping the update haha!

I've just released v2.4.0-rc.2. Mobile/Web/SSR/macOS are tested and implemented there. I just need to align windows code. You can give it a try.

Released #149

@efstathiosntonas any update about the crashes?

@jpudysz hi, all good on 2.4.0, let's close this! Thank you ❤️