android - Unable to get device token for push notification in ionic -


i follow https://docs.ionic.io/services/push/ tutorial. working in sample project, when ever real project, give me below error:

"native: deviceready did not fire within 2000ms. can happen when plugins in inconsistent state. try removing plugins plugins/ , reinstalling them.", source: file:///android_asset/www/lib/ionic.cloud.min.js (6)

for unable device token. have uninstall plugin , again install all. still not able device token.

.controller('dashctrl', function($scope, $ionicpush) {   $ionicpush.register().then(function(t) {     return $ionicpush.savetoken(t, {       'ignore_user': true     });   }).then(function(t) {     console.log('token saved:'+ t.token);   });    $scope.$on('cloud:push:notification', function(event, data) {     var msg = data.message;     alert(msg.title + ': ' + msg.text);   }); })  

in app.js

$ioniccloudprovider.init({     "core": {       "app_id": "2c602144"     },     "push": {       "sender_id": "571814895587",       "pluginconfig": {         "ios": {           "badge": true,           "sound": true         },         "android": {           "iconcolor": "#343434"         }       }     }   }); 

output as:

11-10 18:56:54.154 32315-32315/com.ionicframework.mediapublisher204605 i/chromium: [info:console(275)] "hellooooooo", source: file:///android_asset/www/js/controllers.js (275) 11-10 18:56:54.154 32315-32315/com.ionicframework.mediapublisher204605 i/chromium: [info:console(24)] "in pushnotificationservice", source: file:///android_asset/www/js/services.js (24) 11-10 18:56:54.295 32315-32315/com.ionicframework.mediapublisher204605 i/chromium: [info:console(118)] "watchcalledundefined", source: file:///android_asset/www/js/controllers.js (118) 11-10 18:56:54.365 32315-32315/com.ionicframework.mediapublisher204605 i/chromium: [info:console(6)] "native: deviceready did not fire within 2000ms. can happen when plugins in inconsistent state. try removing plugins plugins/ , reinstalling them.", source: file:///android_asset/www/lib/ionic.cloud.min.js (6) 11-10 18:56:54.545 32315-32315/com.ionicframework.mediapublisher204605 i/chromium: [info:console(87)] "wellcome", source: file:///android_asset/www/js/controllers.js (87) 11-10 18:56:54.615 32315-32315/com.ionicframework.mediapublisher204605 i/chromium: [info:console(104)] "wellcome", source: file:///android_asset/www/js/controllers.js (104) 11-10 18:56:55.246 32315-32315/com.ionicframework.mediapublisher204605 i/chromium: [info:console(3707)] "ionic core:", source: file:///android_asset/www/lib/ionic-platform-web-client/dist/ionic.io.bundle.js (3707) 11-10 18:56:55.246 32315-32315/com.ionicframework.mediapublisher204605 i/chromium: [info:console(6)] "device ready fired after", source: file:///android_asset/www/lib/ionic.cloud.min.js (6) 11-10 18:56:55.256 32315-32315/com.ionicframework.mediapublisher204605 i/chromium: [info:console(333)] "uncaught referenceerror: $cordovaapprate not defined", source: file:///android_asset/www/js/app.js (333)


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -