You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
I received this crash log earlier today from someone rocking a Huawei Mate 20, running Android 10 (I dont think that matters?).
Fatal Exception: java.lang.IllegalArgumentException: page must be 0 when pageCount is 0
at com.google.accompanist.pager.PagerState.requireCurrentPage(PagerState.kt:320)
at com.google.accompanist.pager.PagerState.animateScrollToPage(PagerState.kt:195)
at com.google.accompanist.pager.PagerState.animateScrollToPage$default(PagerState.java:191)
at progression.design.structure.PagerKt$rememberPagerController$2.invokeSuspend(Pager.kt:108)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at androidx.compose.ui.platform.AndroidUiDispatcher.performTrampolineDispatch(AndroidUiDispatcher.android.kt:81)
at androidx.compose.ui.platform.AndroidUiDispatcher.access$performTrampolineDispatch(AndroidUiDispatcher.android.kt:41)
at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.run(AndroidUiDispatcher.android.kt:2)
at android.os.Handler.handleCallback(Handler.java:900)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:219)
at android.app.ActivityThread.main(ActivityThread.java:8393)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1055)
Steps to reproduce
This happened out in the wild, but the related code that actually triggered the crash looks like this. Basically used to synchronize an external states current selection with the pager page.
Realistically LaunchedEffect is executed before the pager is laid out at least once so this block could be called before we know the needed info for performing the scroll. So you can't call it too early
Description
I received this crash log earlier today from someone rocking a Huawei Mate 20, running Android 10 (I dont think that matters?).
Steps to reproduce
This happened out in the wild, but the related code that actually triggered the crash looks like this. Basically used to synchronize an external states current selection with the pager page.
Additional context
I cant tell which screen of my app lead to this crash, but every screen thats using a pager has at least 1 page at all times.
compose = '1.2.0-alpha04'
accompanist = '0.24.3-alpha'
The text was updated successfully, but these errors were encountered: