Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PhoneAuthProvider.verifyPhoneNumber crash my app #2530

Closed
ValeraSetrakov opened this issue Mar 20, 2021 · 9 comments
Closed

PhoneAuthProvider.verifyPhoneNumber crash my app #2530

ValeraSetrakov opened this issue Mar 20, 2021 · 9 comments

Comments

@ValeraSetrakov
Copy link

ValeraSetrakov commented Mar 20, 2021

[READ] Step 1: Are you in the right place?

Issues filed here should be about bugs in the code in this repository.
If you have a general question, need help debugging, or fall into some
other category use one of these other channels:

For general technical questions, post a question on StackOverflow
with the firebase tag.
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.

[REQUIRED] Step 2: Describe your environment

  • Android Studio version: 4.1.1
  • Firebase Component: Authentication
  • Component version: 20.0.3

[REQUIRED] Step 3: Describe the problem

I have problem with phone authentication, after start authentication my app is crash

it happens only for release build type

Steps to reproduce:

I just called PhoneAuthProvider.verifyPhoneNumber(options)
log with error

java.lang.RuntimeException: Unable to resume activity {com.wiby.android.app/com.google.firebase.auth.internal.RecaptchaActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.android.gms.internal.firebase-auth-api.zzau com.google.android.gms.internal.firebase-auth-api.zzds.zza()' on a null object reference
 at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4270)
 at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4302)
 at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52)
 at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
 at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
 at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2044)
 at android.os.Handler.dispatchMessage(Handler.java:107)
 at android.os.Looper.loop(Looper.java:224)
 at android.app.ActivityThread.main(ActivityThread.java:7562)
 at java.lang.reflect.Method.invoke(Native Method)
 at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.android.gms.internal.firebase-auth-api.zzau com.google.android.gms.internal.firebase-auth-api.zzds.zza()' on a null object reference
 at com.google.firebase.auth.internal.zzk.zzb(com.google.firebase:firebase-auth@@20.0.3:2)
 at com.google.firebase.auth.internal.RecaptchaActivity.zzd(com.google.firebase:firebase-auth@@20.0.3:10)
 at com.google.android.gms.internal.firebase-auth-api.zztw.<init>(com.google.firebase:firebase-auth@@20.0.3:13)
 at com.google.firebase.auth.internal.RecaptchaActivity.onResume(com.google.firebase:firebase-auth@@20.0.3:43)
 at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1454)
 at android.app.Activity.performResume(Activity.java:8050)
 at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4260)

Relevant Code:

my method

private fun requestCode(phoneNumber: String) {
        viewModel.startLoading()
        val options = PhoneAuthOptions.newBuilder(Firebase.auth)
            .setPhoneNumber(phoneNumber)
            .setTimeout(screenArgs?.timer?.second?.toLong() ?: 0, TimeUnit.SECONDS)
            .setActivity(requireActivity())
            .setCallbacks(WibyOnVerificationStateChangedCallbacks())
            .build()
        PhoneAuthProvider.verifyPhoneNumber(options)
    }

my release build type

release {
            minifyEnabled false
            signingConfig signingConfigs.release
}

my dependencies

implementation "androidx.browser:browser:1.3.0"
implementation platform("com.google.firebase:firebase-bom:26.7.0")
implementation 'com.google.firebase:firebase-auth-ktx'

@google-oss-bot
Copy link
Contributor

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

@malcolmdeck
Copy link
Contributor

Looks like a problem with the usage of AndroidKeysetManager in the SDK. I'll figure out what's going on

@malcolmdeck
Copy link
Contributor

I think I've found and fixed the culprit. I've filed b/183415315 internally, and it should come out in the next release.

@aguatno aguatno added the type: bug Something isn't working label Mar 23, 2021
@ValeraSetrakov
Copy link
Author

@malcolmdeck thanks!) Can you suggest an approximate release date?

@aguatno
Copy link

aguatno commented Apr 12, 2021

Hi @ValeraSetrakov it seems the fix has been released in the new version of Firebase Auth SDK 20.0.4, see release notes .

Can you try to upgrade to a newer Auth version to see if the problem persists?

Thanks

@google-oss-bot
Copy link
Contributor

Hey @ValeraSetrakov. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

@ValeraSetrakov
Copy link
Author

Hello, i will check it soon, thx for helping!

@google-oss-bot
Copy link
Contributor

Hey @ValeraSetrakov. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

@google-oss-bot
Copy link
Contributor

Since there haven't been any recent updates here, I am going to close this issue.

@ValeraSetrakov if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

@firebase firebase locked and limited conversation to collaborators Jun 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants