Pumpkin-MC/Pumpkin · error · PluginInitError
Failed to get absolute path
Error message
Failed to get absolute path: {0} What it means
WasmHostError variant from the WASM plugin loader setup: canonicalizing or resolving the plugin file path to an absolute path failed. The input at fault is the plugin path configured for the plugin — it may be relative to a missing working directory, contain invalid characters, or point through a symlink/permission setup the filesystem rejects.
Solutions
- Check the configured plugin path exists and is accessible
- Verify filesystem permissions on the plugins directory
- Skip the plugin and continue loading others
Defensive patterns
Strategy: validation
Validate before calling
let abs = std::fs::canonicalize(&plugin_path).map_err(|e| format!("plugin path invalid: {e}"))?; if !abs.is_file() { return Err("not a file"); } Prevention
- Check plugin file existence before server start
- Avoid symlinks in the plugins directory
- Run the server with a user that can read the plugins directory
When it happens
Trigger: Loading a plugin whose path does not exist, is a broken symlink, or the process lacks permission to resolve it in the plugins directory.
Common situations: Plugin jar/wasm deleted while server runs; typo in plugins folder name; broken symlink; restrictive filesystem permissions or read-only mount.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
AI-assisted analysis of Pumpkin-MC/Pumpkin@8d4639e25a (2026-09-09).
Data as JSON: /api/errors/b60d554cee9c33da.
Report an issue: GitHub.
Appendix: source
Thrown at crates/pumpkin/src/plugin/loader/wasm/wasm_host/mod.rs:43
#[error("Failed to setup linker: {0}")]
LinkerSetupFailed(wasmtime::Error),
#[error("Plugin is built against a different API version: {0}")]
ApiVersionMismatch(wasmtime::Error),
#[error("Failed to read plugin file: {0}")]
FileReadFailed(std::io::Error),
#[error("Failed to load plugin as component: {0}")]
ComponentNewFailed(wasmtime::Error),
#[error("Failed to create cache data for plugin: {0}")]
ComponentCacheSerializeFailed(wasmtime::Error),
#[error("Failed to write cache file for plugin: {0}")]
ComponentCacheWriteFailed(std::io::Error),
#[error("Failed to instantiate plugin: {0}")]
InstantiationFailed(wasmtime::Error),
#[error("Calling `init_plugin` failed: {0}")]
CallInitPluginFailed(wasmtime::Error),
#[error("Calling `get_metadata` failed: {0}")]
CallGetMetadataFailed(wasmtime::Error),
#[error("Failed to get absolute path: {0}")]
PathResolutionFailed(std::io::Error),
#[error("Failed to create cache: {0}")]
CacheCreationFailed(wasmtime::Error),
}
#[derive(Clone, Copy, Default)]
struct SocketPolicy {
tcp_connect: bool,
tcp_bind: bool,
udp_send: bool,
udp_receive: bool,
udp_bind: bool,
loopback_only: bool,
}
impl SocketPolicy {
const fn allows(self, addr: SocketAddr, reason: SocketAddrUse) -> bool {
// Wasmtime performs a wildcard bind before an outbound connect/send.View on GitHub (pinned to 8d4639e25a)