autoreleasefool / approach

An iOS and Android app to track 5-pin bowling statistics
https://tryapproach.app
32 stars 6 forks source link

NullPointerException: com.google.accompanist.navigation.material.BottomSheetNavigator$sheetContent$1$2 #536

Open autoreleasefool opened 2 months ago

autoreleasefool commented 2 months ago

https://approach-bowling.sentry.io/issues/5706565554/?project=4506432676036608&query=is:unresolved+issue.priority:%5Bhigh,+medium%5D&statsPeriod=14d&stream_index=3

Full stack trace ``` java.lang.NullPointerException: null at com.google.accompanist.navigation.material.BottomSheetNavigator$sheetContent$1$2.invoke(BottomSheetNavigator.kt:191) at com.google.accompanist.navigation.material.BottomSheetNavigator$sheetContent$1$2.invoke(BottomSheetNavigator.kt:190) at androidx.activity.compose.BackHandlerKt$BackHandler$backCallback$1$1.handleOnBackPressed(BackHandler.kt:89) at androidx.activity.OnBackPressedDispatcher.onBackPressed(OnBackPressedDispatcher.kt:279) at androidx.activity.ComponentActivity.onBackPressed(ComponentActivity.kt:612) at android.app.Activity.onKeyUp(Activity.java:4157) at android.view.KeyEvent.dispatch(KeyEvent.java:3522) at android.app.Activity.dispatchKeyEvent(Activity.java:4505) at androidx.core.app.ComponentActivity.superDispatchKeyEvent(ComponentActivity.kt:103) at androidx.core.view.KeyEventDispatcher.dispatchKeyEvent(KeyEventDispatcher.java:85) at androidx.core.app.ComponentActivity.dispatchKeyEvent(ComponentActivity.kt:117) at io.sentry.android.core.internal.gestures.WindowCallbackAdapter.dispatchKeyEvent(WindowCallbackAdapter.java:29) at com.android.internal.policy.DecorView.dispatchKeyEvent(DecorView.java:684) at android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:8485) at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:8345) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7678) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7735) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7701) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:7904) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:7709) at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:7961) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7682) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7735) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7701) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:7709) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7682) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7735) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7701) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:7937) at android.view.ViewRootImpl$ImeInputStage.onFinishedInputEvent(ViewRootImpl.java:8179) at android.view.inputmethod.InputMethodManager$PendingEvent.run(InputMethodManager.java:4578) at android.view.inputmethod.InputMethodManager.invokeFinishedInputEventCallback(InputMethodManager.java:4012) at android.view.inputmethod.InputMethodManager.finishedInputEvent(InputMethodManager.java:4003) at android.view.inputmethod.InputMethodManager.-$$Nest$mfinishedInputEvent at android.view.inputmethod.InputMethodManager$ImeInputEventSender.onInputEventFinished(InputMethodManager.java:4555) at android.view.InputEventSender.dispatchInputEventFinished(InputEventSender.java:154) at android.os.MessageQueue.nativePollOnce(MessageQueue.java) at android.os.MessageQueue.next(MessageQueue.java:335) at android.os.Looper.loopOnce(Looper.java:187) at android.os.Looper.loop(Looper.java:319) at android.app.ActivityThread.main(ActivityThread.java:8918) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103) ```
autoreleasefool commented 2 months ago

BottomSheetNavigator has been promoted from accompanist experimental APIs to Compose Material Navigation: https://developer.android.com/reference/kotlin/androidx/compose/material/navigation/package-summary

Supposed to be available in Compose 1.7.0, but I couldn't actually get it to work. Seems to only be present in the alphas, and did not actually make it into the release correctly, but has been deprecated on accompanist.

See here for updates: https://developer.android.com/jetpack/androidx/releases/compose-material