-
Notifications
You must be signed in to change notification settings - Fork 352
App crash in Android 12 devices because of Xamarin.Auth #459
Comments
@xamarin-release-manager Kindly help us as this is a blocker for Android 12 |
The fix details: Project: Xamarin.Auth.XamarinAndroid Fix: PendingIntent broadcast = PendingIntent.GetBroadcast |
Is this project not being maintained anymore? Is this fix ever going to be released? |
When is this being fixed? |
I am waiting for this fix.... |
it is not worth it to ask for fix. it will be never fixed as the last change in the repo was 3 years ago. In our project we had to fork the repo and build a custom version of it on our own. But the best solution is just to drop it and use something good instead. |
This is so frustrating. On StackOverflow it is suggested to install the Xamarin.AndroidX.Work.Runtime package to get around the issue, but it seems there are Kotlin version mismatches between the packages then. Has anyone been able to find a workaround for this? |
|
Turns out I had to update some of my other nuget packages. But unfortunately Xamarin.AndroidX.Work.Runtime package did not solve the issue. I ended up using Plugin.GoogleClient package with Firebase setup to get Google sign in on Android and iOS working. |
If we want to continue using this package in our Xamarin project, I think the only thing we can do is fork the repository and fix the issue ourselves. I did too (here my fork), as someone else said. I have built the DLLs, uninstalled the Xamarin.Auth package from my project and added them as reference:
|
ciao all, |
Run away from this repo, and Xamarin, as fast as you can. What a joke. |
a possible solution is to use the Xamarin.Essentials library with Xamarin.Essentials.WebAuthentic |
Is any solution for resolving this issue of Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent while calling the below code var presenter = new Xamarin.Auth.Presenters.OAuthLoginPresenter(); |
Xamarin.Auth Issue
Issue: In Android 12 (the recently released Android version), the mobile application crashes when the user tries to login via SSO. After debugging for the root cause, it is found that, Xamarin.Auth nuget is throwing an error as shown below :
"Java.Lang.IllegalArgumentException: {packageName}: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles."
Please find below the code at which the error is thrown :
var presenter = new Xamarin.Auth.Presenters.OAuthLoginPresenter();
presenter.Login(authenticator);
Is there any Fix targeted or Currently being worked on by the MS Xamarin team to fix this?
Impact : More than 10K users will be impacted once they have upgraded their Android Devices OS to Android 12, since they can't login to their app because of this issue.
Version
Platform:
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
Screenshot :
The text was updated successfully, but these errors were encountered: