Skip to content

[5.43.9] Reading async data in {@attach} causes Cannot read properties of undefined (reading 'f') #17194

@sillvva

Description

@sillvva

Describe the bug

Reading remote function data in an attachment causes the error:

TypeError: Cannot read properties of undefined (reading 'f')

This error started in 5.43.9. It works in 5.43.8, although the boundary content is duplicated (an issue fixed in 5.43.9).

Current workaround is passing the data to the attachment in a callback function.

  <button
    {@attach download(() => ({
      filename: "data.json",
      blob: new Blob([JSON.stringify(data)])
    }))}
  >
    Export
  </button>

Reproduction

https://stackblitz.com/edit/sveltejs-kit-template-default-3yuabjmd?file=src%2Flib%2Fcomponent.svelte,src%2Froutes%2F%2Bpage.svelte

Logs

System Info

System:
    OS: macOS 26.1
    CPU: (16) arm64 Apple M4 Max
    Memory: 309.19 MB / 48.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 24.11.0 - /Users/sillvva/.nvm/versions/node/v24.11.0/bin/node
    npm: 11.6.1 - /Users/sillvva/.nvm/versions/node/v24.11.0/bin/npm
    pnpm: 10.21.0 - /Users/sillvva/.nvm/versions/node/v24.11.0/bin/pnpm
    bun: 1.2.20 - /Users/sillvva/.bun/bin/bun
  Browsers:
    Firefox: 144.0
    Safari: 26.1
  npmPackages:
    svelte: 5.43.9 => 5.43.9

Severity

annoyance

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions