webpush icon indicating copy to clipboard operation
webpush copied to clipboard

Firefox for Android doesn't deliver every push notifications

Open way2datta opened this issue 5 years ago • 10 comments

Thanks for the library. It is working well for Chrome/Firefox for MAC/Windows. Also, working well with Edge for Windows and Android Chrome.

However, it is giving me a problem when it comes to Android FireFox.

I can subscribe and unsubscribe from Android Firefox. But when a message is sent to the client on Android Firefox below error is thrown:

local.WARNING: Notification failed to sent for subscription 
https://updates.push.services.mozilla.com/wpush/v2/gAAAAABdrtWvpZ_Cb5z45s6s6Sio_y6twMDdwlG4JDYP4qCHfyByM6khVgqmaBODaDTCLAGrN3gQOgUoHfI_Dz8zZ8Lp3_uE-VSvNTZXWD1Ys7_-sUd8prpRpug5tFyorg8TTCpEHuhJG8ygUUsEcQzMM__RadRsHFvdQkdUnrY7vQ6DUbG_zKA: 
Client error: `POST https://updates.push.services.mozilla.com/wpush/v2/gAAAAABdrtWvpZ_Cb5z45s6s6Sio_y6twMDdwlG4JDYP4qCHfyByM6khVgqmaBODaDTCLAGrN3gQOgUoHfI_Dz8zZ8Lp3_uE-VSvNTZXWD1Ys7_-sUd8prpRpug5tFyorg8TTCpEHuhJG8ygUUsEcQzMM__RadRsHFvdQkdUnrY7vQ6DUbG_zKA` 
resulted in a `410 Gone` response:

{"code": 410, "errno": 999, "error": "",
 "more_info": "http://autopush.readthedocs.io/en/latest/http.html#error-codes",  (truncated...)

way2datta avatar Oct 22 '19 10:10 way2datta

Are you still having an issue?

atymic avatar May 18 '20 22:05 atymic

I still have this issue

oele-dev avatar Jun 19 '20 17:06 oele-dev

I still have this issue

So do I. Any news, about that?

joantp avatar Nov 08 '20 13:11 joantp

Same here

sebsobseb avatar Nov 22 '20 12:11 sebsobseb

Dito Could it be related to this

Perhaps some where we can add: $webpush->setAutomaticPadding(2847); $webpush->sendNotification(...)

nyneplus avatar Dec 17 '20 08:12 nyneplus

I don't know if it's related, but I'm getting version 1 of Mozilla webpush service endpoint (so https://updates.push.services.mozilla.com/wpush/v1/...), instead of version 2. And yes, notifications are not delivered, however there are no errors.

maciek-szn avatar Feb 09 '21 20:02 maciek-szn

Hi, im facing this issue too. I've tried to remote debug firefox on my phone to catch errors but there are none, checked laravel logs - same story. Im getting the v1 endpoint in database as @maciek-szn. Notifications work in every other browser except firefox mobile. Anyone knows what the problem is?

gbr161 avatar Mar 28 '22 22:03 gbr161

I run into the same issue. It's explained here: https://github.com/SherClockHolmes/webpush-go/issues/23#issuecomment-479562884

It's possible to set the automatic Padding to 3052 bytes in WebPush: https://github.com/web-push-libs/web-push-php#how-can-i-disable-or-customize-automatic-padding

It could be added here: https://github.com/laravel-notification-channels/webpush/blob/c8778dff651bb0050a10063ec0a19e597d476338/src/WebPushServiceProvider.php#L33 But I think an option in the config to enable it, would be better.

Another automatic way would be to check if the endpoints is v1: https://updates.push.services.mozilla.com/wpush/v1/... and then set automatic padding to 3052 bytes or if not 4078 bytes here: https://github.com/laravel-notification-channels/webpush/blob/22725422341d92a0e5266a0c94f1d20b0d112c02/src/WebPushChannel.php#L55

goaround avatar Aug 04 '22 11:08 goaround

I think I've something here guys. Maybe you can make use of it too.

Hope it helps.

https://github.com/laravel-notification-channels/webpush/pull/176#issuecomment-1327777681

imrodrigoalves avatar Nov 25 '22 18:11 imrodrigoalves