@ -105,7 +105,7 @@ Values added to a `Warp` on the server may already be in use (or on their way to
### warp_serialization_failed
```
Failed to serialize the value with key `%key%` in `Warp``%id%`.
Failed to serialize data added to a `Warp`.
`Warp` can serialize anything [`uneval` from `devalue`](https://npmjs.com/package/devalue) can, including promises. To serialize other values, pass a `replacer` to `render` or `withWarp`.
The value with key `%key%` in `Warp``%id%` was created, but at least part of it was not used during the render.
The value was set in:
%stack%
Part of the data added to `Warp` instances was not used during the render, so the response was delayed until it resolved.
```
The server has to wait for this value to resolve before it can send the rendered HTML, which delays the response even though the value was not needed for the render.
The most likely cause of this is creating a value in the `script` block of your component and then `await`ing
the result inside a `svelte:boundary` with a `pending` snippet:
@ -78,7 +78,7 @@ Values added to a `Warp` on the server may already be in use (or on their way to
## warp_serialization_failed
> Failed to serialize the value with key `%key%` in `Warp``%id%`.
> Failed to serialize data added to a `Warp`.
>
> `Warp` can serialize anything [`uneval` from `devalue`](https://npmjs.com/package/devalue) can, including promises. To serialize other values, pass a `replacer` to `render` or `withWarp`.
> The value with key `%key%` in `Warp``%id%` was created, but at least part of it was not used during the render.
>
> The value was set in:
> %stack%
The server has to wait for this value to resolve before it can send the rendered HTML, which delays the response even though the value was not needed for the render.
> Part of the data added to `Warp` instances was not used during the render, so the response was delayed until it resolved.
The most likely cause of this is creating a value in the `script` block of your component and then `await`ing
the result inside a `svelte:boundary` with a `pending` snippet:
*`Warp`canserializeanything[`uneval`from`devalue`](https://npmjs.com/package/devalue) can, including promises. To serialize other values, pass a `replacer` to `render` or `withWarp`.
consterror=newError(`warp_serialization_failed\nFailed to serialize the value with key \`${key}\` in \`Warp\`\`${id}\`.
exportfunctionwarp_serialization_failed(stack){
consterror=newError(`warp_serialization_failed\nFailed to serialize data added to a \`Warp\`.
\`Warp\` can serialize anything [\`uneval\` from \`devalue\`](https://npmjs.com/package/devalue) can, including promises. To serialize other values, pass a \`replacer\` to \`render\` or \`withWarp\`.
`%c[svelte] unresolved_warp\n%cThe value with key \`${key}\` in \`Warp\`\`${id}\` was created, but at least part of it was not used during the render.
Thevaluewassetin:
${stack}\nhttps://svelte.dev/e/unresolved_warp`,
bold,
normal
);
console.warn(`%c[svelte] unresolved_warp\n%cPart of the data added to \`Warp\` instances was not used during the render, so the response was delayed until it resolved.\nhttps://svelte.dev/e/unresolved_warp`,bold,normal);
(res, rej) => environment === 'server' ? setTimeout(() => res('did you ever hear the tragedy of darth plagueis the wise?'), 0) : rej('should not run')
(res, rej) => environment === 'server' ? setTimeout(() => res('did you ever hear the tragedy of darth plagueis the wise?'), 10) : rej('should not run')
(res, rej) => environment === 'server' ? setTimeout(() => res('did you ever hear the tragedy of darth plagueis the wise?'), 0) : rej('should not run')
(res, rej) => environment === 'server' ? setTimeout(() => res('did you ever hear the tragedy of darth plagueis the wise?'), 10) : rej('should not run')
(res, rej) => environment === 'server' ? setTimeout(() => res('did you ever hear the tragedy of darth plagueis the wise?'), 0) : rej('should not run')
(res, rej) => environment === 'server' ? setTimeout(() => res('did you ever hear the tragedy of darth plagueis the wise?'), 10) : rej('should not run')
const unresolved = warp.getOrInsertComputed('unused_key', () => new Promise(
(res, rej) => environment === 'server' ? setTimeout(() => res('did you ever hear the tragedy of darth plagueis the wise?'), 0) : rej('should not run')
(res, rej) => environment === 'server' ? setTimeout(() => res('did you ever hear the tragedy of darth plagueis the wise?'), 10) : rej('should not run')