withastro / astro

The web framework for content-driven websites. ⭐️ Star to support our work!
https://astro.build
Other
46.81k stars 2.49k forks source link

Astro Actions - Cookie Too large #11973

Closed gaytanmisael closed 1 month ago

gaytanmisael commented 2 months ago

Astro Info

Astro                    v4.15.4
Node                     v20.17.0
System                   windows
Package Manager          pnpm
Output                   server
Adapter                  @astrojs/node
Integrations             @astrojs/alpinejs
                         @astrojs/tailwind

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

When I'm using Astro Actions with more than 3 fields with errors (Validation Errors, or regular Errors) the url-encoded cookie becomes way to big to store and exceeds the 4096 character limit.

cookie-error-network

Which then it returns undefined and does not return anything on the original form Screenshot 2024-09-11 222113

I'm also getting the strange "deleted" cookies that issue #11675 is getting.

What's the expected result?

To my understanding, the client should be correctly redirected to the original page with the correct error message.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/withastro-astro-jcacve

Participation

ematipico commented 2 months ago

We're aware of the limitations, thank you for the report.

matthewp commented 1 month ago

Fixed in https://github.com/withastro/astro/pull/12016, thanks for reporting.

michaelpayne02 commented 1 month ago

@gaytanmisael does this fix the "deleted" cookies issue for you?