FirebaseUI-Android icon indicating copy to clipboard operation
FirebaseUI-Android copied to clipboard

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

Open dhoehl opened this issue 1 year ago • 11 comments

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?

  • For issues or feature requests related to the code in this repository file a GitHub issue.
  • For general technical questions, post a question on StackOverflow tagged appropriately.
  • For general Firebase discussion, use the firebase-talk google group
  • For help troubleshooting your application that does not fall under one of the above categories, reach out to the personalized Firebase support channel

Step 2: Describe your environment

  • Android device: _____
  • Android OS version: SDK34
  • Google Play Services version: _____
  • Firebase/Play Services SDK version: _____
  • FirebaseUI version: 8.0.2

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

dhoehl avatar Feb 21 '24 09:02 dhoehl

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

awesome-bhatti avatar Feb 26 '24 10:02 awesome-bhatti

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

dhoehl avatar Feb 26 '24 11:02 dhoehl

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

ArcherEmiya05 avatar Feb 27 '24 17:02 ArcherEmiya05

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

eMail

dhoehl avatar Feb 27 '24 19:02 dhoehl

@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.

ian-sayles avatar Mar 01 '24 12:03 ian-sayles

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.

dhoehl avatar Mar 01 '24 13:03 dhoehl

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.

paulotaylor avatar Mar 09 '24 21:03 paulotaylor

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

ian-sayles avatar Mar 11 '24 15:03 ian-sayles

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

mihaibarbulescu avatar Mar 15 '24 04:03 mihaibarbulescu

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

ShaiAlkoby avatar May 15 '24 06:05 ShaiAlkoby

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?

hkchakladar avatar May 16 '24 21:05 hkchakladar