Since the release of Samsung Internet v14 we’re seeing behavior that prevents us from retrieving a web push subscription. The following code should return subscription information when a subscriber has opted in to push notifications and has a valid service worker: registration.pushManager.getSubscription()
is invoked but never resolves the promise…
navigator.serviceWorker.ready.then(function(registration) {
console.log('service worker registered');
let sub = registration.pushManager.getSubscription();
console.log('i never get here')
return sub;
}).then(function(subscription) {
console.log('i never get here')
console.log(subscription)
});
Anyone else seeing this behavior? Thanks