Nickersoft / push.js

The world's most versatile desktop notifications framework :earth_americas:
https://pushjs.org
MIT License
8.77k stars 548 forks source link

Notifications not showing up in Chrome #259

Open kg-kartik opened 4 years ago

kg-kartik commented 4 years ago

Does push.js shows notifications in chrome if you are using localhost,i.e , http connection..In my case it is working well in edge but i cant see any notification in chrome ? So, I infer that chrome is blocking notification on sites with insecure http connection as it blocks Notifications from Notification API.

theLufenk commented 4 years ago

Hello @kg-kartik Could you please confirm if: 1) window.Notification.permission is returned to be true in the devtools 2) Running new Notification('test') shows a notification.

Exlord commented 3 years ago

Does push.js shows notifications in chrome if you are using localhost,i.e , http connection..In my case it is working well in edge but i cant see any notification in chrome ? So, I infer that chrome is blocking notification on sites with insecure http connection as it blocks Notifications from Notification API.

Test and confirm that Notifications do work in http://localhost in chrome

kg-kartik commented 3 years ago

Does push.js shows notifications in chrome if you are using localhost,i.e , http connection..In my case it is working well in edge but i cant see any notification in chrome ? So, I infer that chrome is blocking notification on sites with insecure http connection as it blocks Notifications from Notification API.

Test and confirm that Notifications do work in http://localhost in chrome

They dont work.

mohibsheth commented 3 years ago

Doesn't work for me either on Chrome.

window.Notification.permission is returned to be true in the devtools returns "granted"

Running new Notification('test') shows a notification. no, it does not.

Works on Firefox but not on Chrome and Edge.

Qazzquimby commented 2 years ago

My observations, in case they're helpful. All on window 10

Chrome 101 Push.create('test'); Asks permission the first time, then does nothing. window.Notification.permission is 'granted' new Notification('test'); does nothing

Vivaldi 5.2 Did not ask for permission when Push.create was called. After manually enabling in settings, notifications worked as expected.

Firefox 100 Did ask permission and did create the notification, though they were small and silent browser notifications instead of desktop (probably expected.

mahdihasanzadeh-dev commented 2 years ago

Grant Chrome Notification Permission on Windows

Go to Settings > System > Notifications & actions and make sure the Notifications option is toggled on. afterward, scroll to the Get notifications from these senders section and make sure Google Chrome is toggled on.

przemokon commented 2 years ago

In my case it was Focus settings in Windows 11. This setting hides all notifications. Maybe this will help somebody...