web-push-libs / web-push-php

Web Push library for PHP
MIT License
1.69k stars 294 forks source link

Not getting notification in Desktop Chrome #270

Closed Ashutoshsaxena97 closed 6 months ago

Ashutoshsaxena97 commented 4 years ago

Hi, I have implemented the web push notification using the web-push-PHP library and it is working well with Firefox, Chrome with Android (Mobile) but having an issue with desktop chrome. I have checked multiple times the notification is popped up successfully in Firefox, Chrome with Android (Mobile) but in the desktop chrome, it does not popup. [ Users can be subscribed successfully but not able to send the notification in desktop chrome] I have print the response of $webPush->sendNotification( $notification['subscription'], $notification['payload'] // optional (defaults null) ); and its return 1 even though notification does not push to chrome desktop browser, if I push notification manually from crome-developer mode/application/service-worker then the notification will push.

operating system: Linux PHP Version: 7.3

b14r commented 4 years ago

Could you check your chrome Application > Service Workers tab to check if you get an error when you deploy a push to it?