Luis Dalmolin Luis Dalmolin - 1 year ago 90
AngularJS Question

Ionic Push on Android: unexpected error occured

I'm trying to use Ionic Push notifications on android, but every time I got the following error:

Ionic Push:, (debug) unexpected error occured.
Ionic Push:, [object Object]

I'm using Genymotion as my emulator, with Google Play Services installed ( Testing on a real device is not working as well.

Also, I'm using this push plugin (, and installed like this:

ionic plugin add phonegap-plugin-push --variable SENDER_ID="my-gcm-project-number"

My push code look's like this:

var push = new Ionic.Push({
'debug': true,

'pluginConfig': {
'android': {
'senderID': 'my-project-number',
'iconColor': '#343434'

push.register(function(token) {
console.log('Device token:', token.token);

I already configured my Ionic app using:

ionic config set dev_push false
ionic push --google-api-key my-google-api-key
ionic config set gcm_key <my-gcm-project-number>

I tried to search for similar problemas but never found a solution.

Anyone can help me?

Answer Source

To answer my own question:

When I published my app and testing on a real Android device downloading the app from Google Play, it worked.

A few things to try if you are getting this problem:

Remove and add again the push plugin:

ionic plugin remove phonegap-plugin-push
ionic plugin add phonegap-plugin-push --variable SENDER_ID="my-gcm-project-number"


  • Generate a new project number and API key on Google Console;
  • Check .io-config.json to check if your keys and numbers are correct;
  • Make sure your dev push is off: ionic config set dev_push false;
  • Set your GCM key on Ionic IO: ionic config set gcm_key <your-gcm-project-number>;
  • Check (and make it again if needed) your build profiles on Ionic IO;

Also check this answer:

Hope this help someone.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download