EpicGames/lore · error
Failed to create lock store plugin
Error message
Failed to create lock store plugin '{mode}': {e} What it means
configure_lock_store_via_plugin creates the lock store only when a [lock_store] section exists; modes other than "none"/"local" go through PluginRegistry::create_lock_store. Any Err from the plugin factory is re-wrapped with `anyhow!("Failed to create lock store plugin '{mode}': {e}")` at server.rs:1006, keeping the original plugin error as its source.
Solutions
- Read the wrapped cause: the plugin's own error message says why creation failed.
- Verify the lock store plugin for this mode is registered/compiled in and the mode string is spelled correctly.
- Provide the required `[plugins.<mode>]` settings for the lock store and verify backend reachability.
- If you don't need distributed locking, set `[lock_store] mode = "none"` (or "local" for in-process locks).
Example fix
// before (settings.toml) [lock_store] mode = "redis" // after (settings.toml) [lock_store] mode = "redis" [plugins.redis] url = "redis://localhost:6379"
Defensive patterns
Strategy: try-catch
Validate before calling
// Rust
fn validate_lock_store(settings: &Settings) -> Result<(), String> {
if let Some(ls) = &settings.lock_store {
if ls.mode != "none" && ls.mode != "local" {
// must be backed by a registered plugin
return Err(format!("lock store mode '{}' requires a registered plugin", ls.mode));
}
}
Ok(())
} Try / catch
match configure_lock_store_via_plugin(®istry, &settings) {
Ok(Some(store)) => { /* register LockService */ }
Ok(None) => { /* locking disabled, fine */ }
Err(e) => {
for cause in e.chain() { eprintln!("caused by: {cause}"); }
return Err(e);
}
} Prevention
- Use mode = "none" or "local" when distributed locking isn't needed.
- Ensure the lock-store plugin and its backend are reachable before startup.
- Validate lock_store mode strings and [plugins.*] blocks in CI config checks.
When it happens
Trigger: A `[lock_store]` section is present with a plugin-mode value (not "none" or "local") and create_lock_store fails — unregistered mode, missing/malformed [plugins.*] config for the lock store, or the plugin's backend failing during construction.
Common situations: Distributed deployments configuring a remote lock store whose backend (e.g. Redis/DB) is misconfigured or unreachable; typo in the lock store mode; lock-store plugin feature not enabled in the build.
Related errors
- Failed to create immutable store plugin
- Failed to create mutable store plugin
- [environment.endpoint] auth_url is set but [server.auth] is…
- [environment.endpoint] auth_url and [server.auth]…
- Missing gRPC settings
AI-assisted analysis of EpicGames/lore@074eb0b0d1 (2026-09-13).
Data as JSON: /api/errors/a16393357387dc68.
Report an issue: GitHub.
Appendix: source
Thrown at lore-server/src/server.rs:1006
return Ok(None);
}
if mode == store_mode::LOCAL {
info!("Creating local (in-memory) lock store");
let store = crate::lock::store::LocalLockStore::default();
return Ok(Some(Arc::new(store)));
}
// All other modes use the plugin system
let plugin_config =
resolve_plugin_config_with_fallback(&settings.plugins, mode, "lock_store")
.unwrap_or_else(|| toml::Value::Table(toml::map::Map::new()));
info!(mode, "Creating lock store via plugin system");
let store = registry
.create_lock_store(mode, &plugin_config)
.map_err(|e| anyhow!("Failed to create lock store plugin '{mode}': {e}"))?;
return Ok(Some(store));
}
Ok(None)
}
static LOCAL_STORE: OnceLock<Weak<dyn ImmutableStore>> = OnceLock::new();
fn local_store() -> Option<Arc<dyn ImmutableStore>> {
LOCAL_STORE.get().and_then(|weak| weak.upgrade())
}
/// Directory under the system temporary directory where the server keeps
/// zero-config artifacts (local stores and ephemeral certificates) when no
/// explicit locations are configured.
fn local_data_dir() -> PathBuf {
std::env::temp_dir().join("lore-server")View on GitHub (pinned to 074eb0b0d1)