facebook/flow · error · Error
Failed to find SHASUM256.txt line containing ${flowBinRelati
Error message
Failed to find SHASUM256.txt line containing ${flowBinRelativePath} What it means
With a checksums file loaded, getShasum searches it for a line containing `<platformDir>/<binaryName>` (e.g. flow-linux64-v0.230.0/flow). If no line mentions that exact relative path it throws — the shasums file does not cover the found binary.
Source
Thrown at packages/flow-for-vscode/src/utils/getVerifiedFlowBinPath.ts:98
} catch (err: any) {
logger.info(`Unable to verify SHASUM256.txt.sign:\n${err.message}`);
return readFile(path.join(extensionPath, 'PAST_FLOW_BIN_SHASUMS.txt'));
}
}
function getShasum(
shasums: string,
flowBinDirName: string,
flowBinName: string,
): string {
const flowBinRelativePath = `${flowBinDirName}/${flowBinName}`;
// eslint-disable-next-line require-unicode-regexp
const shasumLines = shasums.split(/\r?\n/);
const shasumLine = shasumLines.find((line) =>
line.includes(flowBinRelativePath),
);
if (!shasumLine) {
throw new Error(
`Failed to find SHASUM256.txt line containing ${flowBinRelativePath}`,
);
}
return shasumLine.slice(0, 64);
}
export default async function getVerifiedFlowBinPath(
flowBinModulePath: string,
logger: Logger,
): Promise<string> {
await access(flowBinModulePath);
try {
const shasums = await getShasums(flowBinModulePath, logger);
// successfully verified SHASUM256.txt, now we can use it to verify the flow binary
const { flowBinDirName, flowBinName } =
await getFlowBinRelativePath(flowBinModulePath);
const flowBinPath = path.join(View on GitHub (pinned to d1341dac89)
Solutions
- Reinstall flow-bin cleanly so dir and checksums ship together: `npm ci` or remove node_modules/flow-bin and reinstall
- Pin exact matching versions of the extension and flow-bin
- If you package flow-bin yourself, include a SHASUM256.txt line for every platform dir you ship
Defensive patterns
Strategy: validation
Validate before calling
function shasumHasEntry(
shasums: string,
flowBinDirName: string,
flowBinName: string,
): boolean {
const rel = `${flowBinDirName}/${flowBinName}`;
return shasums
.split(/\r?\n/)
.some((line) => line.includes(rel));
} Try / catch
try {
const shasum = getShasum(shasums.toString(), dirName, binName);
} catch (err) {
if (/Failed to find SHASUM256.txt line/.test(err.message)) {
// dir/checksums version skew: reinstall flow-bin cleanly
} else throw err;
} Prevention
- Never mix platform dirs from different flow-bin versions
- Use npm ci for reproducible installs
- Cover every shipped platform dir in SHASUM256.txt if you repackage flow-bin
When it happens
Trigger: flow-bin's SHASUM256.txt (or the PAST_FLOW_BIN_SHASUMS.txt fallback) has no entry for the platform dir + binary present on disk — version skew between the binary dir and the checksums file, or a manually substituted binary.
Common situations: Mixed-version installs where the platform dir was copied from another flow-bin version; hand-patched node_modules; the fallback file not covering newer binaries.
Related errors
- Failed to verify SHASUM256.txt against public key
- Hash of ${flowBinPath} does not match hash from SHASUM256.tx
- Pkg flow-bin not found in ${dirsToCheck.join(', ')}
- Failed to determine correct binary for platform ${process.pl
- Failed to find anything starting with ${dirPrefix} in ${flow
AI-assisted analysis of facebook/flow@d1341dac89 (2026-08-17).
Data as JSON: /api/errors/0e2881c398b35eab.
Report an issue: GitHub.