Skip to content

forkPreloads crashes remote form functions on hover; TypeError: right-hand side of 'in' should be an object, got symbol #15318

@mihaipoenaru

Description

@mihaipoenaru

Describe the bug

When navigating/hovering between two links that have remote forms being used in their respective pages, a weird error occurs with the message that's in the title. It seems to be caused by this line: return key in issues ? 'true' : undefined;

Reproducing this was an absolute pain, as the conditions for it are quite elusive, but it essentially breaks your entire page up until the nearest boundary.

Reproduction

  1. Clone my repro and install the project. Preferably with bun, but I got it to work with node too.

  2. Start in dev mode and go to http://localhost:5173/dashboard/properties/propuuid (didn't have time to minify the project too much, but I deleted most of it, and the repro is self-contained within that page)

  3. There's a button "hover and click here first". Give it about a 1 second hover just to make sure the preload fires, then click. It will take you to a second page

  4. In the breadcrumb up top, you will see "...and then here". Same thing as with the button. Hover it for a bit, then click.

  5. Final step, hover over the button again. The instant the mouse is over the button, the page will crash and hit the nearest boundary, printing the error message I mentioned.

Finding and making a repro for this was wild. I tried on stackblitz, but I couldn't get the exact structure that was causing the error, so I had to do it by manually copying my project and deleting all of the logic in it.

Logs

TypeError: right-hand side of 'in' should be an object, got symbol
    get aria-invalid form-utils.js:651
    children +page.svelte:27
    attribute_effect attributes.js:518
    update_reaction runtime.js:258
    update_effect runtime.js:460
    create_effect effects.js:124
    managed effects.js:407
    attribute_effect attributes.js:517
    finish async.js:62
+layout.svelte:77:42
    onerror +layout.svelte:77
    error boundary.js:456
    run_all utils.js:46
    run_micro_tasks task.js:10
    queue_micro_task task.js:28
    (Async: VoidFunction)
    queue_micro_task task.js:19
    bind_this this.js:52
    execute_effect_teardown effects.js:432
    destroy_effect effects.js:516
    destroy_effect_children effects.js:464
    destroy_effect effects.js:504
    destroy_effect_children effects.js:464
    destroy_effect effects.js:504
    destroy_effect_children effects.js:464
    destroy_effect effects.js:504
    destroy_effect_children effects.js:464
    destroy_effect effects.js:504
    destroy_effect_children effects.js:464
    destroy_effect effects.js:504
    destroy_effect_children effects.js:464
    destroy_effect effects.js:504
    destroy_effect_children effects.js:464
    destroy_effect effects.js:504
    destroy_effect_children effects.js:464
    destroy_effect effects.js:504
    destroy_effect_children effects.js:464
    destroy_effect effects.js:504
    destroy_effect_children effects.js:464
    destroy_effect effects.js:504
    destroy_effect_children effects.js:464
    destroy_effect effects.js:504
    destroy_effect_children effects.js:464
    destroy_effect effects.js:504
    destroy_effect_children effects.js:464
    destroy_effect effects.js:504
    destroy_effect_children effects.js:464
    destroy_effect effects.js:504
    destroy_effect_children effects.js:464
    destroy_effect effects.js:504
    destroy_effect_children effects.js:464
    destroy_effect effects.js:504
    destroy_effect_children effects.js:464
    destroy_effect effects.js:504
    error boundary.js:391
    invoke_error_boundary error-handling.js:56
    finish async.js:65
    flatten async.js:75
    (Async: promise callback)
    flatten async.js:75
    attribute_effect attributes.js:507
    children +page.svelte:88
    snippet2 snippet.js:53
    snippet snippet.js:37
    ensure branches.js:193
    update_reaction runtime.js:258
    update_effect runtime.js:460
    create_effect effects.js:124
    branch effects.js:418
    ensure branches.js:193
    snippet snippet.js:37
    update_reaction runtime.js:258
    update_effect runtime.js:460
    create_effect effects.js:124
    block effects.js:395
    snippet snippet.js:30
    Field field.svelte:71
    add_svelte_meta context.js:49
    Field field.svelte:71
    effect2 hmr.js:50
    update_reaction runtime.js:258
    update_effect runtime.js:460
    create_effect effects.js:124
    branch effects.js:418
    wrapper hmr.js:41
    update_reaction runtime.js:258
    update_effect runtime.js:460
    create_effect effects.js:124
    block effects.js:395

System Info

System:
    OS: macOS 26.2
    CPU: (11) arm64 Apple M3 Pro
    Memory: 232.39 MB / 18.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 25.6.0 - /opt/homebrew/bin/node
    npm: 11.8.0 - /opt/homebrew/bin/npm
    bun: 1.3.9 - /opt/homebrew/bin/bun
    Deno: 2.6.8 - /opt/homebrew/bin/deno
  Browsers:
    Safari: 26.2
  npmPackages:
    @sveltejs/kit: ^2.51.0 => 2.51.0 
    @sveltejs/vite-plugin-svelte: ^6.2.4 => 6.2.4 
    svelte: ^5.50.3 => 5.50.3 
    vite: ^7.3.1 => 7.3.1

Severity

serious, but I can work around it

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions