web-push


Firefox Push API - AbortError: Error retrieving push subscription


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.
Please help
It doesn't throw for me.
There was a syntax error in your snippet, but I guess that wasn't the issue (otherwise it would have failed in Chrome as well).
Here's the snippet I've used:
navigator.serviceWorker.ready
.then(function(serviceWorkerRegistration) {
console.log('asd');
serviceWorkerRegistration.pushManager.subscribe()
.then(function(subscription) {
endpoint = subscription.endpoint;
console.log('subscription endpoint: ', subscription.endpoint);
})
.catch(function(e) {
console.log(e);
});
});

Related Links

My Pushpad Sender does not send any more notifications
Pushpad or Web push notification how to custom dialog message
What is VAPID and why is it useful?
How can I test pushsubscriptionchange event-handling code?
How should I handle the pushsubscriptionchange event?
How can I hide notifications my site is displaying if it is focused and brought to the foreground?
Do I need to show a notification in response to a push notification if my site is foreground and focused?
Getting customized message from GCM using Web push notifications
Firefox Push API - AbortError: Error retrieving push subscription

Categories

HOME
qt
entity-framework
matrix
vagrant
workflow
magento-2.0
dronekit-python
qooxdoo
swift2
apache-kafka-connect
linker
video-streaming
supercollider
onvif
bellman-ford
lapack
game-maker
buffer
pm2
ex
outlook-restapi
varnish-vcl
psql
azure-machine-learning
unity-container
dashdb
altium-designer
fluent-migrator
cell
opentext
password-generator
offline-caching
history.js
fusion
basic-authentication
d3.js-v4
winsock
mongodb-3.4
delayed-job
actframework
wdk
formsauthenticationticket
love2d
gitolite
sspi
dagger
haar-classifier
latexml
julius-speech
liteide
autorelease
supertest
nusoap
renderman
htmlspecialchars
nslayoutconstraint
word-2016
ltrace
oracle-fusion-apps
haraka
piping
node.js-connect
frame-grab
voronoi
gdl
directx-9
astropy
android-studio-import
postal-code
modern.ie
dynamics-ax-2012-r2
karma-coverage
wicked-gem
whitespace-language
shoes
tidyr
nsmutabledata
subview
password-recovery
wicket-1.5
xhprof
xcode6.3.1
android-2.3-gingerbread
forceclose
cpu-time
strdup
pbkdf2
flv
xmlwriter
spark-view-engine
coordinate
jdom
monocross
autosize
uploading
yuidoc
multidrop-bus
kohana-auth
tablet-pc
airprint
aggregator
firephp
sqlsitemapprovider
error-detection

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App