Pumpkin-MC/Pumpkin · error · LicenseError
License metadata mismatch
Error message
License metadata mismatch: {0} What it means
LicenseError::MetadataMismatch indicates the plugin's marketplace metadata does not satisfy license requirements — typically a paid plugin shipped without the required license metadata, or metadata that doesn't match the marketplace record. The library validates plugin metadata during license verification and reports the specific discrepancy in {0}.
Solutions
- Add the required marketplace/license metadata (license id, plugin id) to the plugin manifest/build config.
- Ensure plugin id and other fields exactly match the marketplace listing.
- Rebuild/repackage the plugin through the official pipeline that injects metadata.
- Re-download the plugin from the marketplace rather than using a locally modified copy.
- If free/paid classification changed, update the marketplace listing accordingly.
Example fix
// before (plugin.toml) name = "MyPlugin" // after name = "MyPlugin" license-id = "abc-123" marketplace-id = "my-plugin"
Defensive patterns
Strategy: validation
Validate before calling
// Validate plugin metadata before attempting license verification
fn has_valid_license_metadata(meta: &PluginMeta) -> bool {
meta.license_id.as_deref().map_or(false, |l| !l.is_empty())
&& meta.plugin_id == EXPECTED_MARKETPLACE_ID
}
if !has_valid_license_metadata(&meta) {
tracing::error!("plugin metadata incomplete for license check");
} Type guard
fn is_metadata_mismatch(e: &LicenseError) -> bool {
matches!(e, LicenseError::MetadataMismatch(_))
} Try / catch
match manager.verify() {
Err(LicenseError::MetadataMismatch(detail)) => {
tracing::error!("fix plugin metadata: {detail}");
disable_paid_features();
}
other => other.map(|_| ()),
} Prevention
- Always publish through the official build pipeline that injects license metadata.
- Keep plugin id/version identical to the marketplace listing.
- Add a CI check that the packaged plugin contains required metadata keys.
- Never hand-edit the packaged plugin metadata.
When it happens
Trigger: Running license verification on a plugin whose embedded metadata lacks a license ID for a paid plugin, or whose plugin id/version/author fields disagree with the marketplace listing; raised by LicenseManager validation before any HTTP lookup concludes.
Common situations: Developer forgets to add license/marketplace metadata to the plugin manifest when publishing a paid plugin; renamed plugin id after purchase records were created; version fields edited locally breaking the match; hand-built jar missing metadata injected at build time.
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
- Missing plugin metadata
- Invalid slot
- Marketplace HTTP error
- Plugin is unsigned or missing marketplace metadata
- Plugin-utils has not been initialized (call…
AI-assisted analysis of Pumpkin-MC/Pumpkin@8d4639e25a (2026-09-09).
Data as JSON: /api/errors/7747a8b5b3c1dab5.
Report an issue: GitHub.
Appendix: source
Thrown at crates/pumpkin-plugin-utils/src/license.rs:21
use crate::{
http::{HttpClient, HttpError},
models::{CheckLicenseResponse, LicenseLease, LicenseStatus, PumpkinMetadata},
};
use std::{
path::{Path, PathBuf},
time::{Duration, SystemTime, UNIX_EPOCH},
};
use thiserror::Error;
use tracing::{debug, info};
/// License checking and verification errors.
#[derive(Debug, Error)]
pub enum LicenseError {
/// HTTP communication error with marketplace.
#[error("Marketplace HTTP error: {0}")]
Http(#[from] HttpError),
/// Metadata validation error (e.g. missing license on paid plugin).
#[error("License metadata mismatch: {0}")]
MetadataMismatch(String),
/// License revoked or refunded by marketplace.
#[error("License was revoked or refunded: {0}")]
Revoked(String),
/// License is expired.
#[error("License has expired on {0}")]
Expired(String),
/// I/O error reading/writing license cache.
#[error("I/O error with license storage: {0}")]
Io(#[from] std::io::Error),
/// JSON serialization error.
#[error("JSON serialization error: {0}")]
Json(#[from] serde_json::Error),
/// Plugin is unsigned or missing marketplace metadata.
#[error("Plugin is unsigned or missing marketplace metadata")]
UnsignedPlugin,
/// Plugin has not been initialized.
#[error(View on GitHub (pinned to 8d4639e25a)