Closed ntflabsdev closed 2 weeks ago
This does not seem to be a problem with the plugin but with your build configuration. Without an error message (e.g. from Firebase Crashlytics) I can't help you any further (especially without reproduction).
This does not seem to be a problem with the plugin but with your build configuration. Without an error message (e.g. from Firebase Crashlytics) I can't help you any further (especially without reproduction).
when i am calling the FIrebaseAuthentication.signinwithPhoneNumber method then the listener doest give any response also it goes in then block and after that the listner doesn't work and also the app not crash it keeps on waiting the response from the listner.
here's my code pls check this
recaptchaVerifier.render().then((widgetId) => {
if (this.platform.is('ios') || this.platform.is('android')) {
Bugsnag.notify(new Error('inside phone auth'))
FirebaseAuthentication.signInWithPhoneNumber({
phoneNumber,
timeout: 3000,
})
.then(async () => {
FirebaseAuthentication.addListener('phoneCodeSent', (res) => {
Bugsnag.notify(new Error(`inside listener ${JSON.stringify(res)}`))
this.verificationId = { verificationId: res.verificationId };
verifyCode.next(true);
verifyCode.complete();
});
})
.catch((err) => {
console.log('cordova phone auth error ....', err);
Bugsnag.notify(new Error(`inside catch ${err.message}`))
verifyCode.next(false);
this.notificationService.failure(err.message);
verifyCode.complete();
});
You need to add the listener before calling signInWithPhoneNumber
.
You need to add the listener before calling
signInWithPhoneNumber
.You need to add the listener before calling
signInWithPhoneNumber
.
but it works fine on debug, when i try relase apk the listner doesnt works
You should fix it anyway. Apart from that, you only listen for the phoneCodeSent
. You should also listen for the phoneVerificationFailed
and phoneVerificationCompleted
events.
It looks like there hasn't been a reply in 30 days, so I'm closing this issue.
Plugin(s)
Version
6.1.2
Platform(s)
Current behavior
when i run my project in debug mode this plugin works but when i make a release build this method did't giving me any response also i have added try catch but its not going in catch part .
Here is my code phoneNumberSignin(phoneNumber: string, recaptchaVerifier: firebase.auth.RecaptchaVerifier) { const verifyCode = new BehaviorSubject(false);
}
Expected behavior
it should works same as works on debug
Reproduction
https://github.com/capawesome-team/capacitor-firebase.git
Steps to reproduce
Run this code first on debug it will. and then make and release build and run it on your android device
Other information
No response
Capacitor doctor
npx cap doctor
[warn] The bundledWebRuntime configuration option has been deprecated. Can be safely deleted. 💊 Capacitor Doctor 💊
Latest Dependencies:
@capacitor/cli: 6.1.2 @capacitor/core: 6.1.2 @capacitor/android: 6.1.2 @capacitor/ios: 6.1.2
Installed Dependencies:
@capacitor/cli: 5.7.8 @capacitor/android: 6.1.2 @capacitor/core: 6.1.2 @capacitor/ios: 5.7.8
[success] iOS looking great! 👌 [success] Android looking great! 👌
Before submitting