Ionic push notification register problem (don't get token) FIXED!

Hello!

I’m trying to run push notifications for a long time. I’ve followed the steps from ionic documentation (https://devdactic.com/ionic-push-notifications-guide/) and also researched on Google, on this forum… but my app doesn’t work.
I get success on dev-push notification. But when I run the app in a real Android device it doesn’t work. I didn’t get any error but the register is not right… I don’t get any token for my device.
I installed the push plugin notification with my sender ID, set the gcm_key (28017XXXXX) in my project and dev_push to false. Also I set the API key Server (AIzaSyAISyWLXXXXXXXXXXXXXXXXXXXXX) in the security profile and run ionic build android.

I don’t know what it’s going wrong… I’m kind of desperate…
What could be happening?

Thanks.
Ana.

I am getting the exact same problem. When I run ionic run android -lc I get the following Error:

“6 587417 error Ionic Push:, GCM project number not found (http://docs.ionic.io/docs/push-android-setup)”

When I set the ionic config set gcm_key I start getting the following error:
8 399814 error Ionic Push:, (debug) unexpected error occured.
9 399839 error Ionic Push:, [object Object]

However on iOS everything works on my device. And on my android if I set ionic config set dev_push true, then the push notifications also work on my device.

console.log(“Device token:”,token.token); On Android doesn’t generate anything but it works fine on iOS.

I’m in desperate need of a solution.

Reinstall android platform works for me!

ionic platform rm android
ionic platform add android

Maybe it works for you too :wink:

@anuskinina unfortunately tried that and it didn’t work for me. I have given up on Ionic push for now.

only work in ionic config set dev_push false

sigh!