Closed quroom closed 5 months ago
I am not sure what the problem was exactly. But now it works.
I only changed urlBase64ToUint8Array function
const base64 = (base64String + padding).replace(/-/g, "+").replace(/_/g, "/");
to
const base64 = (base64String + padding)
// eslint-disable-next-line no-useless-escape
.replace(/\-/g, "+")
.replace(/_/g, "/");
I don't think it is related. As long as I figure out it, I will leave some comment.
It's because of ttl I didn't write.
Yep, the TTL
is required (according to the RFC) I'll also caution about using standard base64 encoding. Python is very lax about what it accepts, but other languages (like Rust) are exceptionally pedantic about things.
send()
should set ttl
to 0 if you don't supply one. If it's not doing that, it might be a legit bug.
Yep, the
TTL
is required (according to the RFC) I'll also caution about using standard base64 encoding. Python is very lax about what it accepts, but other languages (like Rust) are exceptionally pedantic about things.
send()
should setttl
to 0 if you don't supply one. If it's not doing that, it might be a legit bug.
Then I guess it should be set with default value or showing error for like "need to set TTL" Because without setting it, almost every browser works , but edge doesn't work and response 400 error not including much information.
I get only this response
I'm sorry, Dave, but I can't do that: {} WebPushException('Push failed: 400 Bad Request')
It works well same parameter in webpush node module. I don't know why it doesn't work well. Could you help me?