Describe the bug
resolve(fn) is documented to await a reactive expression and return its first fully-settled value as a Promise. When the underlying async source resolves, this works. When it rejects after having been pending, the promise returned by resolve() never settles — it neither resolves nor rejects — and the internal createRoot is never disposed, leaking the root and everything under it.
Typical real-world hit: SSR or a route preloader doing await resolve(...) on data that 404s — the request hangs instead of surfacing the error.
Reproduction
import { createMemo, createRoot, resolve } from "@solidjs/signals";
const delay = (ms: number) => new Promise(r => setTimeout(r, ms));
await createRoot(async () => {
const m = createMemo(async () => {
await delay(10);
throw new Error("boom");
});
await resolve(() => m()); // hangs forever — never resolves, never rejects
});
Describe the bug
resolve(fn)is documented to await a reactive expression and return its first fully-settled value as aPromise. When the underlying async source resolves, this works. When it rejects after having been pending, the promise returned byresolve()never settles — it neither resolves nor rejects — and the internalcreateRootis never disposed, leaking the root and everything under it.Typical real-world hit: SSR or a route preloader doing
await resolve(...)on data that 404s — the request hangs instead of surfacing the error.Reproduction