I have created web push notifications and they work in Firefox ok (service worker is registered, subscription created, subscription data stored, using subscription data notification is sent ok). I have tried the same in Chrome and Opera, but nothing happens. I tried to debug, and after I send push notification, browser receives it, executes code, but nothing happens. There are no errors, code runs till the end. Service worker code is the following:
'use strict';
self.addEventListener('push', function(event) {
console.log('Push started');
const promiseChain = self.registration.showNotification('Hello, World.');
event.waitUntil(promiseChain);
console.log('Push finished');
});
I see in console 'Push started' and 'Push finished'. Server uses https. Any ideas, what can be wrong?