can1357/oh-my-pi · error · Error

Marketplace "${marketplace}" not found

Error message

Marketplace "${marketplace}" not found

What it means

listAvailablePlugins(marketplace) filters the plugin listing to a single registered marketplace; it throws this when the given marketplace name has no entry in the registry. With no argument it lists across all marketplaces and cannot throw this error.

Source

Thrown at packages/coding-agent/src/extensibility/plugins/marketplace/manager.ts:220

			results.push(updated);
		}
		return results;
	}

	async listMarketplaces(): Promise<MarketplaceRegistryEntry[]> {
		const reg = await readMarketplacesRegistry(this.#opts.marketplacesRegistryPath);
		return reg.marketplaces;
	}

	// ── Plugin discovery ──────────────────────────────────────────────────────

	async listAvailablePlugins(marketplace?: string): Promise<MarketplacePluginEntry[]> {
		const reg = await readMarketplacesRegistry(this.#opts.marketplacesRegistryPath);

		if (marketplace !== undefined) {
			const entry = reg.marketplaces.find(m => m.name === marketplace);
			if (!entry) {
				throw new Error(`Marketplace "${marketplace}" not found`);
			}
			const catalog = await this.#readCatalog(entry);
			return catalog.plugins;
		}

		const all: MarketplacePluginEntry[] = [];
		for (const entry of reg.marketplaces) {
			const catalog = await this.#readCatalog(entry);
			all.push(...catalog.plugins);
		}
		return all;
	}

	async getPluginInfo(name: string, marketplace: string): Promise<MarketplacePluginEntry | null> {
		const plugins = await this.listAvailablePlugins(marketplace);
		return plugins.find(p => p.name === name) ?? null;
	}

View on GitHub (pinned to 9690622007)

Solutions

  1. List registered marketplaces first and pass an exact registered name (or omit the argument to list all plugins).
  2. Add the marketplace with addMarketplace if it does not exist yet.
  3. Fix casing/typos — matching is exact (m.name === marketplace).

Example fix

// before
await manager.listAvailablePlugins("Community");
// after: exact registered name, or all marketplaces
const plugins = await manager.listAvailablePlugins("community");
// or: await manager.listAvailablePlugins();
Defensive patterns

Strategy: validation

Validate before calling

const reg = JSON.parse(await Bun.file(registryPath).text());
if (marketplace && !reg.marketplaces.some(m => m.name === marketplace)) {
  throw new Error(`Unknown marketplace "${marketplace}". Known: ${reg.marketplaces.map(m => m.name).join(", ")}`);
}

Try / catch

try {
  const plugins = await manager.listAvailablePlugins(name);
} catch (err) {
  if ((err as Error).message.includes("not found")) {
    const all = await manager.listAvailablePlugins(); // fall back to all marketplaces
  } else throw err;
}

Prevention

When it happens

Trigger: MarketplaceManager.listAvailablePlugins("some-name") called with a name absent from the marketplaces registry — typo, wrong casing, or a marketplace that was removed or never added.

Common situations: Typing a marketplace name in a slash command or script with a spelling/case mismatch; querying a marketplace in a fresh checkout where only the built-in marketplace is registered; the marketplace was removed previously.

Related errors


AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31). Data as JSON: /api/errors/e463ed2bfa79a479. Report an issue: GitHub.