nikivdev/code · error

env sealer identity is missing its secret

Error message

env sealer identity is missing its secret

What it means

Error "env sealer identity is missing its secret" thrown in nikivdev/code.

Source

Thrown at src/env.rs:864

    Ok(path)
}

fn env_sealer_identity_path() -> Result<PathBuf> {
    Ok(env_sealer_state_dir()?.join("sealer.json"))
}

fn load_env_sealer_identity() -> Result<Option<EnvSealerIdentity>> {
    let path = env_sealer_identity_path()?;
    if !path.exists() {
        return Ok(None);
    }

    let content =
        fs::read_to_string(&path).with_context(|| format!("failed to read {}", path.display()))?;
    let mut identity: EnvSealerIdentity =
        serde_json::from_str(&content).context("failed to parse env sealer identity")?;
    if identity.sealer_secret.trim().is_empty() {
        bail!("env sealer identity is missing its secret");
    }

    let derived_id = get_sealer_id(&identity.sealer_secret).context("invalid env sealer secret")?;
    if identity.sealer_id != derived_id {
        identity.sealer_id = derived_id;
        let updated = serde_json::to_string_pretty(&identity)?;
        write_private_file(&path, &updated)?;
    }

    Ok(Some(identity))
}

fn load_or_create_env_sealer_identity() -> Result<EnvSealerIdentity> {
    if let Some(identity) = load_env_sealer_identity()? {
        return Ok(identity);
    }

    let identity = create_env_sealer_identity()?;

View on GitHub (pinned to a747e741ae)

When it happens

Trigger: Thrown at src/env.rs:864 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01). Data as JSON: /api/errors/f498c2a1ba2df5ea. Report an issue: GitHub.