BigPizzaV3/CodexPlusPlus · error
embedded official remote plugin marketplace is invalid
Error message
embedded official remote plugin marketplace is invalid
What it means
validate_openai_curated_remote_marketplace_root checks that an extracted embedded official remote-plugin-marketplace zip contains the expected curated remote marketplace directory. If the expected directory cannot be located, the archive is deemed invalid and this error is thrown; if the found directory differs from the root, a 'root mismatch' error follows.
Solutions
- Inspect the extracted directory and confirm the expected remote-marketplace folder exists at the expected path.
- Re-download the zip; verify its integrity (size, unzip without errors).
- Purge the cached marketplace install directory and retry.
- Update the expected-root resolution logic to match the new upstream layout if the repo restructured.
Example fix
// before: assume layout
let root = extract_dir.join("marketplace");
// after: validate before install
validate_openai_curated_remote_marketplace_root(&extract_dir)?;
install_openai_curated_remote_marketplace_zip(&extract_dir)?; Defensive patterns
Strategy: validation
Validate before calling
if !extract_dir.join("expected-marketplace-dir").exists() {
anyhow::bail!("extracted archive lacks remote marketplace directory");
} Type guard
fn has_remote_marketplace(root: &Path) -> bool {
local_openai_curated_remote_marketplace_root_from_root(root)
.map(|m| m.is_some()).unwrap_or(false)
} Try / catch
match install_openai_curated_remote_marketplace_zip(&bytes).await {
Ok(()) => {},
Err(e) if e.to_string().contains("remote plugin marketplace is invalid") => {
fs::remove_dir_all(&cache_dir)?; // purge and retry once
}
Err(e) => return Err(e),
} Prevention
- Verify archive integrity (size/unzip test) before extraction
- Purge stale cached extractions when upstream layout changes
- Keep the expected-root resolution in sync with the upstream repo structure
When it happens
Trigger: install_openai_curated_remote_marketplace_zip extracted a zip that lacks the expected remote marketplace subdirectory that local_openai_curated_remote_marketplace_root_from_root looks for.
Common situations: Upstream marketplace repo renamed/moved the directory; wrong archive downloaded; corrupt or truncated zip extraction; older cached layout on disk.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- downloaded openai/plugins marketplace is invalid
- downloaded openai/plugins marketplace root mismatch
- embedded official remote plugin marketplace root mismatch
- 不支持的主题市场清单版本
- 主题市场清单超过 项限制
AI-assisted analysis of BigPizzaV3/CodexPlusPlus@b1ed92e5e4 (2026-09-19).
Data as JSON: /api/errors/4d92cba0c8b63aff.
Report an issue: GitHub.
Appendix: source
Thrown at crates/codex-plus-core/src/plugin_marketplace.rs:516
Component::CurDir => {}
_ => return None,
}
}
(!relative.as_os_str().is_empty()).then_some(relative)
}
fn validate_openai_plugins_marketplace_root(root: &Path) -> anyhow::Result<()> {
let marketplace = local_openai_curated_marketplace_root_from_root(root)?
.ok_or_else(|| anyhow::anyhow!("downloaded openai/plugins marketplace is invalid"))?;
if marketplace != root {
anyhow::bail!("downloaded openai/plugins marketplace root mismatch");
}
Ok(())
}
fn validate_openai_curated_remote_marketplace_root(root: &Path) -> anyhow::Result<()> {
let marketplace = local_openai_curated_remote_marketplace_root_from_root(root)?
.ok_or_else(|| anyhow::anyhow!("embedded official remote plugin marketplace is invalid"))?;
if marketplace != root {
anyhow::bail!("embedded official remote plugin marketplace root mismatch");
}
Ok(())
}
fn local_openai_curated_marketplace_root_from_root(root: &Path) -> anyhow::Result<Option<PathBuf>> {
let marketplace_path = root
.join(".agents")
.join("plugins")
.join("marketplace.json");
if !marketplace_path.is_file() {
return Ok(None);
}
let text = std::fs::read_to_string(&marketplace_path)
.with_context(|| format!("failed to read {}", marketplace_path.display()))?;
let marketplace: serde_json::Value = serde_json::from_str(&text)
.with_context(|| format!("failed to parse {}", marketplace_path.display()))?;View on GitHub (pinned to b1ed92e5e4)