diegosouzapw/OmniRoute · error
Plugin ' ' integrity check failed: cannot read entry point
Error message
Plugin '${manifest.name}' integrity check failed: cannot read entry point — ${err instanceof Error ? err.message : String(err)} What it means
loadPlugin integrity pre-check: the manifest declares an integrity hash but the entry-point file could not be read (missing file, permissions). The read error is embedded in the message; loading aborts before spawning the child process.
Solutions
- Reinstall the plugin so the entry point file exists
- Check file permissions on the plugin's entry point
- Remove/fix the integrity field if the manifest was hand-edited
- Recompute and update the manifest integrity after any plugin change
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at src/lib/plugins/loader.ts:153 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25).
Data as JSON: /api/errors/dbe560d075744f06.
Report an issue: GitHub.
Appendix: source
Thrown at src/lib/plugins/loader.ts:153
`;
/**
* Load a plugin in an isolated child process.
* Returns the plugin interface with hooks that communicate via IPC.
*/
export async function loadPlugin(
entryPoint: string,
manifest: PluginManifestWithDefaults
): Promise<LoadedPlugin> {
// Integrity check: if the manifest declares an integrity field, verify the entry point.
// Missing integrity is OK for backward compatibility; mismatched integrity is a fatal error.
const integrityField = (manifest as unknown as Record<string, unknown>).integrity;
if (typeof integrityField === "string" && integrityField.length > 0) {
let source: string;
try {
source = await readFile(entryPoint, "utf-8");
} catch (err: unknown) {
throw new Error(
`Plugin '${manifest.name}' integrity check failed: cannot read entry point — ${err instanceof Error ? err.message : String(err)}`
);
}
const actual = computeIntegrity(source);
if (actual !== integrityField) {
throw new Error(
`Plugin '${manifest.name}' integrity mismatch: expected ${integrityField}, got ${actual}`
);
}
}
const permissions = manifest.requires.permissions;
// IMPORTANT-6: Write the host script with O_EXCL (wx flag) so the open fails if
// anything already exists at that path, defeating symlink/pre-create races (TOCTOU).
// mode 0o600 ensures no other OS user can read or replace the script.
// On EEXIST collision (astronomically unlikely with UUID but theoretically possible),
// retry once with a fresh UUID.View on GitHub (pinned to a179ffed5b)