Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Still problems with push messages #225

Closed
kjetilhp opened this issue Nov 23, 2016 · 3 comments
Closed

Still problems with push messages #225

kjetilhp opened this issue Nov 23, 2016 · 3 comments
Milestone

Comments

@kjetilhp
Copy link

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

this is the xcode logs when I do a second run... messages are not received

2016-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
2016-11-23 13:42:10.070797 anotherpusher[27863:5791685] [Firebase/Core][I-COR000001] Configuring the default app.
2016-11-23 13:42:10.070 anotherpusher[27863] <Debug> [Firebase/Core][I-COR000001] Configuring the default app.
2016-11-23 13:42:10.079713 anotherpusher[27863:5791684] <FIRAnalytics/INFO> Firebase Analytics v.3501000 started
2016-11-23 13:42:10.080 anotherpusher[27863:] <FIRAnalytics/INFO> Firebase Analytics v.3501000 started
2016-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)
2016-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)
2016-11-23 13:42:10.230533 anotherpusher[27863:5791698] [Firebase/Crash][I-CRA000004] Successfully enabled
2016-11-23 13:42:10.230 anotherpusher[27863] <Info> [Firebase/Crash][I-CRA000004] Successfully enabled
2016-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
2016-11-23 13:42:10.251: <FIRInstanceID/WARNING> Failed to fetch APNS token Error Domain=com.firebase.iid Code=1001 "(null)"
2016-11-23 13:42:10.258: <FIRMessaging/INFO> FIRMessaging library version 1.2.0
2016-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
2016-11-23 13:42:10.276871 anotherpusher[27863:5791684] [Firebase/Core][I-COR000018] Already sending logs.
2016-11-23 13:42:10.276 anotherpusher[27863] <Debug> [Firebase/Core][I-COR000018] Already sending logs.
2016-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')
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')
2016-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')
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')
2016-11-23 13:42:10.319193 anotherpusher[27863:5791630] CONSOLE LOG file:///app/main.js:22:16: firebase.init done
CONSOLE LOG file:///app/main.js:22:16: firebase.init done
2016-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
CONSOLE LOG file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:217:20: User granted push notifications? true
2016-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
file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:111:44
ZoneAwarePromise@file:///app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:465:37
addOnMessageReceivedCallback@file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:101:21
file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:462:50
ZoneAwarePromise@file:///app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:465:37
init@file:///app/tns_module
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
file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:111:44
ZoneAwarePromise@file:///app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:465:37
addOnMessageReceivedCallback@file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:101:21
file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:462:50
ZoneAwarePromise@file:///app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:465:37
init@file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:397:21
anonymous@file:///app/main.js:8:14
evaluate@[native code]
moduleEvaluation@[native code]
[native code]
promiseReactionJob@[native code]
2016-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')
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')
2016-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
file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:137:44
ZoneAwarePromise@file:///app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:465:37
addOnPushTokenReceivedCallback@file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:122:21
file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:465:52
ZoneAwarePromise@file:///app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:465:37
init@file:///app/tns_modu
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
file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:137:44
ZoneAwarePromise@file:///app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:465:37
addOnPushTokenReceivedCallback@file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:122:21
file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:465:52
ZoneAwarePromise@file:///app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:465:37
init@file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:397:21
anonymous@file:///app/main.js:8:14
evaluate@[native code]
moduleEvaluation@[native code]
[native code]
promiseReactionJob@[native code]
2016-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')
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')
2016-11-23 13:42:10.380010 anotherpusher[27863:5791698] <FIRAnalytics/INFO> Firebase Analytics enabled
2016-11-23 13:42:10.380 anotherpusher[27863:] <FIRAnalytics/INFO> Firebase Analytics enabled
2016-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.
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.
2016-11-23 13:42:11.557840 anotherpusher[27863:5791683] [Firebase/Core][I-COR000019] Clearcut post completed.
2016-11-23 13:42:11.557 anotherpusher[27863] <Debug> [Firebase/Core][I-COR000019] Clearcut post completed.
2016-11-23 13:42:11.714515 anotherpusher[27863:5791699] [Firebase/Core][I-COR000019] Clearcut post completed.
2016-11-23 13:42:11.714 anotherpusher[27863] <Debug> [Firebase/Core][I-COR000019] Clearcut post completed.
2016-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
@EddyVerbruggen
Copy link
Owner

Perhaps #222 solves this issue. I'm doing my best to review and merge that asap.

@PanayotCankov
Copy link
Contributor

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

@EddyVerbruggen EddyVerbruggen added this to the 3.8.4 milestone Nov 23, 2016
@EddyVerbruggen
Copy link
Owner

Please update to 3.8.4 which includes @PanayotCankov which (at least for me) work really well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants