firebase / FirebaseUI-Android

Optimized UI components for Firebase
https://firebaseopensource.com/projects/firebase/firebaseui-android/
Apache License 2.0
4.61k stars 1.83k forks source link

Library (Auth UI) does not work with SDK34 or higher (IllegalArgumentException) #2157

Open dhoehl opened 4 months ago

dhoehl commented 4 months ago

Welcome to FirebaseUI and thanks for submitting an issue!

Please take a look at open issues, as well as resolved issues, to see if your issue is either already being addressed, or has been solved by someone else.

If not, please feel free to fill in the following info so we can help faster!

Step 1: Are you in the right place?

Step 2: Describe your environment

Step 3: Describe the problem:

"java.lang.IllegalArgumentException: Targeting U+ (version 34 and above) disallows creating or retrieving a PendingIntent with FLAG_MUTABLE, an implicit Intent within and without FLAG_NO_CREATE and FLAG_ALLOW_UNSAFE_IMPLICIT_INTENT for security reasons. To retrieve an already existing PendingIntent, use FLAG_NO_CREATE, however, to create a new PendingIntent with an implicit Intent use FLAG_IMMUTABLE."

Steps to reproduce:

Compile with U or higher

Observed Results:

Crash

Expected Results:

No crash

awesome-bhatti commented 4 months ago

I am facing the same issue, it seems this library is not maintained anymore

dhoehl commented 4 months ago

This is bad. Is there an alternative? Even the google docs reference this library. Hope we get some offical answer as on how to move on. This is a braking change now. Otherwise I think we can fork this lib and fix it. There should be plenty of users out there

ArcherEmiya05 commented 4 months ago

May I know which IdP you are using? It is working on my end with only Phone Auth.

dhoehl commented 4 months ago

May I know which IdP you are using? It is working on my end with only Phone Auth.

eMail

ian-sayles commented 4 months ago

@dhoehl have you tried upgrading play-services-auth, when I had issue that the app would just crash when the email button was clicked on latest android, older versions no problem, when I upgraded the play-services it fixed the issue: implementation('com.google.android.gms:play-services-auth:20.7.0')

Note when I tried using the latest version of play-services-auth:21.0.0, I could not build my app, due to some changes to the library that FirebaseUI does not like.

dhoehl commented 4 months ago

This indeed fixes the problem for now, But I also could only use 20.7.0. With 21.0.0 the whole library crashes instantly. I won't close this issue, as it is only a workaround solution. The library itself should include the play-services dependency and handle the version correctly.

paulotaylor commented 3 months ago

Yeah, it does look like this project is very much stale nowadays. Nothing wrong with that, but it's pretty bad that Firebase still mentions Firebase UI in their documentation while it's obvious that the new version of the play-services-auth library completely breaks this.

ian-sayles commented 3 months ago

The iOS version is still being maintained so hopefully this will be updated soon.

mihaibarbulescu commented 3 months ago

I can confirm that the issue reproduces at my side as well.

Works on com.google.android.gms:play-services-auth:20.7.0 Crashes on com.google.android.gms:play-services-auth:21.1.0

If 21.1.0 is used, results Gradle sync issue: Failed to resolve: com.google.android.gms:play-services-auth:21.1.0

ShaiAlkoby commented 1 month ago

@thatfiredev any update on this? is anyone working on it or should we remove this dependency and implement it ourselves?

hkchakladar commented 1 month ago

Facing same issue. Looks like need to move on to other library or implement by ourselve.

Anyone have another library recommendation for phone auth only?