cordova-plugin-local-notifications icon indicating copy to clipboard operation
cordova-plugin-local-notifications copied to clipboard

Object(...) is not a function exception

Open derweise opened this issue 3 years ago • 1 comments

I got this error after i call any method (such as clearAll or schedule) on localNotifications plugin.

Your Environment

  • Plugin version: 0.9.0-beta.2
  • Platform: browser
  • OS version: Catalina Mac 10.15.4
  • Device manufacturer / model: Apple
  • Cordova version (cordova -v): 10.0.0
  • Cordova platform version (cordova platform ls): 6.0.0 Installed platforms: android 8.1.0 browser ios 5.1.1
  • Plugin config
  • Ionic Version (if using Ionic): 5.4.16

Expected Behavior

.clearAll() method should be called correctly.

Actual Behavior

Exception: Object(…) is not a function

Steps to Reproduce

package.json:

{
  "name": "news",
  "version": "0.0.2",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "start": "ionic-app-scripts serve",
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "lint": "ionic-app-scripts lint",
    "browser": "ionic-app-scripts serve --sourceMap source-map --iscordovaserve --wwwDir platforms/browser/www/ --buildDir platforms/browser/www/build"
  },
  "dependencies": {
    "@angular/animations": "6.0.9",
    "@angular/common": "6.0.9",
    "@angular/compiler": "6.0.9",
    "@angular/compiler-cli": "6.0.9",
    "@angular/core": "6.0.9",
    "@angular/forms": "6.0.9",
    "@angular/http": "6.0.9",
    "@angular/platform-browser": "6.0.9",
    "@angular/platform-browser-dynamic": "6.0.9",
    "@capacitor/core": "2.4.8",
    "@capacitor/ios": "^2.0.1",
    "@ionic-native/admob-free": "^4.17.0",
    "@ionic-native/core": "~4.15.0",
    "@ionic-native/deeplinks": "^4.18.0",
    "@ionic-native/file": "^4.20.0",
    "@ionic-native/geolocation": "^4.20.0",
    "@ionic-native/local-notifications": "^5.34.0",
    "@ionic-native/onesignal": "^4.18.0",
    "@ionic-native/screenshot": "^5.31.1",
    "@ionic-native/social-sharing": "^4.20.0",
    "@ionic-native/splash-screen": "~4.15.0",
    "@ionic-native/status-bar": "~4.15.0",
    "@ionic/storage": "2.2.0",
    "com.darktalker.cordova.screenshot": "^0.1.6",
    "cordova": "^9.0.0",
    "cordova-android": "^8.1.0",
    "cordova-browser": "^6.0.0",
    "cordova-ios": "5.1.1",
    "cordova-plugin-device": "^2.0.3",
    "cordova-plugin-file": "^6.0.2",
    "cordova-plugin-geolocation": "^4.1.0",
    "cordova-plugin-ionic-keyboard": "^2.2.0",
    "cordova-plugin-ionic-webview": "^4.1.3",
    "cordova-plugin-local-notification": "^0.9.0-beta.2",
    "cordova-plugin-splashscreen": "^5.0.3",
    "cordova-plugin-statusbar": "^2.4.3",
    "cordova-plugin-whitelist": "^1.3.4",
    "cordova-plugin-x-socialsharing": "^5.6.5",
    "es6-promise-plugin": "^4.2.2",
    "g": "^2.0.1",
    "ionic": "^5.4.16",
    "ionic-angular": "3.9.2",
    "ionic-plugin-deeplinks": "^1.0.20",
    "ionicons": "3.0.0",
    "onesignal-cordova-plugin": "^2.9.0",
    "rxjs": "6.2.2",
    "rxjs-compat": "6.2.2",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.26"
  },
  "devDependencies": {
    "@capacitor/cli": "2.4.8",
    "@ionic/app-scripts": "^3.2.1",
    "@ionic/lab": "^1.0.14",
    "typescript": "~2.7.2"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-plugin-whitelist": {},
      "cordova-plugin-statusbar": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {
        "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
      },
      "cordova-plugin-ionic-keyboard": {},
      "onesignal-cordova-plugin": {},
      "ionic-plugin-deeplinks": {
        "URL_SCHEME": "xyz",
        "DEEPLINK_SCHEME": "https",
        "DEEPLINK_HOST": "xyz.xyz.de",
        "ANDROID_PATH_PREFIX": "/",
        "ANDROID_2_PATH_PREFIX": "/",
        "ANDROID_3_PATH_PREFIX": "/",
        "ANDROID_4_PATH_PREFIX": "/",
        "ANDROID_5_PATH_PREFIX": "/",
        "DEEPLINK_2_SCHEME": " ",
        "DEEPLINK_2_HOST": " ",
        "DEEPLINK_3_SCHEME": " ",
        "DEEPLINK_3_HOST": " ",
        "DEEPLINK_4_SCHEME": " ",
        "DEEPLINK_4_HOST": " ",
        "DEEPLINK_5_SCHEME": " ",
        "DEEPLINK_5_HOST": " "
      },
      "cordova-plugin-file": {},
      "cordova-plugin-x-socialsharing": {
        "ANDROID_SUPPORT_V4_VERSION": "24.1.1+",
        "PHOTO_LIBRARY_ADD_USAGE_DESCRIPTION": "This app requires photo library access to function properly.",
        "PHOTO_LIBRARY_USAGE_DESCRIPTION": "This app requires photo library access to function properly."
      },
      "com.darktalker.cordova.screenshot": {},
      "cordova-plugin-geolocation": {
        "GPS_REQUIRED": "true"
      },
      "cordova-plugin-local-notification": {}
    },
    "platforms": [
      "android",
      "ios",
      "browser"
    ]
  }
}

import { LocalNotifications } from '@ionic-native/local-notifications/ngx';

derweise avatar Jul 29 '21 21:07 derweise

Any help?

derweise avatar Aug 28 '21 20:08 derweise