push.js: Not working in chrome

Hi All, I don’t know whats wrong with me. Push.js is working fine in mozilla for both (desktop/mobile) but not working for chrome while on desktop chrome it is working like a charm but for mobile chrome it never shows an error & not a notification. Here is my code:

Push.config({serviceWorker: '/js/alerts/serviceWorker.min.js'}); Push.create('XYZ is online', { body: 'You can contact him now', icon: '/images/logo.png', link: '#', requireInteraction: false, tag: 'online-alert', vibrate: [200, 100] }).catch(function(e) { console.log(e); });

Please help if there is any fix Thanks

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (5 by maintainers)

Most upvoted comments

Same here.

I placed serviceWorker.js in the root and I’m still getting an

Uncaught (in promise) PushError: permission request declined.

It’s in the same folder as index.html

Works in Firefox, Safari

Me too. Chrome Version 62.0.3202.75 (Official Build) (64-bit) - MacOS 10.12.6 Error: Uncaught (in promise) PushError: permission request declined serviceWorker.js was included.

Firefox, Safari worked 😦

Hi,

In Chrome 62 I get that error:

Uncaught (in promise) PushError: permission request declined

In Chrome Canary 64, IE, Edge, Fiefox, Opera it works.

Mike.

I forgot: I tested on https://pushjs.org/

PS: after implementing it, it works in Chrome 62 but not with pushjs.org.