I found the solution putting a setTimeOut in your platform.ready:
sudo ionic cordova plugin add phonegap-plugin-push –variable SENDER_ID=XXXXXX
setTimeout(()=>{
this.initPushNotification();
}, 1000);
1 weeks founding this error…