Push Notifications GCM Sender ID is null


Hey i have some wired problems with the Push notifications from the Ionic cloud during the setup. I am using an Iphone with Ios 10. I am confused. The error basically says that the GCM Sender ID is null. But i defined it in my cloud settings. It’s may a bit lazy but the logs and my config is below. I think those once are saying more that thousand words.

The X-Code log from the point when “push.register()” is called:

  • Push Plugin register called
  • PushPlugin.register: setting badge to false
  • PushPlugin.register: clear badge is set to 0
  • PushPlugin.register: better button setup
  • GCM Sender ID (null)
  • Using APNS Notification
  • Push Plugin register failed

My app.component.ts were i call push.register()

import { Component } from '@angular/core';
import { Platform } from 'ionic-angular';
import { StatusBar, Splashscreen } from 'ionic-native';
import { Auth, User, Push, PushToken } from '@ionic/cloud-angular';
import { TabsPage } from '../pages/tabs/tabs';
import { LoginPage } from '../pages/login/login';

  templateUrl: 'app.html'
export class MyApp {

  constructor(platform: Platform, public auth: Auth, public push: Push) {
    platform.ready().then(() => {


      if(this.auth.isAuthenticated() !== true){
        this.rootPage = LoginPage;
        this.rootPage = TabsPage;

      this.push.register().then((t: PushToken) => {
        return this.push.saveToken(t);
      }).then((t: PushToken) => {
        console.log('Token saved:', t.token);
        .subscribe((msg) => {
        alert(msg.title + ': ' + msg.text);


My app.module.ts where i provide the cloud settings

import { NgModule, ErrorHandler } from '@angular/core';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import { MyApp } from './app.component';
import { AboutPage } from '../pages/about/about';
import { ContactPage } from '../pages/contact/contact';
import { HomePage } from '../pages/home/home';
import { TabsPage } from '../pages/tabs/tabs';
import { LoginPage } from '../pages/login/login';
import { CloudSettings, CloudModule, Push, PushToken } from '@ionic/cloud-angular';

const cloudSettings: CloudSettings = {
  'core': {
    'app_id': '12345'
  'push': {
    'sender_id': '777766677',
    'pluginConfig': {
      'ios': {
        'badge': true,
        'sound': true
      'android': {
        'iconColor': '#343434'

  declarations: [
  imports: [
  bootstrap: [IonicApp],
  entryComponents: [
  providers: [{provide: ErrorHandler, useClass: IonicErrorHandler}]
export class AppModule {}

Thank you for you help.


Are you debugging with the XCode simulator or real device?

If I’m not wrong, it only works with a real phone and that may explain why you get a null ID


I am running it on a real device. It’s an Iphone SE with Ios 10.



Do you use the last version of XCode? Have you try to post your problem on the Github of the cordova push notification plugin?

Sorry I’m no expert, can’t really help more.


I fixed it. I used the wrong team to sign my app. After changing the team and enabling push notifications. I got the token and everything is working.


Kind of funny in a way… just upgrade from phonegap-plugin-push 1.9.2 to 1.9.4 and now I face the exact same problem :frowning:


I removed my all platform, added it again, did all the settings and…it works again :wink:


what mean changing the team. i have the same problem.


If you don’t hear from that responder, they probably meant the apple developer certificate?