denoland/deno · error · TypeError
BenchContext::start() has already been invoked
Error message
BenchContext::start() has already been invoked
What it means
The HTTP download of the laufey archive completed (after retries) but the body decoded to zero bytes, so there is nothing to SHA-256 verify and the fetch is treated as a failed download of that URL.
Source
Thrown at cli/js/40_bench.js:432
allSlice,
allLength,
);
}
/** @param desc {BenchDescription} */
function createBenchContext(desc) {
return {
[SymbolToStringTag]: "BenchContext",
name: desc.name,
origin: desc.origin,
start() {
if (currentBenchId !== desc.id) {
throw new TypeError(
"The benchmark which this context belongs to is not being executed",
);
}
if (currentBenchUserExplicitStart != null) {
throw new TypeError(
"BenchContext::start() has already been invoked",
);
}
currentBenchUserExplicitStart = benchNow();
},
end() {
const end = benchNow();
if (currentBenchId !== desc.id) {
throw new TypeError(
"The benchmark which this context belongs to is not being executed",
);
}
if (currentBenchUserExplicitEnd != null) {
throw new TypeError("BenchContext::end() has already been invoked");
}
currentBenchUserExplicitEnd = end;
},
};View on GitHub (pinned to 89f33cbef2)
Solutions
- Simply retry the command — empty 2xx bodies are usually transient
- Bypass or fix the intercepting proxy for the laufey release host
- Verify the URL with curl and confirm a non-empty payload and sane Content-Length
- Clear the partial cache entry and re-run so a fresh download is attempted
Defensive patterns
Strategy: retry
Validate before calling
const res = await fetch(url, { method: 'HEAD' });
const len = Number(res.headers.get('content-length'));
if (res.ok && len === 0) throw new Error('mirror/proxy returned empty body — switch network or mirror'); Try / catch
for (let i = 0; i < 3; i++) {
try { return await download(url); }
catch (e) {
if (!/empty response/.test(String(e))) throw e;
await sleep(1000 * (i + 1));
}
}
throw new Error('empty response persisted after retries — check proxy/network'); Prevention
- Bypass intercepting proxies for the laufey release host
- Pre-download the archive once into the cache on a healthy network
- Check Content-Length before trusting a 2xx from unfamiliar mirrors
When it happens
Trigger: A proxy or SSL-inspecting gateway returning a 2xx with an empty body; a transient origin/mirror fault; a redirect chain ending in an empty response.
Common situations: Corporate proxies and TLS-inspection appliances; captive-portal or degraded VPN networks; mirror outages.
Related errors
- The benchmark which this context belongs to is not being exe
- BenchContext::end() has already been invoked
- Bench attempted to exit with exit code: ${exitCode}
- Object is not a valid image or a path to an image. `Deno.jup
- Either `node` or `range` must be provided when reporting an
AI-assisted analysis of denoland/deno@89f33cbef2 (2026-08-16).
Data as JSON: /api/errors/9f892ef2ec47cfef.
Report an issue: GitHub.