Skip to content
This repository has been archived by the owner. It is now read-only.

bug: hard crash after calling signInWithPhoneNumber #134

Closed
simonpeters opened this issue Feb 17, 2022 · 1 comment
Closed

bug: hard crash after calling signInWithPhoneNumber #134

simonpeters opened this issue Feb 17, 2022 · 1 comment

Comments

@simonpeters
Copy link

simonpeters commented Feb 17, 2022

Plugin version:
0.4.1

Platform(s):
Android

Current behavior:
App crashes after calling signInWithPhoneNumber. It's a hard crash where the app shuts down. I pasted the logCat logs below.

Steps to reproduce:

const { verificationId } = await FirebaseAuthentication.signInWithPhoneNumber(
      {
        phoneNumber: phoneNr
      }
    );

Other information:

 Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void dev.robingenz.capacitorjs.plugins.firebase.auth.handlers.PhoneAuthProviderHandler.signIn(com.getcapacitor.PluginCall)' on a null object reference
        at dev.robingenz.capacitorjs.plugins.firebase.auth.FirebaseAuthentication.signInWithPhoneNumber(FirebaseAuthentication.java:118)
        at dev.robingenz.capacitorjs.plugins.firebase.auth.FirebaseAuthenticationPlugin.signInWithPhoneNumber(FirebaseAuthenticationPlugin.java:104)
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.getcapacitor.PluginHandle.invoke(PluginHandle.java:121) 
        at com.getcapacitor.Bridge.lambda$callPluginMethod$0$Bridge(Bridge.java:592) 
        at com.getcapacitor.-$$Lambda$Bridge$25SFHybyAQk7zS27hTVXh2p8tmw.run(Unknown Source:8) 
        at android.os.Handler.handleCallback(Handler.java:938) 
        at android.os.Handler.dispatchMessage(Handler.java:99) 
        at android.os.Looper.loop(Looper.java:250) 
        at android.os.HandlerThread.run(HandlerThread.java:67) 

Capacitor doctor:

    Latest Dependencies:
    
      @capacitor/cli: 3.4.1
      @capacitor/core: 3.4.1
      @capacitor/android: 3.4.1
      @capacitor/ios: 3.4.1
    
    Installed Dependencies:
    
      @capacitor/cli: 3.4.1
      @capacitor/core: 3.4.1
      @capacitor/android: 3.4.1
      @capacitor/ios: 3.4.1
@simonpeters
Copy link
Author

For anyone else running into this problem. it was caused by not setting up my providers properly in capacitor.config.json

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

No branches or pull requests

1 participant