05-26 10:37:33.489 26464 26576 E AndroidRuntime: Process: com.andreacioccarelli.musicdownloader, PID: 26464
05-26 10:37:33.489 26464 26576 E AndroidRuntime: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
05-26 10:37:33.489 26464 26576 E AndroidRuntime: at androidx.fragment.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:2080)
05-26 10:37:33.489 26464 26576 E AndroidRuntime: at androidx.fragment.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:2106)
05-26 10:37:33.489 26464 26576 E AndroidRuntime: at androidx.fragment.app.BackStackRecord.commitInternal(BackStackRecord.java:683)
05-26 10:37:33.489 26464 26576 E AndroidRuntime: at androidx.fragment.app.BackStackRecord.commit(BackStackRecord.java:637)
05-26 10:37:33.489 26464 26576 E AndroidRuntime: at androidx.fragment.app.DialogFragment.show(DialogFragment.java:144)
05-26 10:37:33.489 26464 26576 E AndroidRuntime: at com.andreacioccarelli.musicdownloader.ui.adapters.SearchAdapter$onBindViewHolder$$inlined$with$lambda$1.onClick(SearchAdapter.kt:58)
05-26 10:37:33.489 26464 26576 E AndroidRuntime: at android.view.View.performClick(View.java:5209)
05-26 10:37:33.489 26464 26576 E AndroidRuntime: at com.andreacioccarelli.musicdownloader.ui.activities.MainActivity$performSearch$2$1.invokeSuspend(MainActivity.kt:229)
05-26 10:37:33.489 26464 26576 E AndroidRuntime: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
05-26 10:37:33.489 26464 26576 E AndroidRuntime: at kotlinx.coroutines.ResumeModeKt.resumeMode(ResumeMode.kt:67)
05-26 10:37:33.489 26464 26576 E AndroidRuntime: at kotlinx.coroutines.DispatchedKt.resume(Dispatched.kt:309)
05-26 10:37:33.489 26464 26576 E AndroidRuntime: at kotlinx.coroutines.DispatchedKt.dispatch(Dispatched.kt:298)
05-26 10:37:33.489 26464 26576 E AndroidRuntime: at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:238)
05-26 10:37:33.489 26464 26576 E AndroidRuntime: at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl(CancellableContinuationImpl.kt:248)
05-26 10:37:33.489 26464 26576 E AndroidRuntime: at kotlinx.coroutines.CancellableContinuationImpl.resumeUndispatched(CancellableContinuationImpl.kt:320)
05-26 10:37:33.489 26464 26576 E AndroidRuntime: at kotlinx.coroutines.android.HandlerContext$scheduleResumeAfterDelay$$inlined$Runnable$1.run(Runnable.kt:19)
05-26 10:37:33.489 26464 26576 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:739)
05-26 10:37:33.489 26464 26576 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95)
05-26 10:37:33.489 26464 26576 E AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
05-26 10:37:33.489 26464 26576 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5452)
05-26 10:37:33.489 26464 26576 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
05-26 10:37:33.489 26464 26576 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:781)
05-26 10:37:33.489 26464 26576 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:671)```
Describe the bug When the app is installed on a device for the first time, and launched, it crash even before the permission is granted.
To Reproduce
Expected behavior I expect the app to launch freely without any crash.
Screenshots https://youtu.be/pkYt4nABcW4
Devices and Versions)
Device: [Itel]
Version [6.1]
App version [1.3.8]
Log