musistudio/claude-code-router · warning

[plugin-marketplace] Failed to fetch marketplace from ${url}

Error message

[plugin-marketplace] Failed to fetch marketplace from ${url}: ${formatError(error)}

What it means

Warned by fetchPluginMarketplace when fetching or parsing the remote marketplace manifest fails (network error, size over maxMarketplaceManifestBytes, or invalid JSON). After logging, it falls back to readCachedMarketplace, the on-disk cache written on the last successful fetch.

Source

Thrown at packages/core/src/plugins/marketplace.ts:64

      });
  }

  const entries = await marketplaceRequest;
  return entries.map(cloneMarketplaceEntry);
}

function marketplaceUrl(): string {
  return process.env.CCR_PLUGIN_MARKETPLACE_URL?.trim() || defaultMarketplaceUrl;
}

async function fetchPluginMarketplace(url: string): Promise<PluginMarketplaceEntry[]> {
  try {
    const source = await fetchText(url, maxMarketplaceManifestBytes);
    ensureMarketplaceCacheDir();
    writeFileSync(marketplaceManifestCacheFile, source, "utf8");
    return normalizeMarketplaceManifest(JSON.parse(source) as unknown, url);
  } catch (error) {
    console.warn(`[plugin-marketplace] Failed to fetch marketplace from ${url}: ${formatError(error)}`);
    return readCachedMarketplace(url);
  }
}

async function readCachedMarketplace(url: string): Promise<PluginMarketplaceEntry[]> {
  if (!existsSync(marketplaceManifestCacheFile)) {
    return [];
  }

  try {
    const source = readFileSync(marketplaceManifestCacheFile, "utf8");
    return normalizeMarketplaceManifest(JSON.parse(source) as unknown, url, { offline: true });
  } catch (error) {
    console.warn(`[plugin-marketplace] Failed to read cached marketplace: ${formatError(error)}`);
    return [];
  }
}

View on GitHub (pinned to 99f24806c6)

Solutions

  1. Restore network access to the marketplace URL (check proxy env vars HTTP_PROXY/HTTPS_PROXY).
  2. If the manifest legitimately grew past the limit, raise maxMarketplaceManifestBytes in config.
  3. Verify the URL returns valid JSON with curl and report oversized/corrupt manifests upstream.
  4. Work fully offline from the previously cached manifest file — this is automatic once a successful fetch has occurred.
Defensive patterns

Strategy: fallback

Validate before calling

null

Type guard

null

Try / catch

null

Prevention

When it happens

Trigger: Calling getPluginMarketplace while offline, behind a proxy that blocks the manifest URL, when the manifest exceeds the byte cap, or when the server returns invalid JSON.

Common situations: Corporate egress firewall blocks the marketplace host; a CDN serving a truncated/oversized manifest; air-gapped machine with no cache yet (subsequent warning 544 and empty list).

Related errors


AI-assisted analysis of musistudio/claude-code-router@99f24806c6 (2026-08-27). Data as JSON: /api/errors/e0e183976fe25e46. Report an issue: GitHub.