diegosouzapw/OmniRoute · error

Checksum mismatch for plugin

Error message

Checksum mismatch for plugin '${name}': expected ${entry.checksum}, got ${actual}

What it means

Post-download guard in installMarketplacePlugin: SHA-256 of the downloaded archive does not match entry.checksum from the catalog. The archive is corrupt or was substituted — installation is aborted before PluginManager sees it.

Solutions

  1. Retry the download — corruption during transfer is the usual cause
  2. Refresh the marketplace catalog if the plugin was republished with a new checksum
  3. Do not bypass the checksum — investigate the source if it persists
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/lib/plugins/marketplace.ts:237 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/87c1a7a2c3ae82c9. Report an issue: GitHub.

Appendix: source

Thrown at src/lib/plugins/marketplace.ts:237

  }

  // Create temp dir for download
  const tmpDir = await mkdtemp(join(tmpdir(), "plugin-mp-"));
  const tmpFile = join(tmpDir, "plugin.tar.gz");

  try {
    // Download the plugin archive
    const response = await safeOutboundFetch(entry.downloadUrl, { guard: "public-only" });
    if (!response.ok) {
      throw new Error(`Failed to download plugin '${name}': ${response.status}`);
    }
    const buffer = Buffer.from(await response.arrayBuffer());

    // Verify SHA-256 checksum if provided
    if (entry.checksum) {
      const actual = createHash("sha256").update(buffer).digest("hex");
      if (actual !== entry.checksum) {
        throw new Error(
          `Checksum mismatch for plugin '${name}': expected ${entry.checksum}, got ${actual}`
        );
      }
    }

    // Write to temp file
    await writeFile(tmpFile, buffer);

    // Delegate to pluginManager.install
    const result = await pluginManager.install(tmpDir);
    return { name: result.name, version: result.version };
  } finally {
    // Cleanup temp dir
    await rm(tmpDir, { recursive: true, force: true }).catch(() => {});
  }
}

View on GitHub (pinned to a179ffed5b)