I'm using Firefox Nightly of 46.0a1 version (there is only 42v. for OS X, and Push API requires 43v).
And I'm getting this error:
DOMException [AbortError: "Error retrieving push subscription"
code: 20
nsresult: 0x80530014]
Here is snippet where this error in thrown:
navigator.serviceWorker.ready.then(function (serviceWorkerRegistration) {
serviceWorkerRegistration.pushManager.subscribe()
.then(function (subscription) {
endpoint = subscription.endpoint;
console.log('subscription endpoint: ', subscription.endpoint);
subscribeOnServer();
})
.catch(function (e) {
// here that error is raised
errorNotification.innerHTML = 'Unable to subscribe to push';
}
});
});
In Chrome this place doesn't throw anything and I get subscription with a properly endpoint.