dev
dev

Reputation: 1

I am implement web push chrome notification in node js with payload concept. But I'm getting message is "the site is updating in the background"

I am trying to implementing chrome push notification but I am getting some message again and again.

I'm also not able to find how this message is coming.But my payload message is different.

Upvotes: 0

Views: 76

Answers (1)

Matt Gaunt
Matt Gaunt

Reputation: 9821

That message is displayed when your service worker receives a push but you don't show a notification in the push event.

A common mistake is not returning the promise from showNotification into event.waitUntil(), like so:

self.addEventListener('push', event => {
  event.waitUntil(
    self.registration.showNotification('title', {
      body: 'body'
    })
  );
});

Upvotes: 0

Related Questions