andrehtissot / cordova-plugin-fcm-with-dependecy-updated

Google FCM Push Notifications Cordova Plugin
MIT License
210 stars 273 forks source link

TypeError: Cannot read property 'requestPushPermission' of undefined #158

Open metalvarez opened 3 years ago

metalvarez commented 3 years ago

I was testing the ionic 5 example project but is giving me this error, I know you had this issue closed but it seems it's now happening in your Ionic 5 example project. I also tested it in a fresh Ionic 5 installation and it's giving me the same error.

https://github.com/metalvarez/ionic-5-fcm-example.

ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'requestPushPermission' of undefined TypeError: Cannot read property 'requestPushPermission' of undefined at FCM.push../node_modules/cordova-plugin-fcm-with-dependecy-updated/ionic/ngx/FCM.js.FCM.requestPushPermission

andrehtissot commented 3 years ago
I ran your application (https://github.com/metalvarez/ionic-5-fcm-example) flawlessly: iOS Android

Would you share the output of the command npm list -g --depth=0 | cut -c 5- | grep -v .nvm/versions? There might be some global packages outdated, like cordova.