This repository has been archived by the owner on May 15, 2024. It is now read-only.
[Bug] Android Crash when open browser with Browser.OpenAsync() #2079
Labels
bug
Something isn't working
Description
Steps to Reproduce
I have a problem when open custom tab with Browser.OpenAsync(). But it is very difficult to reproduce. But happens a lot with users. We can only investigate through the AppCenter log.
Has anyone had the same problem as me? Or does anyone have a workaround for this?
Thanks for the help.
Expected Behavior
Browser.OpenAsync() not crash
Actual Behavior
Browser.OpenAsync() crash in CustomTabsIntent.LaunchUrl()
Basic Information
Log crash:
android.os.RemoteException: Remote stack trace:
com.android.server.am.ActivityStackSupervisor.checkStartAnyActivityPermission ActivityStackSupervisor.java:2074
com.android.server.am.ActivityStarter.startActivity ActivityStarter.java:1011
com.android.server.am.ActivityStarter.startActivity ActivityStarter.java:648
com.android.server.am.ActivityStarter.startActivityMayWait ActivityStarter.java:1645
com.android.server.am.ActivityStarter.execute ActivityStarter.java:589
JniEnvironment+InstanceMethods.CallVoidMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args)
JniPeerMembers+JniInstanceMethods.InvokeAbstractVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters)
CustomTabsIntent.LaunchUrl (Android.Content.Context context, Android.Net.Uri url)
Browser.PlatformOpenAsync (System.Uri uri, Xamarin.Essentials.BrowserLaunchOptions options)
Browser.OpenAsync (System.Uri uri, Xamarin.Essentials.BrowserLaunchOptions options)
Browser.OpenAsync (System.String uri, Xamarin.Essentials.BrowserLaunchOptions options)
Browser.OpenAsync (System.String uri, Xamarin.Essentials.BrowserLaunchMode launchMode)
BrowserHelper.OpenAsync (System.String uri)
MessageDetailViewModel.OnExecuteMoreInformationCommandAsync (System.Object obj)
AsyncMethodBuilderCore+<>c.b__7_0 (System.Object state)
SyncContext+<>c__DisplayClass2_0.b__0 ()
Thread+RunnableImplementor.Run ()
IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this)
android.os.Parcel.createException Parcel.java:1950
android.os.Parcel.readException Parcel.java:1918
android.os.Parcel.readException Parcel.java:1868
android.app.IActivityManager$Stub$Proxy.startActivity IActivityManager.java:3608
android.app.Instrumentation.execStartActivity Instrumentation.java:1674
android.app.Activity.startActivityForResult Activity.java:4694
androidx.activity.ComponentActivity.startActivityForResult ComponentActivity.java:597
android.app.Activity.startActivityForResult Activity.java:4652
androidx.activity.ComponentActivity.startActivityForResult ComponentActivity.java:583
android.app.Activity.startActivity Activity.java:5013
androidx.core.content.ContextCompat$Api16Impl.startActivity ContextCompat.java:828
androidx.core.content.ContextCompat.startActivity ContextCompat.java:276
androidx.browser.customtabs.CustomTabsIntent.launchUrl CustomTabsIntent.java:376
crc64f839d1170f9718f6.CustomerButtonClickListener.n_onClick(Native Method)
crc64f839d1170f9718f6.CustomerButtonClickListener.onClick CustomerButtonClickListener.java:30
android.view.View.performClick View.java:6637
android.view.View.performClickInternal View.java:6614
android.view.View.access$3100 View.java:790
android.view.View$PerformClick.run View.java:26201
android.os.Handler.handleCallback Handler.java:873
android.os.Handler.dispatchMessage Handler.java:99
android.os.Looper.loop Looper.java:224
android.app.ActivityThread.main ActivityThread.java:7030
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run RuntimeInit.java:536
Caused by: android.os.RemoteException: Remote stack trace:
com.android.server.am.ActivityStackSupervisor.checkStartAnyActivityPermission ActivityStackSupervisor.java:2074
com.android.server.am.ActivityStarter.startActivity ActivityStarter.java:1011
com.android.server.am.ActivityStarter.startActivity ActivityStarter.java:648
com.android.server.am.ActivityStarter.startActivityMayWait ActivityStarter.java:1645
com.android.server.am.ActivityStarter.execute ActivityStarter.java:589
The text was updated successfully, but these errors were encountered: