Angularfire: Foreground notification not working with Angular 9

Created on 18 Feb 2020  路  7Comments  路  Source: angular/angularfire

Version info

Angular CLI: 9.0.2
Node: 10.16.0
OS: win32 x64

Angular: 9.0.1
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router, service-worker
Ivy Workspace: Yes

Package Version

@angular-devkit/architect 0.900.2
@angular-devkit/build-angular 0.900.2
@angular-devkit/build-optimizer 0.900.2
@angular-devkit/build-webpack 0.900.2
@angular-devkit/core 9.0.2
@angular-devkit/schematics 9.0.2
@angular/cli 9.0.2
@angular/fire 5.4.2
@ngtools/webpack 9.0.2
@schematics/angular 9.0.2
@schematics/update 0.900.2
rxjs 6.5.4
typescript 3.7.5
webpack 4.41.2

How to reproduce these conditions

foreground notification was working well with angular 8
when i updated to Angular 9 b ckground notification only working

All 7 comments

I also have this problem with version 6.0.0-rc.1.
Using ng add @angular/fire@next to install the new version

getting this works by downgrade the firebase version to 7.5.0

it's worked with me with
importScripts('https://www.gstatic.com/firebasejs/7.6.0/firebase-app.js'); importScripts('https://www.gstatic.com/firebasejs/7.6.0/firebase-messaging.js');
in firebase-messaging-sw.js
and make sure in package.json "firebase": "^7.6.0",

I test it with the current recent firebase version 7.14.2 and angularfire 6 public version. There is a error like below.
image

@OmarioHasan I applied angularfire 6 public and firebase 7.6.0. But this issue is still. Could you give ma more idea? Thanks.

@OmarioHasan I found another issue(#2299). This is still open. Thank you for reply.

Was this page helpful?
0 / 5 - 0 ratings