xamarin/Essentials

[Bug] Xamarin Essentials Web Authenticator & Open Browser

champcbg opened this issue · 2 comments

Description

For reference:

https://learn.microsoft.com/en-us/xamarin/essentials/open-browser?context=xamarin%2Fandroid&tabs=android
https://learn.microsoft.com/en-us/xamarin/essentials/web-authenticator?context=xamarin%2Fandroid&tabs=android

I am using both of these features and everything works as expected when I was on an emulator that targeted android 11. It was working without adding the recommended configurations from the documentation above.

when the app is run on an emulator that targets android 13, neither of these features works anymore. the browser just opens and never finished loading the page. If the browser is closed the app will recognize a cancel method was called.

from the documentation, I have tried with and without the configurations and to no avail.

<queries>
        <intent>
        <action android:name="android.support.customtabs.action.CustomTabsService" />
    </intent>
        <intent>
    <action android:name="android.intent.action.VIEW" />
    <data android:scheme="http"/>
  </intent>
  <intent>
    <action android:name="android.intent.action.VIEW" />
    <data android:scheme="https"/>
  </intent>
    </queries>

My original SO question was confirmed by MSFT - https://stackoverflow.com/questions/75011446/xamarin-essentials-web-authenticator-open-browser

Steps to Reproduce

  1. Launch Xamarin Forms app
  2. Click Button web authentication or a browser
  3. they both just hang

Expected Behavior

Open the Browser on target android 13

Actual Behavior

the Browser just hangs on target android 13

Basic Information

  • Version with issue: 1.7.4
  • Last known good version:
  • IDE: VS 2022
  • Platform Target Frameworks:
    • iOS:
    • Android: Android 13
    • UWP:
  • Android Support Library Version:
  • Nuget Packages:
  • Affected Devices:

Screenshots

image

Reproduction Link

cheles commented

@champcbg some users reported that this tag in AndroidManifest.xml helps

<queries>
		<intent>
			<action android:name="android.support.customtabs.action.CustomTabsService" />
		</intent>
</queries>

#1983 (comment)

This might be fixed by #2090 would you be able to try the resulting NuGet package from that PR?