-
Notifications
You must be signed in to change notification settings - Fork 442
Crash after push notification confirmation #205
Comments
seems that the line
in firebase.addOnMessageReceivedCallback, After this I tried updating to nativescript@next since some googling recommended that for these problems, but now I never get the allow notification box and it seems that the messaging init is never run. The firebase.init is successful and I can store a value in the db, but now messaging. |
Hi, Thanks for the detailed report and trying a lot things. Can you try adding var app = utils.ios.getter(UIApplication, UIApplication.sharedApplication); at line 219 so it becomes: var app = utils.ios.getter(UIApplication, UIApplication.sharedApplication);
app.registerForRemoteNotifications(); |
ok, so changed back to nativescript 2.3.0 - but the master branch of your plugin
Now it does not crash after confirming the notification dialog, however nothing is printet after confirm in the logs.
I thought maybe it was resolved now so tried deploying it on my phone, same result there where I can confirm and it doesn't crash. Tried sending push messages from firebase but none received. However, if I stop the app and start it manually on my phone it crashes. Haven't looked at the logs there though. |
Error: "null is not an object (evaluating 'app.registerForRemoteNotifications')" #218
Error: "null is not an object (evaluating 'app.registerForRemoteNotifications')" #218
Hello @EddyVerbruggen , I have been struggling for couple of days now from a similar issue, I have the latest release of this plugin here's my package.json file
here's the crash report from firebase console
I don`t know if this helps, but I cannot find a "firebase.ios.js" file in my project ? Edit: Below is my firebase.nativescript.json file:
|
The app crashes right after I've confirmed the allow notification popup, I've tried the latest code from github but same result.
the line: file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:219:20: null
is me printing out the value of the 'app' parameter in firebase.ios.js file (firebase._registerForRemoteNotifications = function (app))
same result when running on a device.
The text was updated successfully, but these errors were encountered: