Push notification is not receving

@vladimir-upirov - I have sent another project folder with few modifications, once check and setup the folder, Reply us for any things related that and expecting results for that issue ASAP.

Hi @rajasekhar_puligadda
unfortunately I could not run project you provided,
firstly, I got error:

    [09:53:43]  typescript: src/app/app.module.ts, line: 13 
            Cannot find module '@ionic-native/local-notifications'. 

      L12:  import { Push } from '@ionic-native/push';
      L13:  import { LocalNotifications } from '@ionic-native/local-notifications';

I’ve installed: ‘@ionic-native/local-notifications’
and then I get:

[09:58:47]  typescript: src/app/app.module.ts, line: 17 
            Argument of type '{ declarations: (typeof PushNotificationsPage | typeof HomePage | typeof MyApp)[]; 
            imports: (Modu...' is not assignable to parameter of type 'NgModule'. Types of property 'providers' are 
            incompatible. Type '(typeof SplashScreen | typeof Device | typeof Push | LocalNotificationsOriginal | { 
            provide: type...' is not assignable to type 'Provider[]'. Type 'typeof SplashScreen | typeof Device | typeof 
            Push | LocalNotificationsOriginal | { provide: typeo...' is not assignable to type 'Provider'. Type 
            'LocalNotificationsOriginal' is not assignable to type 'Provider'. Type 'LocalNotificationsOriginal' is not 
            assignable to type 'ClassProvider'. Property 'provide' is missing in type 'LocalNotificationsOriginal'. 

      L17:  @NgModule({                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
      L18:    declarations: [

[09:58:47]  typescript: src/pages/push-notifications/push-notifications.ts, line: 36 
            Cannot find name 'LocalNotifications'. 

      L35:  private push: Push,
      L36:  private localNotifications: LocalNotifications,
      L37:  private platform: Platform) {

Regards, Vlad

First uninstall that and Install as in above link

can we keep in chat regarding issues for project setup via any chat platform?

not sure, private chat is available only with customers of PRO or Manage installations

now I get this:

Valodyas-MBP-2:pushnotification valodyaupirov$ ionic cordova plugin add cordova-plugin-local-notification
> cordova plugin add cordova-plugin-local-notification
Installing "cordova-plugin-local-notification" for android
Plugin dependency "cordova-plugin-device@1.1.4" already fetched, using that version.
Dependent plugin "cordova-plugin-device" already installed on android.
Plugin dependency "cordova-plugin-badge@0.8.8" already fetched, using that version.
Installing "cordova-plugin-badge" for android
Android Studio project detected
Error during processing of action! Attempting to revert...
Failed to install 'cordova-plugin-badge': CordovaError: Uh oh!
"/DATA/dev/pushnotification/platforms/android/app/src/main/java/de/appplant/cordova/plugin/badge/Badge.java" already exists!
    at copyNewFile (/DATA/dev/pushnotification/platforms/android/cordova/lib/pluginHandlers.js:259:45)
    at install (/DATA/dev/pushnotification/platforms/android/cordova/lib/pluginHandlers.js:43:17)
    at ActionStack.process (/DATA/dev/pushnotification/platforms/android/cordova/node_modules/cordova-common/src/ActionStack.js:56:25)
    at PluginManager.doOperation (/DATA/dev/pushnotification/platforms/android/cordova/node_modules/cordova-common/src/PluginManager.js:114:20)
    at PluginManager.addPlugin (/DATA/dev/pushnotification/platforms/android/cordova/node_modules/cordova-common/src/PluginManager.js:144:17)
    at /DATA/dev/pushnotification/platforms/android/cordova/Api.js:247:74
    at _fulfilled (/DATA/dev/pushnotification/platforms/android/cordova/node_modules/q/q.js:834:54)
    at /DATA/dev/pushnotification/platforms/android/cordova/node_modules/q/q.js:863:30
    at Promise.promise.promiseDispatch (/DATA/dev/pushnotification/platforms/android/cordova/node_modules/q/q.js:796:13)
    at /DATA/dev/pushnotification/platforms/android/cordova/node_modules/q/q.js:556:49
Failed to install 'cordova-plugin-local-notification': CordovaError: Uh oh!
"/DATA/dev/pushnotification/platforms/android/app/src/main/java/de/appplant/cordova/plugin/badge/Badge.java" already exists!
    at copyNewFile (/DATA/dev/pushnotification/platforms/android/cordova/lib/pluginHandlers.js:259:45)
    at install (/DATA/dev/pushnotification/platforms/android/cordova/lib/pluginHandlers.js:43:17)
    at ActionStack.process (/DATA/dev/pushnotification/platforms/android/cordova/node_modules/cordova-common/src/ActionStack.js:56:25)
    at PluginManager.doOperation (/DATA/dev/pushnotification/platforms/android/cordova/node_modules/cordova-common/src/PluginManager.js:114:20)
    at PluginManager.addPlugin (/DATA/dev/pushnotification/platforms/android/cordova/node_modules/cordova-common/src/PluginManager.js:144:17)
    at /DATA/dev/pushnotification/platforms/android/cordova/Api.js:247:74
    at _fulfilled (/DATA/dev/pushnotification/platforms/android/cordova/node_modules/q/q.js:834:54)
    at /DATA/dev/pushnotification/platforms/android/cordova/node_modules/q/q.js:863:30
    at Promise.promise.promiseDispatch (/DATA/dev/pushnotification/platforms/android/cordova/node_modules/q/q.js:796:13)
    at /DATA/dev/pushnotification/platforms/android/cordova/node_modules/q/q.js:556:49
Uh oh!
"/DATA/dev/pushnotification/platforms/android/app/src/main/java/de/appplant/cordova/plugin/badge/Badge.java" already exists!
[ERROR] An error occurred while running subprocess cordova.
        
        cordova plugin add cordova-plugin-local-notification exited with exit code 1.
        
        Re-running this command with the --verbose flag may provide more information.
Valodyas-MBP-2:pushnotification valodyaupirov$ 

please provide us a working project with installed all the modules and plugins, so we can just run:

  • “npm i”
  • and then “npm start”

Actually we have sent the project folder with installation of modules, we think you no need to install module. We need to install ionic 3 and angular 6 in your local system

I get your latest zip archive and did the following:

  • unzip

  • npm i

  • npm run ionic:serve

  • then I got started to receive errors

  • then I’ve installed npm install -g ionic@latest

  • and tried to install ionic cordova plugin add cordova-plugin-local-notification

as you can see I’ve followed your instructions

  • Actually you need to install ionic 3 version not the latest
  • You need to run as : “ionic serve”
  • In the project folder contains with plugin installations

still doesn’t work

Valodyas-MBP-2:pushnotification valodyaupirov$ npm un ionic -g
removed 224 packages in 2.38s

Valodyas-MBP-2:pushnotification valodyaupirov$ npm install -g ionic@3
npm WARN deprecated superagent@3.8.3: Please note that v5.0.1+ of superagent removes User-Agent header by default, therefore you may need to add it yourself (e.g. GitHub blocks requests without a User-Agent header).  This notice will go away with v5.0.2+ once it is released.
/Users/valodyaupirov/.nvm/versions/node/v10.15.3/bin/ionic -> /Users/valodyaupirov/.nvm/versions/node/v10.15.3/lib/node_modules/ionic/bin/ionic

> fsevents@1.2.9 install /Users/valodyaupirov/.nvm/versions/node/v10.15.3/lib/node_modules/ionic/node_modules/fsevents
> node install

node-pre-gyp WARN Using needle for node-pre-gyp https download 
[fsevents] Success: "/Users/valodyaupirov/.nvm/versions/node/v10.15.3/lib/node_modules/ionic/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" is installed via remote
+ ionic@3.20.1
added 453 packages from 243 contributors in 12.882s

Valodyas-MBP-2:pushnotification valodyaupirov$ ionic serve
Starting app-scripts server: --address 0.0.0.0 --port 8100 --livereload-port 35729 --dev-logger-port 53703 --nobrowser - 
Ctrl+C to cancel
[12:11:30]  watch started ... 
[12:11:30]  build dev started ... 
[12:11:30]  clean started ... 
[12:11:30]  clean finished in 5 ms 
[12:11:30]  copy started ... 
[12:11:30]  deeplinks started ... 
[12:11:30]  deeplinks finished in 48 ms 
[12:11:30]  transpile started ... 
[12:11:34]  typescript: src/app/app.module.ts, line: 13 
            Cannot find module '@ionic-native/local-notifications'. 

      L12:  import { Push } from '@ionic-native/push';
      L13:  import { LocalNotifications } from '@ionic-native/local-notifications';

[12:11:34]  typescript: src/pages/push-notifications/push-notifications.ts, line: 6 
            Cannot find module '@ionic-native/local-notifications'. 

       L5:  import { Push, PushObject, PushOptions } from '@ionic-native/push';
       L6:  import { LocalNotifications } from '@ionic-native/local-notifications';
       L7:  import { HttpClient, HttpHeaders } from "@angular/common/http";

[12:11:34]  dev server running: http://localhost:8100/ 

[OK] Development server running!
     Local: http://localhost:8100
     External: http://192.168.1.118:8100
     DevApp: pushnotification@8100 on Valodyas-MBP-2

[12:11:34]  copy finished in 3.54 s 
[12:11:34]  watch ready in 3.59 s 
^C

Valodyas-MBP-2:pushnotification valodyaupirov$ ionic cordova plugin add cordova-plugin-local-notification
> cordova plugin add cordova-plugin-local-notification --save
Installing "cordova-plugin-local-notification" for android

Plugin dependency "cordova-plugin-device@1.1.4" already fetched, using that version.

Dependent plugin "cordova-plugin-device" already installed on android.

Plugin dependency "cordova-plugin-badge@0.8.8" already fetched, using that version.

Installing "cordova-plugin-badge" for android
Android Studio project detected

Error during processing of action! Attempting to revert...

Failed to install 'cordova-plugin-badge': CordovaError: Uh oh!
"/DATA/dev/pushnotification/platforms/android/app/src/main/java/de/appplant/cordova/plugin/badge/Badge.java" already exists!
    at copyNewFile (/DATA/dev/pushnotification/platforms/android/cordova/lib/pluginHandlers.js:259:45)
    at install (/DATA/dev/pushnotification/platforms/android/cordova/lib/pluginHandlers.js:43:17)
    at ActionStack.process (/DATA/dev/pushnotification/platforms/android/cordova/node_modules/cordova-common/src/ActionStack.js:56:25)
    at PluginManager.doOperation (/DATA/dev/pushnotification/platforms/android/cordova/node_modules/cordova-common/src/PluginManager.js:114:20)
    at PluginManager.addPlugin (/DATA/dev/pushnotification/platforms/android/cordova/node_modules/cordova-common/src/PluginManager.js:144:17)
    at /DATA/dev/pushnotification/platforms/android/cordova/Api.js:247:74
    at _fulfilled (/DATA/dev/pushnotification/platforms/android/cordova/node_modules/q/q.js:834:54)
    at /DATA/dev/pushnotification/platforms/android/cordova/node_modules/q/q.js:863:30
    at Promise.promise.promiseDispatch (/DATA/dev/pushnotification/platforms/android/cordova/node_modules/q/q.js:796:13)
    at /DATA/dev/pushnotification/platforms/android/cordova/node_modules/q/q.js:556:49

Failed to install 'cordova-plugin-local-notification': CordovaError: Uh oh!
"/DATA/dev/pushnotification/platforms/android/app/src/main/java/de/appplant/cordova/plugin/badge/Badge.java" already exists!
    at copyNewFile (/DATA/dev/pushnotification/platforms/android/cordova/lib/pluginHandlers.js:259:45)
    at install (/DATA/dev/pushnotification/platforms/android/cordova/lib/pluginHandlers.js:43:17)
    at ActionStack.process (/DATA/dev/pushnotification/platforms/android/cordova/node_modules/cordova-common/src/ActionStack.js:56:25)
    at PluginManager.doOperation (/DATA/dev/pushnotification/platforms/android/cordova/node_modules/cordova-common/src/PluginManager.js:114:20)
    at PluginManager.addPlugin (/DATA/dev/pushnotification/platforms/android/cordova/node_modules/cordova-common/src/PluginManager.js:144:17)
    at /DATA/dev/pushnotification/platforms/android/cordova/Api.js:247:74
    at _fulfilled (/DATA/dev/pushnotification/platforms/android/cordova/node_modules/q/q.js:834:54)
    at /DATA/dev/pushnotification/platforms/android/cordova/node_modules/q/q.js:863:30
    at Promise.promise.promiseDispatch (/DATA/dev/pushnotification/platforms/android/cordova/node_modules/q/q.js:796:13)
    at /DATA/dev/pushnotification/platforms/android/cordova/node_modules/q/q.js:556:49

Uh oh!
"/DATA/dev/pushnotification/platforms/android/app/src/main/java/de/appplant/cordova/plugin/badge/Badge.java" already exists!
[ERROR] An error occurred while running cordova plugin add cordova-plugin-local-notification --save (exit code 1).
        
Valodyas-MBP-2:pushnotification valodyaupirov$

npm install ionic@3.9.2

try above one

after installing 3.9.2 I have the same error

Once check “ionic -v” to get ionic version

Valodyas-MBP-2:pushnotification valodyaupirov$ ionic -v
3.9.2
Valodyas-MBP-2:pushnotification valodyaupirov$

while running “ionic serve”, which error you are getting?

please check my previous comments

[12:11:34] typescript: src/app/app.module.ts, line: 13
Cannot find module ‘@ionic-native/local-notifications’.

  L12:  import { Push } from '@ionic-native/push';
  L13:  import { LocalNotifications } from '@ionic-native/local-notifications';

[12:11:34] typescript: src/pages/push-notifications/push-notifications.ts, line: 6
Cannot find module ‘@ionic-native/local-notifications’.

   L5:  import { Push, PushObject, PushOptions } from '@ionic-native/push';
   L6:  import { LocalNotifications } from '@ionic-native/local-notifications';
   L7:  import { HttpClient, HttpHeaders } from "@angular/common/http";

[12:11:34] dev server running: http://localhost:8100/

[OK] Development server running!
Local: http://localhost:8100
External: http://192.168.1.118:8100
DevApp: pushnotification@8100 on Valodyas-MBP-2

[12:11:34] copy finished in 3.54 s
[12:11:34] watch ready in 3.59 s

this one?

which project folder did you take updated or old?

I use the latest one you sent us

did you install local notifications plugin as per “https://ionicframework.com/docs/v3/native/local-notifications/”?

once run “ionic serve” again and check once