Skip to content

Getting inaccurate "duplicate form ID" warnings in Async Svelte #627

@gyenabubakar

Description

@gyenabubakar
  • Before posting an issue, read the FAQ and search the previous issues.

Description
There's only one form on my page with a set ID. In fact, only one form in the app. But when I make changes in the code, after hot reload, I get a warning that I have a duplicate form ID.

If applicable, a MRE

  1. Clone https://github.com/gyenabubakar/superforms-infinite-id-warnings
  2. Install dependencies.
  3. pnpm run dev and open the app in the browser
  4. In the editor, inside src/routes/+page.svelte, replace line 27 with:
const { form: formData, allErrors } = form;
  1. Return to the browser and check your console. The warning should be visible, even though there's only 1 form in the project.

In the real app I was working on, this warning was infinite, which led to the app crashing. I was no able to reproduce the infinite warning though. I disabled the warning but that didn't make any difference—the app still hangs. If the 'duplicate ID' warning could be accurate, this may fix it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions