BigPizzaV3/CodexPlusPlus · error
downloaded openai/plugins marketplace is invalid
Error message
downloaded openai/plugins marketplace is invalid
What it means
After extracting a downloaded openai/plugins marketplace zip, validate_openai_plugins_marketplace_root locates the expected curated marketplace directory inside the extracted root. If the expected directory structure is not found (local_openai_curated_marketplace_root_from_root returns None) the archive is considered invalid and this error is thrown.
Solutions
- Unzip the downloaded archive and verify it contains the expected marketplace directory (e.g. plugins-* with marketplace.json / plugin manifests).
- Re-download the marketplace zip from the correct upstream URL; check for proxy/CDN corruption.
- Clear the cached marketplace directory so a stale/corrupt extraction is not reused.
- Pin/adjust the expected root layout if the upstream repo changed its folder structure.
Example fix
// before: trust any downloaded zip
install_openai_plugins_zip(&zip_bytes).await?;
// after: sanity-check zip content marker before install
if !zip_bytes.starts_with(&[0x50, 0x4B]) {
anyhow::bail!("downloaded marketplace is not a zip (HTML error page?)");
}
install_openai_plugins_zip(&zip_bytes).await?; Defensive patterns
Strategy: validation
Validate before calling
fn is_zip(bytes: &[u8]) -> bool { bytes.starts_with(b"PK") }
if !is_zip(&downloaded) {
anyhow::bail!("marketplace download is not a valid zip");
} Type guard
fn marketplace_root_valid(root: &Path) -> bool {
root.join("plugins").is_dir() || local_openai_curated_marketplace_root_from_root(root).is_ok()
} Try / catch
match install_openai_plugins_zip(&bytes).await {
Ok(()) => {},
Err(e) if e.to_string().contains("marketplace is invalid") => {
// delete cache, re-download once
}
Err(e) => return Err(e),
} Prevention
- Verify download URL returns an actual zip (magic bytes PK), not an HTML error page
- Cache the zip with a checksum and re-download on mismatch
- Check for upstream repo layout changes before pinning versions
When it happens
Trigger: install_openai_plugins_zip downloaded and extracted a zip whose layout does not contain the expected plugins-<something>/ or marketplace subdirectory the validator looks for.
Common situations: openai/plugins repository restructured its zip layout; user downloaded the wrong archive (source zip vs release artifact); a proxy/CDN returned an HTML error page saved as .zip; partial/corrupt download.
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
- embedded official remote plugin 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/053c1ec01298ba01.
Report an issue: GitHub.
Appendix: source
Thrown at crates/codex-plus-core/src/plugin_marketplace.rs:507
let mut components = path.components();
match components.next()? {
Component::Normal(_) => {}
_ => return None,
}
let mut relative = PathBuf::new();
for component in components {
match component {
Component::Normal(value) => relative.push(value),
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")View on GitHub (pinned to b1ed92e5e4)