(Slightly modified cross posting from https://github.com/arnesson/cordova-plugin-firebase/issues/689 as I did not yet get an answer there, maybe somebody here has an idea)
Hi,
I’m using the cordova-plugin-firebase plugin with the Ionic Native wrapper for it. I have a working app version online using cordova-plugin-firebase@^0.1.24.
After I updated several libraries (including ionic, ionic native and cordova) I had to recreate the iOS platform. I also updated to cordova-plugin-firebase@1.0.4 during that time. No changes of my own code.
Now, the app will not correctly start due to an exception thrown when I call
this.firebase.grantPermission()
.then(() => this.firebase.hasPermission)
.then((success) => {
if (success) {
this.registerForNotifications();
console.debug("Sucessfully got push notification permission");
} else {
console.debug("Failed to get push notification permission", success);
}
})
.catch((e) => {
console.error("Error when trying to get permission for Firebase: " + e, e);
});
It results in the catch() block while e is NULL.
I cannot find anything obvious in the devices system logs. Debugging shows that the cordova callback for firebase call is called with successful=false but without message.
Android works well (ok I don’t call grantPermission there )
I have no idea what could cause this now. Do you have any ideas?
It seems to work on emulator - not on device.
Also, downgrade to 0.1.25 brings the same issue I’m running out of ideas. The profile/certficate has Push enabled, the app capabilities for push are also enabled…
Any help appreciated!