getSetCookie is not a function

I've upgraded a Workers project by bumping Hono and Wrangler by a few minor versions. In staging, I'm now seeing:  "TypeError: this[#res].headers.getSetCookie is not a function"  in my streaming logs. This didn't exist before.  Anyone have ideas on how to resolve this or suggestions on where to dig? Does this sound like a Hono, Node, or Workers? More Info: I reverted Hono back to the original version and still have the same issue.
8 Replies
Hello, I’m Allie!
That sounds like a Hono Issue. I know that in the current(or at least the documented version), Cookie Utils are imported from hono/cookie, and aren't present on the Headers
JustinNoel
JustinNoelOP3w ago
It doesn't happen on my production release using the old Hono. So, it's feeling like not a Hono issue to me. Thanks for the response though. I've asked in the Hono discord too.
JustinNoel
JustinNoelOP3w ago
There is this line in the Hono source though: const cookies = this.#res.headers.getSetCookie() https://github.com/honojs/hono/blob/main/src/context.ts#L407 I just can't understand why this works in production on an old build and not staging on a new build.
GitHub
hono/src/context.ts at main · honojs/hono
Web framework built on Web Standards. Contribute to honojs/hono development by creating an account on GitHub.
JustinNoel
JustinNoelOP3w ago
This DOES work in local development. Maybe it's just something else I've changed.
Hello, I’m Allie!
Unless you have another middleware somewhere, not sure where else the problem could be Since afaik Workers has never had a getSetCookie() on the Headers type Wait wut Really 🤯 My bad
JustinNoel
JustinNoelOP3w ago
that was it. Thank you so much!!!! No worries. Also, I really got bit by the new Pages wrangler.toml config beta. Took a long time to work that all out after screwing it all up.
Hello, I’m Allie!
And now they are trying to get everyone onto Assets :lul:
fry69
fry693w ago
"Don't write this down, next week all of this is going to change." (*)
Want results from more Discord servers?
Add your server