RevenueCat / purchases-android

Android in-app purchases and subscriptions made easy.
https://www.revenuecat.com/
MIT License
247 stars 50 forks source link

ActivityNotFoundException on RC paywall footer #1723

Closed shawn-lin-013 closed 4 months ago

shawn-lin-013 commented 4 months ago

It seems that the app crashes when the device does not have a browser installed

  Fatal Exception: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=https://www.google.com/... }
       at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2072)
       at android.app.Instrumentation.execStartActivity(Instrumentation.java:1727)
       at android.app.Activity.startActivityForResult(Activity.java:5416)
       at androidx.activity.ComponentActivity.startActivityForResult(ComponentActivity.java:754)
       at android.app.Activity.startActivityForResult(Activity.java:5374)
       at androidx.activity.ComponentActivity.startActivityForResult(ComponentActivity.java:735)
       at android.app.Activity.startActivity(Activity.java:5764)
       at android.app.Activity.startActivity(Activity.java:5717)
       at android.content.ContextWrapper.startActivity(ContextWrapper.java:403)
       at android.content.ContextWrapper.startActivity(ContextWrapper.java:403)
       at androidx.compose.ui.platform.AndroidUriHandler.openUri(AndroidUriHandler.android.kt:26)
       at com.revenuecat.purchases.ui.revenuecatui.composables.FooterKt$Footer$2$2$1.invoke(Footer.kt:125)
       at com.revenuecat.purchases.ui.revenuecatui.composables.FooterKt$Footer$2$2$1.invoke(Footer.kt:120)
       at com.revenuecat.purchases.ui.revenuecatui.composables.FooterKt$Button$1$1$1.invoke(Footer.kt:180)
       at com.revenuecat.purchases.ui.revenuecatui.composables.FooterKt$Button$1$1$1.invoke(Footer.kt:180)
       at androidx.compose.foundation.ClickableKt$clickable$4$gesture$1$1$2.invoke-k-4lQ0M(Clickable.kt:167)
       at androidx.compose.foundation.ClickableKt$clickable$4$gesture$1$1$2.invoke(Clickable.kt:156)
       at androidx.compose.foundation.gestures.TapGestureDetectorKt$detectTapAndPress$2$1.invokeSuspend(TapGestureDetector.kt:255)
       at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
       at kotlinx.coroutines.DispatchedTaskKt.resume(DispatchedTask.kt:179)
       at kotlinx.coroutines.DispatchedTaskKt.dispatch(DispatchedTask.kt:168)
       at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:474)
       at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl(CancellableContinuationImpl.kt:508)
       at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$default(CancellableContinuationImpl.kt:497)
       at kotlinx.coroutines.CancellableContinuationImpl.resumeWith(CancellableContinuationImpl.kt:368)
       at androidx.compose.ui.input.pointer.SuspendingPointerInputFilter$PointerEventHandlerCoroutine.offerPointerEvent(SuspendingPointerInputFilter.kt:566)
       at androidx.compose.ui.input.pointer.SuspendingPointerInputFilter.dispatchPointerEvent(SuspendingPointerInputFilter.kt:456)
       at androidx.compose.ui.input.pointer.SuspendingPointerInputFilter.onPointerEvent-H0pRuoY(SuspendingPointerInputFilter.kt:469)
       at androidx.compose.ui.node.BackwardsCompatNode.onPointerEvent-H0pRuoY(BackwardsCompatNode.kt:374)
       at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:314)
       at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:301)
       at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:301)
       at androidx.compose.ui.input.pointer.NodeParent.dispatchMainEventPass(HitPathTracker.kt:183)
       at androidx.compose.ui.input.pointer.HitPathTracker.dispatchChanges(HitPathTracker.kt:102)
       at androidx.compose.ui.input.pointer.PointerInputEventProcessor.process-BIzXfog(PointerInputEventProcessor.kt:98)
       at androidx.compose.ui.platform.AndroidComposeView.sendMotionEvent-8iAsVTc(AndroidComposeView.android.kt:1361)
       at androidx.compose.ui.platform.AndroidComposeView.handleMotionEvent-8iAsVTc(AndroidComposeView.android.kt:1307)
       at androidx.compose.ui.platform.AndroidComposeView.dispatchTouchEvent(AndroidComposeView.android.kt:1246)
       at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3118)
       at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2799)
       at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3118)
       at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2799)
       at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3118)
       at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2799)
       at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3118)
       at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2799)
       at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:530)
       at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1899)
       at android.app.Dialog.dispatchTouchEvent(Dialog.java:859)
       at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:488)
       at android.view.View.dispatchPointerEvent(View.java:14619)
       at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:6174)
       at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:5977)
       at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5468)
       at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5525)
       at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5491)
       at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:5643)
       at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5499)
       at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:5700)
       at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5472)
       at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5525)
       at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5491)
       at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5499)
       at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5472)
       at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:8318)
       at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:8234)
       at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:8195)
       at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:8454)
       at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:227)
       at android.os.MessageQueue.nativePollOnce(MessageQueue.java)
       at android.os.MessageQueue.next(MessageQueue.java:342)
       at android.os.Looper.loop(Looper.java:197)
       at android.app.ActivityThread.main(ActivityThread.java:7868)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:958)
  1. Environment
    1. Platform: Android
    2. SDK version: 7.5.2
    3. OS version: 11
    4. Android Studio version: not relevant
    5. How widespread is the issue. Percentage of devices affected.
  2. Debug logs that reproduce the issue
  3. Steps to reproduce, with a description of expected vs. actual behavior
  4. Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.)

Additional context Add any other context about the problem here.

RCGitBot commented 4 months ago

👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!

JayShortway commented 4 months ago

Thanks a lot for reporting this! The crash fix should be merged soon. We will also add a toast message informing the user.

github-actions[bot] commented 3 months ago

This issue has been automatically locked due to no recent activity after it was closed. Please open a new issue for related reports.