OneSignal issue on Ionic 3

On android, I added One Signal plugin on my app and i added this code on the platform.ready section

    window["plugins"].OneSignal.setLogLevel({logLevel: 6, visualLevel: 6});
      var notificationOpenedCallback = function(jsonData) {
        console.log('notificationOpenedCallback: ' + JSON.stringify(jsonData));

        .startInit("******-****-****-****-***********", "**********")

as i launch the app it shows a bunch of alerts sending requests to onesignal and the app suddenly closes and onesignal doesn’t detect any subscribers.