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

App Crashed #14

Open
hamza0786 opened this issue Jan 2, 2023 · 2 comments
Open

App Crashed #14

hamza0786 opened this issue Jan 2, 2023 · 2 comments

Comments

@hamza0786
Copy link

Anyone plz help me to fix this issue.every time i run app in emulator and then click on get otp button the app got crashed.

D/AndroidRuntime: Shutting down VM
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.paksoft.letschat, PID: 13286
java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.content.Context.getApplicationContext()' on a null object reference
at android.content.ContextWrapper.getApplicationContext(ContextWrapper.java:122)
at androidx.localbroadcastmanager.content.LocalBroadcastManager.getInstance(LocalBroadcastManager.java:107)
at com.google.firebase.auth.internal.zzap.zza(com.google.firebase:firebase-auth@@20.0.0:18)
at com.google.firebase.auth.internal.zzap.zza(com.google.firebase:firebase-auth@@20.0.0:8)
at com.google.firebase.auth.internal.zza.zza(com.google.firebase:firebase-auth@@20.0.0:45)
at com.google.firebase.auth.internal.zza.zza(com.google.firebase:firebase-auth@@20.0.0:57)
at com.google.firebase.auth.internal.zzc.onFailure(com.google.firebase:firebase-auth@@20.0.0:3)
at com.google.android.gms.tasks.zzl.run(Unknown Source:4)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7664)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

@a914-gowtham
Copy link
Owner

hey @hamza0786 check this issue #10

@hamza0786
Copy link
Author

its same as it is but the app still crashed when click on get otp:

fun setMobile(country: Country, mobile: String) {
Timber.v("Mobile $mobile")
val number = country.noCode + " " + mobile
val options = PhoneAuthOptions.newBuilder(auth)
.setPhoneNumber(number)
.setTimeout(60L, TimeUnit.SECONDS)
.setActivity(actContxt)
.setCallbacks(this)
.build()
PhoneAuthProvider.verifyPhoneNumber(options)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants