-
Notifications
You must be signed in to change notification settings - Fork 305
Unable to send notifications to Microsoft Edge. (401 Unauthorized response) Works fine on Chrome and Firefox. #278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I have the same problem... |
I found the solutions here!!! #174 (comment) The field endpoint on DB must be VARCHAR 500 |
Any working solution for EDGE? |
Hey, I just noticed that there seems to be an issue with the Push Registration Endpoint that gets sent from the Browser Client and the handling in PHP itself. Basically, the Browser sends the Endpoint like this: Notice how the This is just a hint, I guess. Combined with the larger table field and this, you can easily get it to work. Edit: Actually, turned out in my case it was a tiny piece of code my co-worker just told me about, which automatically urlencodes the request data on the server side - which caused the issue, so make sure to not modify the endpoint either in the client or server. |
@dfun90 Thank you so much for your answer!!! (three exclamation marks because I'm excited) It turned out that I've been unnecessarily de-encoding the "endpoint" string in my POST controller before putting it into the database... |
On a similar note, I am having issues with Apple devices like iPad and iPhone. Does it work with Apple devices/IOS? |
Excellent! |
That was the solution for my problem: our DB field was set to VARCHAR 200 (what was working for Chrome and iOS push notifications, but Microsoft's needs 419 characters for its endpoint. So setting to VARCHAR 500 solved it :-) |
NOTE: Please test in a least two browsers (i.e. Chrome and Firefox). This
helps with diagnosing problems quicker.
Setup
Problem
So I am able to subscribe a user and save the endpoint and keys. I am also able to send the notification to Chrome and Firefox users. When sending to Microsoft Edge I get the error : 401 Unauthorized
The Vapid keys are setup correctly ( thats how it works for Chrome and Firefox.
Endpoint seems to be https://sg2p.notify.windows.com/.......
Expected
Features Used
Example / Reproduce Case
Here is an example of the output
[x] Message failed to sent for subscription https://sg2p.notify.windows.com/w/?token=BQYAAABJ1kl24AOKrMHjEzJGi2KuK7rOiv//d+oHwTbqS/l3wSh0ufoyWDxmswANey0hrcJqFjDy5J3XOsw0RKp6aEy5vzOSu18SbxLCRGI6dSrqv8A1X1Tl02UyV7ZCSCvASRSBsIjzSMMNnbd5ivSnxsoltAEb/2ItJX2jxv8kygB68AbYZJ07S/I1FwrnGc6WMPKB7wgJNTDgpvGFSImic5RhfYJnAoVtwaNdCoWiUQccCyXGks+PGYOWEKYBHcCB9OKWKSUfYEi6MPSN0TzzpVDNaFR+8GzOUi3XZKe0IkUeLAF10IrAFrQH0SfsmbOhsEZy4qjMkOxMd1Yg2brlBNxK:
Client error:
POST https://sg2p.notify.windows.com/w/?token=BQYAAABJ1kl24AOKrMHjEzJGi2KuK7rOiv//d+oHwTbqS/l3wSh0ufoyWDxmswANey0hrcJqFjDy5J3XOsw0RKp6aEy5vzOSu18SbxLCRGI6dSrqv8A1X1Tl02UyV7ZCSCvASRSBsIjzSMMNnbd5ivSnxsoltAEb/2ItJX2jxv8kygB68AbYZJ07S/I1FwrnGc6WMPKB7wgJNTDgpvGFSImic5RhfYJnAoVtwaNdCoWiUQccCyXGks+PGYOWEKYBHcCB9OKWKSUfYEi6MPSN0TzzpVDNaFR+8GzOUi3XZKe0IkUeLAF10IrAFrQH0SfsmbOhsEZy4qjMkOxMd1Yg2brlBNxK
resulted in a401 Unauthorized
responseOther
The text was updated successfully, but these errors were encountered: