{"record":{"id":"e0e183976fe25e46","repo":"musistudio/claude-code-router","slug":"plugin-marketplace-failed-to-fetch-marketplace-f","errorCode":null,"errorMessage":"[plugin-marketplace] Failed to fetch marketplace from ${url}: ${formatError(error)}","messagePattern":"\\[plugin-marketplace\\] Failed to fetch marketplace from (.+?): (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/core/src/plugins/marketplace.ts","lineNumber":64,"sourceCode":"      });\n  }\n\n  const entries = await marketplaceRequest;\n  return entries.map(cloneMarketplaceEntry);\n}\n\nfunction marketplaceUrl(): string {\n  return process.env.CCR_PLUGIN_MARKETPLACE_URL?.trim() || defaultMarketplaceUrl;\n}\n\nasync function fetchPluginMarketplace(url: string): Promise<PluginMarketplaceEntry[]> {\n  try {\n    const source = await fetchText(url, maxMarketplaceManifestBytes);\n    ensureMarketplaceCacheDir();\n    writeFileSync(marketplaceManifestCacheFile, source, \"utf8\");\n    return normalizeMarketplaceManifest(JSON.parse(source) as unknown, url);\n  } catch (error) {\n    console.warn(`[plugin-marketplace] Failed to fetch marketplace from ${url}: ${formatError(error)}`);\n    return readCachedMarketplace(url);\n  }\n}\n\nasync function readCachedMarketplace(url: string): Promise<PluginMarketplaceEntry[]> {\n  if (!existsSync(marketplaceManifestCacheFile)) {\n    return [];\n  }\n\n  try {\n    const source = readFileSync(marketplaceManifestCacheFile, \"utf8\");\n    return normalizeMarketplaceManifest(JSON.parse(source) as unknown, url, { offline: true });\n  } catch (error) {\n    console.warn(`[plugin-marketplace] Failed to read cached marketplace: ${formatError(error)}`);\n    return [];\n  }\n}\n","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/musistudio/claude-code-router/blob/99f24806c6a2c660b16e53e95211c517448a6c90/packages/core/src/plugins/marketplace.ts#L46-L82","documentation":"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.","triggerScenarios":"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.","commonSituations":"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).","solutions":["Restore network access to the marketplace URL (check proxy env vars HTTP_PROXY/HTTPS_PROXY).","If the manifest legitimately grew past the limit, raise maxMarketplaceManifestBytes in config.","Verify the URL returns valid JSON with curl and report oversized/corrupt manifests upstream.","Work fully offline from the previously cached manifest file — this is automatic once a successful fetch has occurred."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"null","typeGuard":"null","tryCatchPattern":"null","preventionTips":["Configure HTTP(S)_PROXY correctly in restricted networks","Run once online to seed the marketplace cache","Raise maxMarketplaceManifestBytes if manifests grow"],"tags":["marketplace","network","offline-cache","plugins"],"backgroundTag":"manifest-fetch-failed","analyzedSha":"99f24806c6a2c660b16e53e95211c517448a6c90","analyzedAt":"2026-08-27T04:11:01.184Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}