question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

FCM - Device didn't receive the notifications

See original GitHub issue

//CLIENT

Push.Configure({
    android: {
        senderID: 868568106378,
        alert: true,
        badge: true,
        sound: true,
        vibrate: true,
        clearNotifications: true
  }
});

//SERVER

Push.Configure({
    gcm: {
        apiKey: 'AAAAyjqxhYo:APA91bH3Yj93jgVg51Vkww5e_jRCt9wq19Rvq-kD6k6hCKIw2EyXEl4zlfc9KG6GeLAGkg5dzpooruwmET3YevS3MODi1LKAV3SUvVwd6XwLSvmI_in3kHfaAiw57rMLf1cq2xaUh43H',
        projectNumber: 868568106378
    }
});
Meteor.methods({
    serverNotification: function() {
        Push.send({
            from: 'push',
            title: 'Hello',
            text: 'World',
            badge: 12,
            query: {}
        });
    }
});

Meteor list

autopublish                                            1.0.7  (For prototyping only) Publish the entire database to all...
blaze-html-templates                                   1.0.5* Compile HTML templates into reactive UI with Meteor Blaze
cordova:cordova-plugin-device                          1.1.3
cordova:de.appplant.cordova.plugin.local-notification  0.8.4
cordova:org.apache.cordova.dialogs                     1.2.1
cordova:org.apache.cordova.vibration                   2.1.1
cordova:phonegap-plugin-push                           1.5.2
ecmascript                                             0.6.1* Compiler plugin that supports ES2015+ in all .js files
es5-shim                                               4.6.15  Shims and polyfills to improve ECMAScript 5 support
http                                                   1.1.8* Make HTTP calls to remote servers
insecure                                               1.0.7  (For prototyping only) Allow all database writes from the...
jquery                                                 1.11.10  Manipulate the DOM using CSS selectors
meteor-base                                            1.0.4  Packages that every Meteor app needs
mobile-experience                                      1.0.4  Packages for a great mobile user experience
mongo                                                  1.1.14* Adaptor for using MongoDB and Minimongo over DDP
raix:push                                              3.0.2  Isomorphic Push notifications for APN and GCM
reactive-var                                           1.0.11  Reactive variable
shell-server                                           0.2.1* Server-side component of the `meteor shell` command.
standard-minifier-css                                  1.3.2* Standard css minifier used with Meteor apps by default.
standard-minifier-js                                   1.2.1* Standard javascript minifiers used with Meteor apps by de...
tracker                                                1.1.1* Dependency tracker to allow reactive callbacks

//COMMAND meteor run android-device --mobile-server 192.168.2.50:3000

//CONSOLE OUTPUT

I20170214-10:22:53.726(7)? Push: Got push token from app: { id: 'FdYPSY84aHWWogKoJ',
I20170214-10:22:53.727(7)?   token: { gcm: 'e4QnQnhANZg:APA91bGTAZGudROhSjhhM23mnbusFASLjx-pPbkqD9O_28VLVX-v2SP7TaM0eERfT2KalXfSC9X9BSfp9ae5xUKMUaaWFWBQLfa9C0nxWBbdDmzP8hwupYiob6UWV2xNtIPuqIhZwIYF' },
I20170214-10:22:53.731(7)?   appName: 'main',
I20170214-10:22:53.732(7)?   userId: null,
I20170214-10:22:53.733(7)?   metadata: {} }
I20170214-10:22:53.760(7)? Push: updated { _id: 'FdYPSY84aHWWogKoJ',
I20170214-10:22:53.762(7)?   token: { gcm: 'e4QnQnhANZg:APA91bGTAZGudROhSjhhM23mnbusFASLjx-pPbkqD9O_28VLVX-v2SP7TaM0eERfT2KalXfSC9X9BSfp9ae5xUKMUaaWFWBQLfa9C0nxWBbdDmzP8hwupYiob6UWV2xNtIPuqIhZwIYF' },
I20170214-10:22:53.763(7)?   appName: 'main',
I20170214-10:22:53.767(7)?   userId: null,
I20170214-10:22:53.768(7)?   enabled: true,
I20170214-10:22:53.769(7)?   createdAt: Mon Feb 13 2017 14:41:37 GMT+0700 (ICT),
I20170214-10:22:53.770(7)?   updatedAt: Tue Feb 14 2017 10:10:36 GMT+0700 (ICT) }

