0

I my web push server I try send message to endpoint start with "jmt17.google.com" and I got error 404

A valid push subscription endpoint should be specified in the URL as such: https://fcm.googleapis.com/wp/dHIoDxE7Hdg:APA91bH1Zj0kNa...

if I change jmt17.google.com to fcm.googleapis.com in this endpoint I got error 410

push subscription has unsubscribed or expired.

Its mean that 404 error from send push to "jmt17.google.com" subscription is expired ?

1 Answer 1

1

The hosts jmt17.google.com and fcm.googleapis.com are not interchangeable for a push subscription.

The distinction comes from using the "stable" channel Chrome (i.e. the official Google Chrome browser) and some "staging" channel Chromium build (i.e. likely a Linux build, or something not directly provided by www.google.com/chrome): see Chromium's source:

From your errors I see that jmt17.google.com doesn't know (404 not found) about this push subscription, but fcm.googleapis.com does (410 gone), meaning the push subscription was created on the official Google Chrome browser (with https://developer.mozilla.org/en-US/docs/Web/API/PushManager/subscribe) and not with a Chromium build, and jmt17.google.com just doesn't know about it at all.

The suggested error A valid push subscription endpoint should be specified in the URL as such: https://fcm.googleapis.com/wp/dHIoDxE7Hdg:APA91bH1Zj0kNa... seems just coincidental, as other people have encountered the exact same string (dHIoDxE7Hdg:APA91bH1Zj0kNa) and is likely a hardcoded message for 404 errors.

And yes, the subscription has expired, as indicated by 410 status, meaning it existed at some point but has been invalidated by the browser. This typically happens when the user revokes the Notification permission somehow (or, service worker has been uninstalled, or site data cleared, or just https://developer.mozilla.org/en-US/docs/Web/API/PushSubscription/unsubscribe)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.