Pumpkin-MC/Pumpkin · error · ManagerError
IO error
Error message
IO error: {0} What it means
ManagerError::IoError(#[from] std::io::Error) wraps a raw std::io::Error in the plugin manager's error enum, displayed as "IO error: {0}". It is produced when filesystem operations performed by the plugin manager fail — reading the plugins directory, opening plugin files, copying/moving files during load/unload. The wrapped io::Error carries the OS-level cause (NotFound, PermissionDenied, etc.).
Solutions
- Check the wrapped io::Error kind and message for the concrete filesystem cause
- Verify the plugins directory path exists and the server process has read/write permissions
- Ensure no external process (AV, sync client) is locking the plugin files
- If the directory is legitimately absent, create it or fix the configured path
Defensive patterns
Strategy: try-catch
Validate before calling
let dir = Path::new("plugins");
if !dir.is_dir() {
std::fs::create_dir_all(dir)?;
}
assert!(dir.metadata()?.permissions().readonly() == false); Try / catch
match manager.load_all() {
Err(ManagerError::IoError(e)) if e.kind() == std::io::ErrorKind::PermissionDenied => {
error!("fix permissions on plugins directory: {e}");
}
Err(ManagerError::IoError(e)) => error!("io failure during plugin scan: {e}"),
other => other?,
} Prevention
- Run the server with a user that owns or can read/write the plugins directory
- Create the plugins directory before first launch
- Exclude the plugins dir from AV/sync tools that lock files
- Check disk space and mount status in containerized deployments
When it happens
Trigger: Plugin directory missing or unreadable at startup scan; a plugin file deleted/locked while loading; disk or permission failures when the manager reads plugin jars or writes state during enable/disable/unload.
Common situations: Wrong plugins folder configured; server run under a user lacking read permission on the plugins directory; read-only mounts or containers; antivirus/backup tools locking plugin files on Windows.
Understand the failure class
Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.
Related errors
- Failed to get absolute path
- Plugin not found
- Loader error
- Dependency error
- I/O error with license storage
AI-assisted analysis of Pumpkin-MC/Pumpkin@8d4639e25a (2026-09-09).
Data as JSON: /api/errors/58a12c2797ac0c51.
Report an issue: GitHub.
Appendix: source
Thrown at crates/pumpkin/src/plugin/mod.rs:223
/// - Windows: Plugin cannot be unloaded, it can be only active or not
struct LoadedPlugin {
metadata: PluginMetadata,
instance: Option<Arc<dyn Plugin>>,
loader: Arc<dyn PluginLoader>,
loader_data: Option<Box<dyn Any + Send + Sync>>,
is_active: bool,
context: Arc<Context>,
path: PathBuf,
}
/// Error types for plugin management
#[derive(Error, Debug)]
pub enum ManagerError {
#[error("Plugin not found: {0}")]
PluginNotFound(String),
#[error("Loader error: {0}")]
LoaderError(#[from] LoaderError),
#[error("IO error: {0}")]
IoError(#[from] std::io::Error),
#[error("Dependency error: {0}")]
DependencyError(String),
}
impl Default for PluginManager {
fn default() -> Self {
Self::new(true)
}
}
impl PluginManager {
/// Create a new plugin manager with default loaders
#[must_use]
pub fn new(verify_plugin_signatures: bool) -> Self {
Self {
plugins: SyncRwLock::new(Vec::new()),
loaders: RwLock::new(vec![View on GitHub (pinned to 8d4639e25a)