I20170214-10:23:04.286(7)? Push: Send message "Hello" via query {}
I20170214-10:23:04.289(7)? send to token { gcm: 'e4QnQnhANZg:APA91bGTAZGudROhSjhhM23mnbusFASLjx-pPbkqD9O_28VLVX-v2SP7TaM0eERfT2KalXfSC9X9BSfp9ae5xUKMUaaWFWBQLfa9C0nxWBbdDmzP8hwupYiob6UWV2xNtIPuqIhZwIYF' }
I20170214-10:23:04.292(7)? sendGCM [ 'e4QnQnhANZg:APA91bGTAZGudROhSjhhM23mnbusFASLjx-pPbkqD9O_28VLVX-v2SP7TaM0eERfT2KalXfSC9X9BSfp9ae5xUKMUaaWFWBQLfa9C0nxWBbdDmzP8hwupYiob6UWV2xNtIPuqIhZwIYF' ] { _id: 'efojNPxteQs5gZWPN',
I20170214-10:23:04.293(7)?   createdAt: Tue Feb 14 2017 10:22:56 GMT+0700 (ICT),
I20170214-10:23:04.294(7)?   createdBy: '<SERVER>',
I20170214-10:23:04.295(7)?   from: 'push',
I20170214-10:23:04.296(7)?   title: 'Hello',
I20170214-10:23:04.296(7)?   text: 'World',
I20170214-10:23:04.300(7)?   badge: 12,
I20170214-10:23:04.301(7)?   gcm: {},
I20170214-10:23:04.302(7)?   query: {} }
I20170214-10:23:04.337(7)? Create GCM Sender using "AAAAyjqxhYo:APA91bH3Yj93jgVg51Vkww5e_jRCt9wq19Rvq-kD6k6hCKIw2EyXEl4zlfc9KG6GeLAGkg5dzpooruwmET3YevS3MODi1LKAV3SUvVwd6XwLSvmI_in3kHfaAiw57rMLf1cq2xaUh43H"
I20170214-10:23:04.338(7)? A:Send message to: e4QnQnhANZg:APA91bGTAZGudROhSjhhM23mnbusFASLjx-pPbkqD9O_28VLVX-v2SP7TaM0eERfT2KalXfSC9X9BSfp9ae5xUKMUaaWFWBQLfa9C0nxWBbdDmzP8hwupYiob6UWV2xNtIPuqIhZwIYF
I20170214-10:23:04.355(7)? Push: Sent message "Hello" to 0 ios apps 1 android apps
I20170214-10:23:04.361(7)? Push, GUIDE: The "Push.appCollection" - No APN clients have registred on the server yet...
I20170214-10:23:04.694(7)? ANDROID: Result of sender: {"multicast_id":9023125278960035000,"success":1,"failure":0,"canonical_ids":0,"results":[{"message_id":"0:1487042585863072%6a5d720e0034af1a"}]}

Everything seems to work fine but my phone didn’t receive any notifications. What am I doing wrong ? Please help.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
buidanhquycommented, Feb 17, 2017

Yes, working as expected.

0reactions
rashmimhatre100commented, Sep 12, 2018

Hey @buidanhquy are you also able to set badge on android? Thanks in advance.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Firebase cloud messaging notification not received by device
I do receive a one-time error immediately after pushing the notification that states "I/FA: Tag Manager is not found and thus will not...
Read more >
Unable to receive Push Notifications from FCM to iOS
Unable to receive Push Notifications from FCM to iOS ... I receive the notification successfully on Android but nothing appears in my iOS...
Read more >
Receive messages in an Android app - Firebase - Google
In some situations, FCM may not deliver a message. This occurs when there are too many messages (>100) pending for your app on...
Read more >
Why Some Users Don't Receive Push Notifications? [with ...
Learn why notifications that are successfully sent to GCM were not delivered to the end-users? Check examples surrounding push ...
Read more >
Troubleshoot FCM mobile push notification failures in Amazon ...
Verify if the platform endpoint associated with the device that's not receiving push notifications is activated · 1. Review your delivery status ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found