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

this.firebaseAuthentication.verifyPhoneNumber(...).then is not a function #57

Open
hdung912 opened this issue Mar 28, 2019 · 18 comments
Open

Comments

@hdung912
Copy link

hdung912 commented Mar 28, 2019

Hi All i did try using plugin but when i try call verifyPhoneNumber i have issues like above
signIn() {
this.firebaseAuthentication.verifyPhoneNumber("+123123", 30000).then((verificationId) => {

  console.log(verificationId);
});

}

@arghyaExicube
Copy link

did you get any solutions? i have facing the problem.

@Drmorph
Copy link

Drmorph commented Apr 8, 2019

same problem here

@venkateshwaranks1996
Copy link

Same issue

@lordonnance
Copy link

This error occurs to me when I'm debugging on browser.

On Android device it's running OK

@Drmorph
Copy link

Drmorph commented Apr 30, 2019

@lordonnance This error occurs to me when I'm on debug and on release IOS

@ironbone
Copy link

I get the same but with createUserWithEmailAndPassword

@mavilla-vishnu
Copy link

same problem...

@uzbekjon
Copy link

You will get this error in non-cordova environment such as browser (since this plugin does not have support for browser). You should not see this error when you run your app on a device.

@Sagun085
Copy link

Sagun085 commented Aug 1, 2019

Doesn't make any difference. I'm running it on my device and still the same error.
ERROR

@uzbekjon
Copy link

uzbekjon commented Aug 1, 2019

@Sagun085 read the warning message above the error. Seems like you did not install the plugin.

@Sagun085
Copy link

Sagun085 commented Aug 1, 2019

Nice catch @uzbekjon
Thanks, actually I was using the older version of cordova(8.0).
After updating Cordova from 8 to 9.0.0 and installing the plugins:

$ ionic cordova plugin add cordova-plugin-firebase-authentication
$ npm install @ionic-native/firebase-authentication

I could not build the app! it failed! tried multiple times!

errors

@qmonmert
Copy link

Same bug than @Sagun085 for me :(

@pkitatta
Copy link

pkitatta commented Sep 6, 2019

@Sagun085 same here. I get the error when I install the plugin, the error goes away when I remove the plugin. Did you get a work around?

@IngAjVillalon
Copy link

IngAjVillalon commented May 10, 2020

That is not a problem in itself of the plugin, but of its development logic.
Before executing any function of the plugin, you must be sure that cordova is running:

this.platform.ready().then(() => {
   if(this.platform.is('hybrid')) {
      this.firebaseAuthentication.verifyPhoneNumber(...)
         .then(...)
   }
});

I just made it work fine with no problem in Ionic 5.
My application runs very well with the login with Phone, Google, and Facebook.
It worked fine with Capacitor (v2) and Cordova (v9).

@ahsan-alii
Copy link

still having the same error
@IngAjVillalon can you please elaborate a bit how did you solved this issue ?

@DevNiklesh
Copy link

@IngAjVillalon I'm working with ionic-capacitor and I'm not receiving phone verification sms after generating signed apk. Could you help me with it?

@IngAjVillalon
Copy link

Ok, I'll make a demo and repository so It can help you.

@DevNiklesh
Copy link

@IngAjVillalon would love to see your demo!!... But I kinda solved the issue after scratching my head for 1 full day

To anyone facing similar issue like mine..

  • Note that SHA-1 key must match both in your firebase project as well as APK signature!

How to check it? (Incase, you are a rookie like me😅)

  • After generating Signed APK file.. open the key file using any keystore explorer software where you can find your SHA-1 key with which you had signed your app.
  • Now, head on to your project in firebase -->Project settings.. where you can provide that generated SHA-1 key for Android app

Also remember that you will receive SMS only after uploading in Google Store.. in order to test your app provide your testing number in Authentication-->sign in methods-->phone authentication

Glad to help.. incase I'm wrong.. kindly correct me!

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