cordova-plugin-fcm-with-dependecy-updated: TypeError: Cannot read property 'requestPushPermission' of undefined
Hey guys, I’m having this problem as well.
I’m using the setup() method like @andrehtissot and the imports like @elkhalifte. But the error is that firebase service is undefined.
const permission = await this.firebase.requestPushPermission()
TypeError: Cannot read property 'requestPushPermission' of undefined
_Originally posted by @tiagotrigger in https://github.com/andrehtissot/cordova-plugin-fcm-with-dependecy-updated/issues/113#issuecomment-656883810_
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 26 (14 by maintainers)
It was a very strange issue. But if you can keep it up-to-date with newer versions of cordova-android, you lower the risks of facing issues on newer devices.
Thank you very much @andrehtissot it is working now. And sorry for the trouble.
A summary of what was changed:
I created this repository: https://github.com/tiagotrigger/example-ionic5-cordova-plugin-fcm-updated
Sure here it is.
I’m getting an error when building my project. Using Angular 8 and Typescript 3.4.5.