safari push notification endpoint always empty

Hi,

I implemented push notifications on my PWA, and it work fine with all browsers except with Safari. I followed all the recommendations given by Brady Eidson in this video : Meet Web Push for Safari

And the result is that all the push notification process work fine with others browsers, from the subscription to the notification delivery and display. But with Safari the endpoint is always empty and I do not understand why. No error is triggered during subscription. Just the result is a subscription with an empty endpoint.

I have the same result on iPad, iPhone and iMac. Everything is working well with others browsers or with android smartphone. But contrary to what Brady Eidson promised in his video, it does not work with Safari.

What does it mean “endpoint always empty”? Are you talking about the endpoint on your server, or on the client.

Please elaborate on the issue and explain any debugging steps you have taken and the results you are seeing.

I am talking about the result of the subscription on the client side when subscribing to the push notifications :

const subscription = await registration.pushManager.subscribe(subscriptionOptions);

The result of this operation on Safari is :

{endpoint: "", expirationTime: null, options: PushSubscriptionOptions, getKey: function, unsubscribe: function, …}

The endpoint il always empty on Safari with no error. And the same code work fine with all others browsers with an endpoint where to send the notifications. And the push notifications are working fine from the subscription to the display on others browsers.

I am testing on :

iMac 3,4 GHz Intel Core i5 - Ventura 13.7

  • Safari 18.0.1
  • Chrome Version 130.0.6723.71 (Build officiel) (x86_64)
  • Firefox 131.0.3 (64 bits)
  • Version 130.0.2849.56 (Version officielle) (x86_64)

iPad (gen 6) v17.6.1

  • Safari

OPPO Android CPH2269 V12.1

  • Chrome v130.0.6723.86

✅ It work on iPad 17.7.1 now !

safari push notification endpoint always empty
 
 
Q