web-push-libs / web-push-php

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

406 Not Acceptable #335

Closed Zencoi closed 3 years ago

Zencoi commented 3 years ago

Please confirm the following:

Setup

Please provide the following details, the more info you can provide the better.

Please check that you have installed and enabled these PHP extensions :

Problem

Please explain what behaviour you are seeing.

I'm sending push notification with web-push-php lib for a while now (about 1 year) and I'm starting having some errors on flush. I'm getting 406 Not Acceptable.

The getReason method of MessageSentReport returned by flush call give this : Client error: POST https://par02p.notify.windows.com/w/?token=xxxxxxxxxx resulted in a 406 Not Acceptable response

This started yesterday (July 18 2021) at 9:00. All errors occurs on endpoints like "https://xxxx.notify.windows.com/xxxx"

Expected

Please explain what you expected to happen

No error.

Features Used

Zencoi commented 3 years ago

Microsoft have fixed it

raulfdeztdo commented 2 years ago

Hi, I have the same problem, the web push notifications for chrome and for firefox are sent without problem, however for Edge they do not arrive and I get the following error back:

Client error: POST https://wns2-db5p.notify.windows.com/w/?token=BQYAAADuof2gokJoLSVIKIfsv0zYCQE2FwGAEXcrhE5k9Z%2f5NvhkH%2ffAVvW41p31sJ1hRqHhvN3Eya4Ax6g9vECDaJWeJzmvKB8h8Qb68yB%2blp4L6W%2bMtybken0cdIAcPfTwJt%2b5G%2foh4VDc%2fA%2biTxl%2frnDESRIsSnlFIiKnp38PZiuwsjsdr0D%2f2e7UbTXQyFQhFiGvy1YM2tPjZ5UfyYmeuc0bxfpB9MFvztXt%2fskVVWAXNyIbH9CR2L%2ble5hTwAC93XGZBBgf8Vi%2bVHkv%2fbkKoHhkTfbyHpS0n5VvYafr5L2p87Ruf24EqMOrXz94trgsxY805F0KKHG9mIsrEBIb%2fKol resulted in a 406 Not Acceptable response

Any solution?

I use Microsoft Edge - Versión 98.0.1108.50 (Compilación oficial) (64 bits)

eugbyte commented 2 years ago

@raulfdeztdo I have the same issue too, firefox and chrome works fine, but for edge, i get 406 error. Have you found a solution?

When I inspect the header, I see these values

'x-wns-notificationstatus': 'appthrottled',
'x-wns-status': 'appthrottled',

Not sure why there is throttling involved...

s0xDk commented 1 year ago

https://learn.microsoft.com/en-us/answers/questions/940324/406-not-acceptable-may-be-returned-when-sending-a.html

francogp commented 1 year ago

I have the same problem since yesterday, after sending 8 notifications.. that's a lot?