Portmone / Android-e-Commerce-SDK

GNU General Public License v3.0
3 stars 0 forks source link

Crash when using registerForActivityResult #11

Open artemmihelson opened 3 months ago

artemmihelson commented 3 months ago

Hi,

The app crashes when trying to present your activity using CardPaymentContract `2024-05-21 09:53:55.521 1444-1444 AndroidRuntime live.dots.ma.redesign E FATAL EXCEPTION: main Process: live.dots.ma.redesign, PID: 1444 java.lang.ClassCastException: androidx.compose.animation.AnimatedContentTransitionScopeImpl cannot be cast to androidx.compose.animation.AnimatedContentScope at com.google.accompanist.navigation.animation.AnimatedNavHostKt$AnimatedNavHost$7$1.invoke(AnimatedNavHost.kt:197) at androidx.compose.animation.AnimatedContentKt.AnimatedContent(AnimatedContent.kt:787) at com.google.accompanist.navigation.animation.AnimatedNavHostKt.AnimatedNavHost(AnimatedNavHost.kt:195) at com.google.accompanist.navigation.animation.AnimatedNavHostKt$AnimatedNavHost$11.invoke(Unknown Source:23) at com.google.accompanist.navigation.animation.AnimatedNavHostKt$AnimatedNavHost$11.invoke(Unknown Source:10) at androidx.compose.runtime.RecomposeScopeImpl.compose(RecomposeScopeImpl.kt:169) at androidx.compose.runtime.ComposerImpl.recomposeToGroupEnd(Composer.kt:2468) at androidx.compose.runtime.ComposerImpl.skipCurrentGroup(Composer.kt:2737) at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:3352) at androidx.compose.runtime.ComposerImpl.recompose$runtime_release(Composer.kt:3303) at androidx.compose.runtime.CompositionImpl.recompose(Composition.kt:781) at androidx.compose.runtime.Recomposer.performRecompose(Recomposer.kt:1097) at androidx.compose.runtime.Recomposer.access$performRecompose(Recomposer.kt:124) at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$1.invoke(Recomposer.kt:569) at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$1.invoke(Recomposer.kt:537) at androidx.compose.ui.platform.AndroidUiFrameClock$withFrameNanos$2$callback$1.doFrame(AndroidUiFrameClock.android.kt:41) at androidx.compose.ui.platform.AndroidUiDispatcher.performFrameDispatch(AndroidUiDispatcher.android.kt:109) at androidx.compose.ui.platform.AndroidUiDispatcher.access$performFrameDispatch(AndroidUiDispatcher.android.kt:41) at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.doFrame(AndroidUiDispatcher.android.kt:69) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1337) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1348) at android.view.Choreographer.doCallbacks(Choreographer.java:952) at android.view.Choreographer.doFrame(Choreographer.java:878) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1322) at android.os.Handler.handleCallback(Handler.java:958) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:205) at android.os.Looper.loop(Looper.java:294) at android.app.ActivityThread.main(ActivityThread.java:8176) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971) Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [androidx.compose.runtime.PausableMonotonicFrameClock@3c34494, androidx.compose.ui.platform.MotionDurationScaleImpl@7817b3d, StandaloneCoroutine{Cancelling}@3dc3f32, AndroidUiDispatcher@2b45483]

Could you explain in details what can be done in order to avoid that crash?