Skip to content

@angular/service-worker - SwPush - "This site has been updated in the background" #48349

@Androbin

Description

@Androbin

Which @angular/* package(s) are the source of the bug?

service-worker

Is this a regression?

Yes

Description

Recently some Push Notifications are no longer being delivered as expected.

Expected Behavior

{
  "notification": {
    "title": "Hello World",
  }
}
{
  "notification": {
    "title": "Hello World",
    "tag": "demo"
  }
}
{
  "notification": {
    "title": "Hello World",
    "tag": "demo",
    "renotify": true
  }
}

Unexpected Behavior

{
  "notification": {
    "title": "Hello World",
    "renotify": true
  }
}

The notification is replaced with the browser's default notification that reads "This site has been updated in the background".
See #23037 @gkalpak

Workaround

if (!notification.tag) {
  delete notification.renotify;
}

Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 12.2.0
Node: 14.21.1
Package Manager: npm 6.14.17
OS: linux x64

Angular: 12.2.0
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router, service-worker

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.1202.0
@angular-devkit/build-angular     12.2.0
@angular-devkit/core              12.2.0
rxjs                              6.6.7
typescript                        4.3.5

Anything else?

  • Might be an upstream (Chromium) issue
  • Confirmed to affect both Chrome for Linux and Chrome for Android

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4A relatively minor issue that is not relevant to core functionsarea: service-workerIssues related to the @angular/service-worker package

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions