Reputation: 1361
I am having issues trying to use Onesignal for Ionic because I am getting the following error regarding FCM plugin which I attempted to use for notifications before :
UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: cordova-plugin-fcm: You have installed platform android but file 'google-services.json' was not found in your Cordova project root folder.
(node:13416) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I want to try and remove the FCM plugin entirely and see if that fixes it, however I am unable to do so.
When I run sudo cordova plugin
I see the following for FCM:
cordova-plugin-fcm 2.1.2 "FCMPlugin
I have tried to remove by doing sudo cordova plugin remove FCM
and sudo cordova plugin remove cordova-plugin-fcm 2.1.2 "FCMPlugin"
but neither works
Upvotes: 1
Views: 5318
Reputation: 727
If the above solution didn't work and you got any unhandled promise rejection then try to follow steps : 1. Clean the Cordova project
cordova clean
cordova platform remove android/ios
3.Then remove plugin
cordova plugin remove <plugin name>
It worked for me.
Upvotes: 3
Reputation: 10626
Try cordova plugin rm cordova-plugin-fcm --force
other wise just download the google-services.json file from Firebase and place it in the root of your project and try again.
Upvotes: 2