matrix-org / sygnal

Sygnal: reference Push Gateway for Matrix
Apache License 2.0
153 stars 139 forks source link

Web push notifications are not working with web.push.apple.com (Safari) #338

Closed Dainiu5 closed 10 months ago

Dainiu5 commented 1 year ago

I am working with web push notifications and have configured sygnal push gateway accordingly. Notifications get delivered to Chrome and Firefox browser clients. However, notifications fail when sending them to Safari browser. The error log is shown below. Has anyone come across this problem when working with apple web push notifications?

Error logs:

2023-06-07 14:32:28,034 [1] WARNING sygnal.webpushpushkin webpush request failed for pushkey BLAFJI0imay67mWA7FmNz42hV-3uO36QUhQSJeAOE0VDTOPiOvDdDuuRM_JLAGO-mkTzeL4QCGlxwcZuV0J4xRE; web.push.apple.com responded with 403: {"reason":"BadJwtToken"}
2023-06-07 14:32:28,040 [1] INFO  sygnal.access Handled request: "<some-ip>" - - [07/Jun/2023:14:32:28 +0000] "POST /_matrix/push/v1/notify HTTP/1.1" 200 16 "-" "Synapse/1.81.0"

web.push.apple.com responded with 403: {"reason":"BadJwtToken"}

erikjohnston commented 1 year ago

That looks to me like the client is failing to correctly register for web push with Apple, and so our attempts to push to use the client submitted push key is failing? Basically Apple is saying the pushkey submitted by the client is wrong somehow. Might be worth trying to get a new pushkey from Apple and trying again?

H-Shay commented 1 year ago

Any updates on this? Did the suggestion resolve your issue?

reivilibre commented 10 months ago

There doesn't seem to be enough information here in order to reproduce or fix this issue right now.

I will close this issue but it can be reopened (or a new issue, linking to this one, opened) if the issue recurs with more information available.

Thank you.