Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SelectField docs page contains form actions that error on submit. #152

Closed
willnationsdev opened this issue Dec 11, 2023 · 3 comments
Closed

Comments

@willnationsdev
Copy link
Contributor

While working on your suggestion to incorporate #132 into #127, I came across this bug. After confirming it happened in main and not part of my own changes, I'm reporting it here.

If you run pnpm dev from the packages\svelte-ux directory and navigate to the SelectField component's webpage, there are a few parts of the page that contain examples that include <Form> usage. When submitting these forms, it now produces a regression in which the following uncaught TypeError is thrown and the UI for said preview example thenceforth freezes until you completely refresh the page to reset things. Not sure when exactly this began happening, but it wasn't an issue a month ago.

Uncaught TypeError: Cannot perform 'IsArray' on a proxy that has been revoked
    at clone (<anonymous>:555:19)
    at <anonymous>:555:57
    at Array.map (<anonymous>)
    at clone (<anonymous>:555:48)
    at clone (<anonymous>:562:20)
    at <anonymous>:555:57
    at Array.map (<anonymous>)
    at clone (<anonymous>:555:48)
    at serializeNode (<anonymous>:656:31)
    at Object.remove (<anonymous>:681:15)

Investigating the error, it appears to have something to do with the immer library and the use of its data outside of the scope in which they are valid. I already tried replacing the use of draft in the page's form examples with current instead, but that didn't seem to resolve the issue.

@techniq
Copy link
Owner

techniq commented Dec 11, 2023

Thanks @willnationsdev.

I just tried to reproduce myself and it appears to work for me (both on master and on my local branch I'm working on).

CleanShot.2023-12-11.at.14.56.47-converted.mp4

Am I doing it wrong to reproduce?

Btw, the last time we bumped immer (10.0.2 => 10.0.3) was ~Oct 13th and the major (9.0.19 => 10.0.2) was ~Sept 13th when Svelte was bumped from 3 => 4 (which is likely when the regression happened, unless it went unnoticed well before that)

@willnationsdev
Copy link
Contributor Author

Ahhhh, nope, nevermind. Seems that this is being triggered by some sort of Chrome extension I have installed (not sure which one). It worked fine when I ran it in Firefox and Edge.

@techniq
Copy link
Owner

techniq commented Dec 11, 2023

No worries, and I wasn't going to be surprised if it was an immer bug / regression. I've hit some challenging issues with it (especially with draft scoping). Hoping to remove it with Svelte 5 runes in the future, hopefully.

@techniq techniq closed this as completed Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants