Closed Bug 1229098 Opened 9 years ago Closed 8 years ago

please provide an event when a site has hit it's silent push event quota limit

Categories

(Core :: DOM: Push Subscriptions, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: edwong, Unassigned)

References

Details

Currently if you send about ~15 push events (every 20s) without displaying an on screen notification you will be unsubscribed from the push channel.  Web Devs should get some form of event or feedback that this has occurred so they can build their application appropriately. If they don't get feedback, they think it's a bug or a coding error.

1. go here:
https://people.mozilla.org/~ewong2/push-notification-test/
2. select 'push msg - no notifications' combo box
3. click register service worker and subscribe buttons
4. enter 20 in repeat
5. enter 20 in delay
6. open browser console (not site console)
7. click 'XHR app server' button
8. open a new tab and close tab from step 1.
9. watch the console

actual: after about 15 pushes - no more come through

expected: as a developer i should get some event that tells me i hit the quota.
When a subscription exceeds its quota, it's marked as "expired" until the user visits the page again. After that, Firefox deletes the expired subscription and fires a `pushsubscriptionchange` even. The worker can then create a new subscription.

Dev Tools could show the subscription state (active or expired), as well as the number of remaining messages. It could also have a button for firing `pushsubscriptionchange`, so devs can make sure they're handling this event correctly.
Blocks: 1214248
I'm going to close this out - pushsubscriptionchange should satisfy this work flow
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
I think Dev Tools can use the private `nsIPushService` API to report the quota, too.
You need to log in before you can comment on or make changes to this bug.