6.1.2
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);
// Ensure the reCAPTCHA is rendered before calling signInWithPhoneNumber
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();
});
} else {
signInWithPhoneNumber(auth, phoneNumber, recaptchaVerifier)
.then((res) => {
this.verificationId = res;
this.confirmationResult = res;
//alert(`Verification code sent: ${res}`);
verifyCode.next(true);
})
.catch((err) => {
verifyCode.next(false);
console.log('phone auth error ....', err);
this.notificationService.failure(err.message);
})
.finally(() => {
verifyCode.complete();
});
}
}).catch((err) => {
console.log('reCAPTCHA rendering error: ', err);
this.notificationService.failure(err.message);
});
return verifyCode.asObservable();
}
it should works same as works on debug
https://github.com/capawesome-team/capacitor-firebase.git
Run this code first on debug it will. and then make and release build and run it on your android device
No response
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! π
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too