On Android SDK 30, with 1.6 pre 5 of Xamarin Essentials, on launch of the browser tabs page for login, on line 24 of WebAuthenticatorIntermediateActivity.android.cs I get a null reference exception. extras is null. savedInstanceState is null, and Intent.Extras is also null.
I have the activity setup per the docs (direct copy with my own callback_scheme) The error is a very unhelpful "Null Reference Exception" message with 0 stack or anything. I had to add the actual Xamarin Essentials project from github to get it to fail on this.
Should go through like UWP does.
Crash on browser launch for login and password.
Can you test on an actual device? Does the sample in this repo work for you?
I can't seem to repro this with our sample. In fact, this should not happen. Intent should not be null as that was the intent used to launch the activity. Bot, not only that, the Extras should not be null because we _always_ add an extra to that intent to launch. That is how the browser is being launched... In fact, in order for the browser to be launched, it had to have loaded the extras and read the browser intent from there...
I tried on a device and the emulator and was not able to repro.
I'm trying to find a real device but my emulator is a Pixel C emulator using SDK 30 created in the AVD Manager.
This is all I get: System.NullReferenceException
Message=Object reference not set to an instance of an object.
Are you set to Android 30 as your target sdk?
I created a brand new emulator and in that case, because of no caching the error occurs when it comes back from the google chrome tabs.
What else can I get you to help find this?
Same problem here - tested on a physical Pixel 5.
I think it has something to do with targeting Android 30 and the privacy changes that came with it:
Adding this snippet to the AndroidManifest fixed the problem for me:
<queries>
<intent>
<action android:name="android.support.customtabs.action.CustomTabsService" />
</intent>
</queries>
The team working on the MSAL lib is tracking a similar, related problem: https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/issues/2139
Most helpful comment
Same problem here - tested on a physical Pixel 5.
I think it has something to do with targeting Android 30 and the privacy changes that came with it:
Adding this snippet to the AndroidManifest fixed the problem for me: