title: Ionic Native Push Crashes using Firebase Cloud Messaging
body: <p>I am using Ionic2 and am building a Chat App with Push Messaging. I am using FCM (Firebase Cloud Messaging). I followed the <a href="https://medium.com/@ankushaggarwal/push-notifications-in-ionic-2-658461108c59#.abc4tad1y" rel="nofollow noreferrer">following tutorial</a> which uses the <a href="https://github.com/phonegap/phonegap-plugin-push" rel="nofollow noreferrer">phonegap-plugin-push</a> plugin, and everything was working perfectly.</p>
  <p>My PC then crashed and I had to reinstall all my Cordova plugins. Since then, the Push Notifications are causing the app to crash. When I try initialise <code>Push</code> and the following code is invoked:</p>
  <pre><code>import { StatusBar, Push, SQLite } from 'ionic-native';
                      ...
  
              let push = Push.init({
                android: {
                  senderID: &quot;XXXXXXXXXXXXXX&quot;,
                  topics: topics
                },
                ios: {
                  alert: &quot;true&quot;,
                  badge: false,
                  sound: &quot;true&quot;,
                  topics: topics
                },
                windows: {}
              });
  </code></pre>
  <p>I get the following error with nothing in the logs:</p>
  <p><a href="https://i.stack.imgur.com/lA4Tv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lA4Tv.png" alt="enter image description here" /></a></p>
  <p>If I don't make use of Push it works with no errors, but I obviously want to use Push Notifications.</p>
  <p>If anyone has any suggestions, I would appreciate it.</p>
  <p>I have tried the following with no success:</p>
  <ol>
  <li>Reinstall all Cordova Plugins</li>
  <li>Created a new FCM project and used its SENDER_ID</li>
  <li>Remove &amp; Add the android platform (<code>ionic platform remove android</code> &amp;<code> ionic platform add android</code>)</li>
  <li>Tried reinstalling Ionic Native (<code>npm install ionic-native --save</code>)</li>
  </ol>
  <p>More info:</p>
  <blockquote>
  <pre><code>E:\Development\IDE\ionic-apps\theWhoZoo&gt;cordova plugin list
  cordova-plugin-camera 2.2.0 &quot;Camera&quot;
  cordova-plugin-compat 1.0.0 &quot;Compat&quot;
  cordova-plugin-console 1.0.3 &quot;Console&quot;
  cordova-plugin-crop 0.1.0 &quot;CropPlugin&quot;
  cordova-plugin-device 1.1.2 &quot;Device&quot;
  cordova-plugin-geolocation 2.2.0 &quot;Geolocation&quot;
  cordova-plugin-network-information 1.3.0 &quot;Network Information&quot;
  cordova-plugin-splashscreen 3.2.2 &quot;Splashscreen&quot;
  cordova-plugin-statusbar 2.1.3 &quot;StatusBar&quot;
  cordova-plugin-whitelist 1.2.2 &quot;Whitelist&quot;
  cordova-sqlite-plugin 3.0.0 &quot;Cordova SQLite Plugin&quot;
  cordova-sqlite-storage 1.4.8 &quot;Cordova sqlite storage plugin&quot;
  ionic-plugin-keyboard 2.2.1 &quot;Keyboard&quot;
  phonegap-plugin-push 1.8.3 &quot;PushPlugin&quot;
  plugin.google.maps 1.3.9 &quot;phonegap-googlemaps-plugin&quot;
  </code></pre>
  </blockquote>
  <p><code>npm install</code> gives me the following:</p>
  <p>....</p>
  <blockquote>
  <pre><code>npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
  
  &gt; node-sass@3.10.1 postinstall E:\Development\IDE\ionic-apps\theWhoZoo\node_modules\ionic-gulp-sass-build\node_modules\gulp-sass\node_modules\node-sass
  &gt; node scripts/build.js
  
  &quot;E:\Development\IDE\ionic-apps\theWhoZoo\node_modules\ionic-gulp-sass-build\node_modules\gulp-sass\node_modules\node-sass\vendor\win32-x64-48\binding.node&quot; exists.
   testing binary.
  Binary is fine; exiting.
  npm ERR! Windows_NT 10.0.14393
  npm ERR! argv &quot;C:\\Program Files\\nodejs\\node.exe&quot; &quot;C:\\Users\\Richard\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js&quot; &quot;install&quot;
  npm ERR! node v6.2.2
  npm ERR! npm  v2.15.11
  npm ERR! code EPEERINVALID
  
  npm ERR! peerinvalid The package @angular/compiler@2.1.2 does not satisfy its siblings' peerDependencies requirements!
  npm ERR! peerinvalid Peer @angular/forms@0.2.0 wants @angular/compiler@^2.0.0-rc.4
  npm ERR! peerinvalid Peer @angular/platform-browser-dynamic@2.1.2 wants @angular/compiler@2.1.2
  npm ERR! peerinvalid Peer ionic-angular@2.0.0-rc.1 wants @angular/compiler@^2.0.0
  npm ERR! peerinvalid Peer @angular/platform-server@2.1.2 wants @angular/compiler@2.1.2
  npm ERR! peerinvalid Peer @angular/compiler-cli@0.6.4 wants @angular/compiler@2.0.2
  
  npm ERR! Please include the following file with any support request:
  npm ERR!     E:\Development\IDE\ionic-apps\theWhoZoo\npm-debug.log
  </code></pre>
  </blockquote>