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

Firebase Auth UI (Phone) not working with Full Mode R8 enable #2067

Closed ArcherEmiya05 closed 7 months ago

ArcherEmiya05 commented 1 year 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?

Yes

Step 2: Describe your environment

Step 3: Describe the problem:

With Android Studio Flamingo it seems that Full Mode R8 is enabled by default. Firebase Auth UI (Phone) cannot pass the captcha part even with test account when Full Mode R8 is not disable in gradle.properties.

# Disable R8 in full mode
android.enableR8.fullMode=false

Steps to reproduce:

  1. Use Android Studio Flamingo Canary 2
  2. Use Firebase Auth UI (Phone)
  3. Build and run the app

Observed Results:

Not working when Full Mode R8 is enabled

Expected Results:

Work with Full Mode R8, maybe a proguard rule is needed?

Relevant Code:

  [SmsRetrieverHelper] SMS verification code request failed: unknown status code: 17499 Instantiation of JsonResponse failed! class com.google.android.gms.internal.firebase-auth-api.zzzp
2022-10-04 01:44:05.312   475-475   AuthUI                  com.sample.app           E  A sign-in error occurred.
                                                                                                    com.google.firebase.FirebaseException: An internal error has occurred. [ Instantiation of JsonResponse failed! class com.google.android.gms.internal.firebase-auth-api.zzzp ]
                                                                                                        at com.google.android.gms.internal.firebase-auth-api.zzwe.zza(com.google.firebase:firebase-auth@@21.0.8:4)
                                                                                                        at com.google.android.gms.internal.firebase-auth-api.zzwy.zza(com.google.firebase:firebase-auth@@21.0.8:1)
                                                                                                        at com.google.android.gms.internal.firebase-auth-api.zzwz.run(com.google.firebase:firebase-auth@@21.0.8:3)
                                                                                                        at android.os.Handler.handleCallback(Handler.java:739)
                                                                                                        at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                                                        at android.os.Looper.loop(Looper.java:135)
                                                                                                        at android.app.ActivityThread.main(ActivityThread.java:5221)
                                                                                                        at java.lang.reflect.Method.invoke(Native Method)
                                                                                                        at java.lang.reflect.Method.invoke(Method.java:372)
                                                                                                        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
                                                                                                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
benoitletondor commented 1 year ago

Can confirm it still happens now that Flamingo is stable. Please fix that :pray:

kajfik commented 1 year ago

If you have recently upgraded to AGP 8.0 or if you have enabled android.enableR8.fullMode=true then this might fix it for you: https://github.com/firebase/firebase-android-sdk/issues/2124#issuecomment-920922929

benoitletondor commented 9 months ago

Why is it closed? @ArcherEmiya05

I don't see a release that supposedly fixes it.

benoitletondor commented 8 months ago

@ArcherEmiya05 hello ? This bug isn't fixed at all!

ArcherEmiya05 commented 8 months ago

Sorry, I closed it as I no longer experience this. @benoitletondor what is your AGP version?

benoitletondor commented 8 months ago

8.1.2

Note that I didn't re-check recently but since there was 0 change on this library is there a chance it can be fixed via AGP? I can run some tests if needed

ArcherEmiya05 commented 8 months ago

8.1.2

Note that I didn't re-check recently but since there was 0 change on this library is there a chance it can be fixed via AGP? I can run some tests if needed

I think the issue is either with AGP or Android Studio Flamingo, I used Iguana and Giraffe and I no longer experience such issue.

benoitletondor commented 8 months ago

Ok let me run some tests today and I'll get back to you

benoitletondor commented 8 months ago

Ok just tested and it seems to be working fine now, thanks a lot @ArcherEmiya05