KotlinAudio icon indicating copy to clipboard operation
KotlinAudio copied to clipboard

Fatal Exception: kotlin.UninitializedPropertyAccessException

Open vietmobilefolk opened this issue 3 years ago • 7 comments

I faced this issue when using react-native-track-player, which is utilizing KotlinAudio library: Version: v0.1.34

Fatal Exception: kotlin.UninitializedPropertyAccessException: lateinit property descriptionAdapter has not been initialized
       at com.doublesymmetry.kotlinaudio.notification.NotificationManager$destroy$1.invokeSuspend(NotificationManager.kt:295)
       at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
       at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
       at android.os.Handler.handleCallback(Handler.java:938)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:247)
       at android.app.ActivityThread.main(ActivityThread.java:8676)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)

vietmobilefolk avatar Aug 15 '22 08:08 vietmobilefolk

yeah this is been in quite a few versions of it. Could we get a fix please?

CDBridger avatar Aug 16 '22 02:08 CDBridger

Please describe the steps you did that lead to the crash. Can you reproduce this in the example app?

mpivchev avatar Aug 17 '22 08:08 mpivchev

@mpivchev Although we occasionally experience it, it is reported in Crashlytics even though we can't always reproduce it in the example or our app. Although there aren't many users yet, incidents happen frequently. Just curious as to why we don't confirm that the descriptionAdapter is initialized before calling its function.

vietmobilefolk avatar Aug 17 '22 09:08 vietmobilefolk

Another observation concerning this problem is that it occurs when the app is running in the background.

vietmobilefolk avatar Aug 19 '22 10:08 vietmobilefolk

Just curious as to why we don't confirm that the descriptionAdapter is initialized before calling its function.

That's definitely something we can do

mpivchev avatar Aug 22 '22 11:08 mpivchev

Can confirm, happen 100% whenever users put app in background (with another headless task registered)

s123121 avatar Sep 01 '22 05:09 s123121

Is this issue still present for users?

dcvz avatar Feb 06 '24 23:02 dcvz