Web push: empty payload does not work

Fixed Issue #15194521


Marco C.
Dec 22, 2017
This issue is public.
Reported by 3 people

Sign in to watch or report this issue.

Steps to reproduce

This bug is related to the Push API and Service Workers. I post in this general category of the bug tracker because I haven’t found a more specific category.

At Pushpad, a web push notification service, we are trying to add support for Edge. We already send millions of notifications daily to Mozilla autopush and Firebase Cloud Messaging using the Push API and VAPID. Everything works properly.

Now we are unable to support Microsoft Edge: when we try to subscribe to the notifications, we get the authorization prompt and we store the endpoint successfully on our server. However when we try to make a POST request to the endpoint we get 401 Unauthorized. Probably this is related to VAPID, however we use the exact same code for Firefox, Chrome and Opera and it works properly. The only problem is with Edge.

The error is too general to understand what’s wrong with the request. Could you please check your logs and provide additional information? It would be really helpful. You should be able to identify the requests sent by Pushpad because the VAPID payload contains 'sub’: 'mailto:support@pushpad.xyz’. If you need it I may also provide you the Ruby code used to generate the request (VAPID headers, etc.) and with the exact endpoint (in private).

Microsoft Edge 42.17063.1000.0
Microsoft EdgeHTML 17.17063


0 attachments

    Comments and activity

    • This is the code used to build the HTTP POST request and VAPID headers: https://gist.github.com/collimarco/7c0bf203695cdcec4e1f2a165d29d48a

    • For the client side, you can take a look at https://pushpad.xyz/pushpad.js In particular see pushApi.subscribe() and _.getApplicationServerKey(). In any case in the console I cannot see any error when I allow the push notifications and the endpoint is generated.

    • Microsoft Edge Team

      Changed Assigned To to “Venkat K.”

      Changed Assigned To from “Venkat K.” to “Ali A.”

      Changed Status to “Confirmed”

    • Are there any updates on this? (Let me know if you need anything else)

    • UPDATE: After some emails we have found the following issues:

      1. the 401 Unauthorized response was caused by a bug inside Pushpad: the HTTP POST requests were performed without the query string
      2. there was a bug in Windows: push notifications with an empty payload were not delivered
        The Windows bug should be fixed in the next build, as confirmed by Ali A.
    • Microsoft Edge Team

      Changed Status from “Confirmed” to “Fixed”

    • Thank you Marco for filing the bug and helping with providing a repro. We have fixed the issue and it should be available in an upcoming insider preview release.

    • Microsoft Edge Team

      Changed Title from “Web Push: 401 Unauthorized” to “Web push: empty payload does not work”

    • @Ali A. This is still happening on Windows 10 Mobile.

    You need to sign in to your Microsoft account to add a comment.

    Sign in