xamarin / Xamarin.Auth

Xamarin.Auth
Apache License 2.0
541 stars 351 forks source link

App Crash because of "CANARY_PACKAGE" in Xamarin.Auth nuget #460

Open suman-chava-by opened 2 years ago

suman-chava-by commented 2 years ago

Crash:

System.Collections.Generic.KeyNotFoundException: The given key 'CANARY_PACKAGE' was not present in the dictionary.

StackTrace

Dictionary`2[TKey,TValue].get_Item (TKey key) PackageManagerHelper.GetPackageNamesToUseImplementation (Android.Content.Context context, System.String url) CustomTabsConfiguration.Initialize (Android.App.Activity a) WebAuthenticatorNativeBrowserActivity.OnCreate (Android.OS.Bundle savedInstanceState) Activity.n_OnCreate_Landroid_osBundle (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_savedInstanceState) (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.7(intptr,intptr,intptr)

Description

We used Xamarin.Auth nuget for SSO authentication in our enterprise app. For some of the Android devices (as reported by different Galaxy phone users), we are getting the above crash issue and user cannot proceed further to login and use the app. In Appcenter Crash issue stacktrace, it was found that "CANARY_PACKAGE" is missing in a dictionary defined in PackageManagerHelper.cs file, which is part of Xamarin.Auth repository.

https://github.com/xamarin/Xamarin.Auth/blob/master/source/Core/Xamarin.Auth.XamarinAndroid/UINativeNonIntegratedBrowsers/CustomTabsUtilities/PackageManagerHelper.cs

Impact Users are not able to proceed further and use the app as they are not logging in and also resulting in lesser ratings in Google playstore.

Is there any fix that is planned for the future upgrades of this NuGet?

Version

Expected behaviour

App should redirect the login flow to an SSO Webpage and display the login screeen.

Actual behaviour

App is crashing instead of redirecting to SSO web page

image