capacitor-community / fcm

Enable Firebase Cloud Messaging for Capacitor apps
https://capacitor.ionicframework.com/docs/
MIT License
237 stars 83 forks source link

FCM Error: Please implement -messaging:didReceiveRegistrationToken: to be provided with an FCM token. #89

Closed Dave-Nandwa closed 2 years ago

Dave-Nandwa commented 2 years ago

Bug Description

Hi, I recently upgraded my project to Capacitor v3 and Firebase Messaging v2 and have tried everything to get through this bug, but keep running into this issue:

2021-08-30 23:27:48.104634+0300 App[641:103017] 8.6.1 - [Firebase/Messaging][I-FCM002023] **The object <FCMPlugin: 0x282cc8980> does not respond to -messaging:didReceiveRegistrationToken:. Please implement -messaging:didReceiveRegistrationToken: to be provided with an FCM token.**

Expected behavior A clear and concise description of what you expected to happen.

Firebase Messaging Should Initialize Correctly.

Desktop (please complete the following information):

My package.json file:

{
  "name": "My-Project",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "homepage": "https://ionicframework.com/",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^8.2.14",
    "@angular/common": "~11.2.0",
    "@angular/core": "~11.2.0",
    "@angular/fire": "^5.4.2",
    "@angular/forms": "~11.2.0",
    "@angular/platform-browser": "~11.2.0",
    "@angular/platform-browser-dynamic": "~11.2.0",
    "@angular/router": "~11.2.0",
    "@capacitor-community/barcode-scanner": "^2.0.0",
    "@capacitor-community/contacts": "^1.0.9",
    "@capacitor-community/fcm": "^2.0.0",
    "@capacitor/android": "^3.2.0",
    "@capacitor/clipboard": "^1.0.2",
    "@capacitor/core": "^3.2.0",
    "@capacitor/ios": "^3.2.0",
    "@capacitor/push-notifications": "^1.0.3",
    "@capacitor/share": "^1.0.3",
    "@capacitor/storage": "^1.0.3",
    "@ionic/angular": "^5.5.2",
    "@types/hammerjs": "^2.0.36",
    "apexcharts": "^3.27.1",
    "bootstrap": "^5.0.2",
    "country-codes-list": "^1.6.8",
    "firebase": "^7.10.0",
    "google-libphonenumber": "^3.2.11",
    "hammerjs": "^2.0.8",
    "ng-apexcharts": "^1.5.12",
    "qrcode-generator": "^1.4.4",
    "rxjs": "~6.6.0",
    "sweetalert2": "^10.16.9",
    "tslib": "^2.0.0",
    "zone.js": "~0.10.2"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.1102.4",
    "@angular-eslint/builder": "2.0.2",
    "@angular-eslint/eslint-plugin": "2.0.2",
    "@angular-eslint/eslint-plugin-template": "2.0.2",
    "@angular-eslint/template-parser": "2.0.2",
    "@angular/cli": "~11.2.4",
    "@angular/compiler": "~11.2.0",
    "@angular/compiler-cli": "~11.2.0",
    "@angular/language-service": "~11.2.0",
    "@capacitor/cli": "^3.2.0",
    "@ionic/angular-toolkit": "^3.1.1",
    "@types/jasmine": "~3.6.0",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "^12.11.1",
    "@typescript-eslint/eslint-plugin": "4.16.1",
    "@typescript-eslint/parser": "4.16.1",
    "eslint": "^7.6.0",
    "eslint-plugin-import": "2.22.1",
    "eslint-plugin-jsdoc": "30.7.6",
    "eslint-plugin-prefer-arrow": "1.2.2",
    "jasmine-core": "~3.6.0",
    "jasmine-spec-reporter": "~5.0.0",
    "karma": "~5.2.0",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage": "~2.0.3",
    "karma-coverage-istanbul-reporter": "~3.0.2",
    "karma-jasmine": "~4.0.0",
    "karma-jasmine-html-reporter": "^1.5.0",
    "protractor": "~7.0.0",
    "ts-node": "~8.3.0",
    "typescript": "~4.0.2"
  }
}
Dave-Nandwa commented 2 years ago

@danielprrazevedo @stewones

halomakes commented 2 years ago

Does this prevent notifications from working entirely? I'm not having any luck getting topic notifications to work with this library on iOS but I do see an FCM token provided to my capacitor app using the getToken method