Edited this issue because my FF mobile was way out of date.

1. Subscribe to notifications on Chrome mobile, Firefox mobile. Verify they appear in /admin/config/pwa/notification/subscriptions
2. Send notification
3. On /admin/config/pwa/notification/subscriptions only 1 of them (chrome) is marked with "last used"

(chrome mobile, firefox desktop, chrome desktop - all work!)

Not sure if this is an issue with pwa_webpush or the library.

CommentFileSizeAuthor
#6 Screenshot_20201008_113802.png72.14 KBdjdevin
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

djdevin created an issue. See original summary.

djdevin’s picture

Title: Subscriptions from firefox mobile immediately expire » Subscriptions from firefox not sending
Issue summary: View changes
djdevin’s picture

Title: Subscriptions from firefox not sending » Subscriptions from firefox mobile not sending
djdevin’s picture

Issue summary: View changes
nod_’s picture

So you see expired subscription in the admin/config/pwa/notification/subscriptions/expired page?

djdevin’s picture

So it's not expiring, I had that issue initially but I believe my firefox mobile was way out of date.

The issue is it's just not sending, I'm not sure why. Nothing in the watchdog except "Notification sent to users: 1, 598, 599. " Sorry I haven't had time to dig into it yet, here's a SS (after I sent notifications to all users). The "last used" for the firefox mobile isn't filled in.

admin = regular firefox - received
firefoxdevin = firefox on mobile (android) - not received
chromedevin = chrome on mobile (android) - received

subscription list

minishlink/web-push v6.0.2

djdevin’s picture

Huh:

{"code": 500, "errno": 999, "error": "Internal Server Error", "more_info": "http://autopush.readthedocs.io/en/latest/http.html#error-codes", "message": "Server error: INVALID_ARGUMENT: Request contains an invalid argument."}

djdevin’s picture

After investigation I found https://github.com/web-push-libs/web-push-php/issues/108

Setting

function pwa_webpush_send($notification, array $uids, array $options = []) {
 [...]
  $webpush->setAutomaticPadding(0);

fixed it for FF Android and other browsers worked as well.

nod_’s picture

like written here: https://github.com/web-push-libs/web-push-php/issues/108#issuecomment-54... let's add a default padding of 2000, i'm worried having this padding size would signal the use of the PWA module but is that better or worst than not padding message? I don't know. Might need to add a configuration for that actually.

  • nod_ committed 0994ee7 on 7.x-2.x
    Issue #3175587 by djdevin, nod_: Subscriptions from firefox mobile not...
nod_’s picture

Status: Active » Fixed

Thanks for looking into it. Reworked the admin page a bit and added a setting for the padding size. It now defaults to 2847 so it should be safe for firefox mobile :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.