{"action":"created","issue":{"url":"https://api.github.com/repos/EddyVerbruggen/nativescript-plugin-firebase/issues/225","repository_url":"https://api.github.com/repos/EddyVerbruggen/nativescript-plugin-firebase","labels_url":"https://api.github.com/repos/EddyVerbruggen/nativescript-plugin-firebase/issues/225/labels{/name}","comments_url":"https://api.github.com/repos/EddyVerbruggen/nativescript-plugin-firebase/issues/225/comments","events_url":"https://api.github.com/repos/EddyVerbruggen/nativescript-plugin-firebase/issues/225/events","html_url":"https://github.com/EddyVerbruggen/nativescript-plugin-firebase/issues/225","id":191262212,"number":225,"title":"Still problems with push messages","user":{"login":"kjetilhp","id":393416,"avatar_url":"https://avatars.githubusercontent.com/u/393416?v=3","gravatar_id":"","url":"https://api.github.com/users/kjetilhp","html_url":"https://github.com/kjetilhp","followers_url":"https://api.github.com/users/kjetilhp/followers","following_url":"https://api.github.com/users/kjetilhp/following{/other_user}","gists_url":"https://api.github.com/users/kjetilhp/gists{/gist_id}","starred_url":"https://api.github.com/users/kjetilhp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kjetilhp/subscriptions","organizations_url":"https://api.github.com/users/kjetilhp/orgs","repos_url":"https://api.github.com/users/kjetilhp/repos","events_url":"https://api.github.com/users/kjetilhp/events{/privacy}","received_events_url":"https://api.github.com/users/kjetilhp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-23T12:49:04Z","updated_at":"2016-11-23T13:50:44Z","closed_at":null,"body":"Hi, release 3.8.3 fixed some issues but there are still problems. When I deploy my iOS app the first time, I get push messages, however when there are an existing app on the phone or if I launch the app fresh on the phone, messages are not received, seems to be more \"null is not an object\" errors\r\n\r\nthis is the xcode logs when I do a second run... messages are not received\r\n```\r\n2016-11-23 13:42:06.210943 anotherpusher[27863:5791630] Firebase automatic screen reporting is enabled. Call +[FIRAnalytics setScreenName:setScreenClass:] to set the screen name or override the default screen class name. To disable automatic screen reporting, set the flag FirebaseAutomaticScreenReportingEnabled to NO in the Info.plist\r\n2016-11-23 13:42:10.070797 anotherpusher[27863:5791685] [Firebase/Core][I-COR000001] Configuring the default app.\r\n2016-11-23 13:42:10.070 anotherpusher[27863] <Debug> [Firebase/Core][I-COR000001] Configuring the default app.\r\n2016-11-23 13:42:10.079713 anotherpusher[27863:5791684] <FIRAnalytics/INFO> Firebase Analytics v.3501000 started\r\n2016-11-23 13:42:10.080 anotherpusher[27863:] <FIRAnalytics/INFO> Firebase Analytics v.3501000 started\r\n2016-11-23 13:42:10.080373 anotherpusher[27863:5791684] <FIRAnalytics/INFO> To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/Y0Yjwu)\r\n2016-11-23 13:42:10.081 anotherpusher[27863:] <FIRAnalytics/INFO> To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/Y0Yjwu)\r\n2016-11-23 13:42:10.230533 anotherpusher[27863:5791698] [Firebase/Crash][I-CRA000004] Successfully enabled\r\n2016-11-23 13:42:10.230 anotherpusher[27863] <Info> [Firebase/Crash][I-CRA000004] Successfully enabled\r\n2016-11-23 13:42:10.249: <FIRInstanceID/WARNING> FIRInstanceID AppDelegate proxy enabled, will swizzle app delegate remote notification handlers. To disable add \"FirebaseAppDelegateProxyEnabled\" to your Info.plist and set it to NO\r\n2016-11-23 13:42:10.251: <FIRInstanceID/WARNING> Failed to fetch APNS token Error Domain=com.firebase.iid Code=1001 \"(null)\"\r\n2016-11-23 13:42:10.258: <FIRMessaging/INFO> FIRMessaging library version 1.2.0\r\n2016-11-23 13:42:10.267: <FIRMessaging/WARNING> FIRMessaging AppDelegate proxy enabled, will swizzle app delegate remote notification receiver handlers. Add \"FirebaseAppDelegateProxyEnabled\" to your Info.plist and set it to NO\r\n2016-11-23 13:42:10.276871 anotherpusher[27863:5791684] [Firebase/Core][I-COR000018] Already sending logs.\r\n2016-11-23 13:42:10.276 anotherpusher[27863] <Debug> [Firebase/Core][I-COR000018] Already sending logs.\r\n2016-11-23 13:42:10.302218 anotherpusher[27863:5791630] CONSOLE LOG file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:115:18: Error in firebase.addOnMessageReceivedCallback: TypeError: null is not an object (evaluating 'utils.ios.getter(UIApplication, UIApplication.sharedApplication).applicationIconBadgeNumber = 0')\r\nCONSOLE LOG file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:115:18: Error in firebase.addOnMessageReceivedCallback: TypeError: null is not an object (evaluating 'utils.ios.getter(UIApplication, UIApplication.sharedApplication).applicationIconBadgeNumber = 0')\r\n2016-11-23 13:42:10.303317 anotherpusher[27863:5791630] CONSOLE LOG file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:141:18: Error in firebase.addOnPushTokenReceivedCallback: TypeError: null is not an object (evaluating 'utils.ios.getter(UIApplication, UIApplication.sharedApplication).applicationIconBadgeNumber = 0')\r\nCONSOLE LOG file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:141:18: Error in firebase.addOnPushTokenReceivedCallback: TypeError: null is not an object (evaluating 'utils.ios.getter(UIApplication, UIApplication.sharedApplication).applicationIconBadgeNumber = 0')\r\n2016-11-23 13:42:10.319193 anotherpusher[27863:5791630] CONSOLE LOG file:///app/main.js:22:16: firebase.init done\r\nCONSOLE LOG file:///app/main.js:22:16: firebase.init done\r\n2016-11-23 13:42:10.367594 anotherpusher[27863:5791698] CONSOLE LOG file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:217:20: User granted push notifications? true\r\nCONSOLE LOG file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:217:20: User granted push notifications? true\r\n2016-11-23 13:42:10.371727 anotherpusher[27863:5791630] CONSOLE ERROR file:///app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:342:26: Unhandled Promise rejection: null is not an object (evaluating 'utils.ios.getter(UIApplication, UIApplication.sharedApplication).applicationIconBadgeNumber = 0') ; Zone: <root> ; Task: null ; Value: TypeError: null is not an object (evaluating 'utils.ios.getter(UIApplication, UIApplication.sharedApplication).applicationIconBadgeNumber = 0') _processPendingNotifications@file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:177:69\r\nfile:///app/tns_modules/nativescript-plugin-firebase/firebase.js:111:44\r\nZoneAwarePromise@file:///app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:465:37\r\naddOnMessageReceivedCallback@file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:101:21\r\nfile:///app/tns_modules/nativescript-plugin-firebase/firebase.js:462:50\r\nZoneAwarePromise@file:///app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:465:37\r\ninit@file:///app/tns_module\r\nCONSOLE ERROR file:///app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:342:26: Unhandled Promise rejection: null is not an object (evaluating 'utils.ios.getter(UIApplication, UIApplication.sharedApplication).applicationIconBadgeNumber = 0') ; Zone: <root> ; Task: null ; Value: TypeError: null is not an object (evaluating 'utils.ios.getter(UIApplication, UIApplication.sharedApplication).applicationIconBadgeNumber = 0') _processPendingNotifications@file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:177:69\r\nfile:///app/tns_modules/nativescript-plugin-firebase/firebase.js:111:44\r\nZoneAwarePromise@file:///app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:465:37\r\naddOnMessageReceivedCallback@file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:101:21\r\nfile:///app/tns_modules/nativescript-plugin-firebase/firebase.js:462:50\r\nZoneAwarePromise@file:///app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:465:37\r\ninit@file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:397:21\r\nanonymous@file:///app/main.js:8:14\r\nevaluate@[native code]\r\nmoduleEvaluation@[native code]\r\n[native code]\r\npromiseReactionJob@[native code]\r\n2016-11-23 13:42:10.372363 anotherpusher[27863:5791630] CONSOLE ERROR file:///app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:344:22: Error: Uncaught (in promise): TypeError: null is not an object (evaluating 'utils.ios.getter(UIApplication, UIApplication.sharedApplication).applicationIconBadgeNumber = 0')\r\nCONSOLE ERROR file:///app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:344:22: Error: Uncaught (in promise): TypeError: null is not an object (evaluating 'utils.ios.getter(UIApplication, UIApplication.sharedApplication).applicationIconBadgeNumber = 0')\r\n2016-11-23 13:42:10.373537 anotherpusher[27863:5791630] CONSOLE ERROR file:///app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:342:26: Unhandled Promise rejection: null is not an object (evaluating 'utils.ios.getter(UIApplication, UIApplication.sharedApplication).applicationIconBadgeNumber = 0') ; Zone: <root> ; Task: null ; Value: TypeError: null is not an object (evaluating 'utils.ios.getter(UIApplication, UIApplication.sharedApplication).applicationIconBadgeNumber = 0') _processPendingNotifications@file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:177:69\r\nfile:///app/tns_modules/nativescript-plugin-firebase/firebase.js:137:44\r\nZoneAwarePromise@file:///app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:465:37\r\naddOnPushTokenReceivedCallback@file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:122:21\r\nfile:///app/tns_modules/nativescript-plugin-firebase/firebase.js:465:52\r\nZoneAwarePromise@file:///app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:465:37\r\ninit@file:///app/tns_modu\r\nCONSOLE ERROR file:///app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:342:26: Unhandled Promise rejection: null is not an object (evaluating 'utils.ios.getter(UIApplication, UIApplication.sharedApplication).applicationIconBadgeNumber = 0') ; Zone: <root> ; Task: null ; Value: TypeError: null is not an object (evaluating 'utils.ios.getter(UIApplication, UIApplication.sharedApplication).applicationIconBadgeNumber = 0') _processPendingNotifications@file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:177:69\r\nfile:///app/tns_modules/nativescript-plugin-firebase/firebase.js:137:44\r\nZoneAwarePromise@file:///app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:465:37\r\naddOnPushTokenReceivedCallback@file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:122:21\r\nfile:///app/tns_modules/nativescript-plugin-firebase/firebase.js:465:52\r\nZoneAwarePromise@file:///app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:465:37\r\ninit@file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:397:21\r\nanonymous@file:///app/main.js:8:14\r\nevaluate@[native code]\r\nmoduleEvaluation@[native code]\r\n[native code]\r\npromiseReactionJob@[native code]\r\n2016-11-23 13:42:10.374109 anotherpusher[27863:5791630] CONSOLE ERROR file:///app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:344:22: Error: Uncaught (in promise): TypeError: null is not an object (evaluating 'utils.ios.getter(UIApplication, UIApplication.sharedApplication).applicationIconBadgeNumber = 0')\r\nCONSOLE ERROR file:///app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:344:22: Error: Uncaught (in promise): TypeError: null is not an object (evaluating 'utils.ios.getter(UIApplication, UIApplication.sharedApplication).applicationIconBadgeNumber = 0')\r\n2016-11-23 13:42:10.380010 anotherpusher[27863:5791698] <FIRAnalytics/INFO> Firebase Analytics enabled\r\n2016-11-23 13:42:10.380 anotherpusher[27863:] <FIRAnalytics/INFO> Firebase Analytics enabled\r\n2016-11-23 13:42:11.388757 anotherpusher[27863:5791630] CONSOLE LOG file:///app/tns_modules/@angular/core/bundles/core.umd.js:78:20: Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode.\r\nCONSOLE LOG file:///app/tns_modules/@angular/core/bundles/core.umd.js:78:20: Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode.\r\n2016-11-23 13:42:11.557840 anotherpusher[27863:5791683] [Firebase/Core][I-COR000019] Clearcut post completed.\r\n2016-11-23 13:42:11.557 anotherpusher[27863] <Debug> [Firebase/Core][I-COR000019] Clearcut post completed.\r\n2016-11-23 13:42:11.714515 anotherpusher[27863:5791699] [Firebase/Core][I-COR000019] Clearcut post completed.\r\n2016-11-23 13:42:11.714 anotherpusher[27863] <Debug> [Firebase/Core][I-COR000019] Clearcut post completed.\r\n2016-11-23 13:42:12.585487 anotherpusher[27863:5791699] [FirebaseDatabase] Using an unspecified index. Consider adding \".indexOn\": \"since\" at /alive to your security rules for better performance\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/EddyVerbruggen/nativescript-plugin-firebase/issues/comments/262517363","html_url":"https://github.com/EddyVerbruggen/nativescript-plugin-firebase/issues/225#issuecomment-262517363","issue_url":"https://api.github.com/repos/EddyVerbruggen/nativescript-plugin-firebase/issues/225","id":262517363,"user":{"login":"PanayotCankov","id":5919275,"avatar_url":"https://avatars.githubusercontent.com/u/5919275?v=3","gravatar_id":"","url":"https://api.github.com/users/PanayotCankov","html_url":"https://github.com/PanayotCankov","followers_url":"https://api.github.com/users/PanayotCankov/followers","following_url":"https://api.github.com/users/PanayotCankov/following{/other_user}","gists_url":"https://api.github.com/users/PanayotCankov/gists{/gist_id}","starred_url":"https://api.github.com/users/PanayotCankov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PanayotCankov/subscriptions","organizations_url":"https://api.github.com/users/PanayotCankov/orgs","repos_url":"https://api.github.com/users/PanayotCankov/repos","events_url":"https://api.github.com/users/PanayotCankov/events{/privacy}","received_events_url":"https://api.github.com/users/PanayotCankov/received_events","type":"User","site_admin":false},"created_at":"2016-11-23T13:50:44Z","updated_at":"2016-11-23T13:50:44Z","body":"Require the plugin before application.start, call init in application.on(loaded... The null is not an object in my app was caused because iOS sharedApplication singleton was captured before application.start. For android this wont't work as foregroundActivity in the core modules was altered and for android it seems best to call firebase.init before application.start"}}
{"actor":{"display_login":"PanayotCankov"}}