EddyVerbruggen / nativescript-plugin-firebase

:fire: NativeScript plugin for Firebase
https://firebase.google.com
MIT License
1.01k stars 448 forks source link

App Crash on foreground push receive #1726

Open riteshdalal opened 3 years ago

riteshdalal commented 3 years ago

Created a new angular app and set it up for just external push notification by following demo-push application example

Nativescript Version: 7.0.11

package.json

{ "name": "@nativescript/template-hello-world-ng", "main": "main.js", "version": "7.0.6", "author": "NativeScript Team oss@nativescript.org", "description": "NativeScript Application", "license": "SEE LICENSE IN ", "publishConfig": { "access": "public" }, "keywords": [ "nativescript", "mobile", "angular", "{N}", "template" ], "repository": "", "bugs": { "url": "https://github.com/NativeScript/NativeScript/issues" }, "dependencies": { "@angular/animations": "~10.1.0", "@angular/common": "~10.1.0", "@angular/compiler": "~10.1.0", "@angular/core": "~10.1.0", "@angular/forms": "~10.1.0", "@angular/platform-browser": "~10.1.0", "@angular/platform-browser-dynamic": "~10.1.0", "@angular/router": "~10.1.0", "@nativescript/angular": "~10.1.0", "@nativescript/core": "~7.0.0", "@nativescript/firebase": "^11.1.3", "@nativescript/theme": "~3.0.0", "reflect-metadata": "~0.1.12", "rxjs": "^6.6.0", "zone.js": "~0.11.1" }, "devDependencies": { "@angular/compiler-cli": "~10.1.0", "@nativescript/ios": "7.0.5", "@nativescript/types": "~7.0.0", "@nativescript/webpack": "~3.0.0", "@ngtools/webpack": "~10.1.0", "typescript": "~4.0.0" }, "private": "true", "readme": "NativeScript Application" }

oxo0300 commented 3 years ago

@EddyVerbruggen I have the same issue. I was just about to post it. It's critical. It's delaying an app launch.

saibbyweb commented 3 years ago

@EddyVerbruggen - Having the same issue. Tested on iOS.

omanizer commented 3 years ago

I'm also experiencing this. Whenever I send the app a push while it's open it crashes. I'm using external notifications. Pretty much exact same versions of everything as posted above.

saibbyweb commented 3 years ago

@omanizer - For now, you can use FCM as backend. FCM notifications work fine both on Android as well as iOS.

georgemark0v commented 3 years ago

any updates?

heyman commented 3 years ago

I'm experiencing this as well.

I use these options for the registerForPushNotifications call:

showNotifications: false,
showNotificationsWhenInForeground: false,

Any pointers on how to debug this would be greatly appreciated.

Edit: I ended up using @nativescript-community/push instead, where I don't experience this problem.