jdx/mise · error
enabled accounts were prepared
Error message
enabled accounts were prepared
What it means
During bootstrap of managed (system) accounts, `accounts_enabled` gates access to `configured_accounts`, and the `.expect` asserts that when accounts are enabled the config preparation step already produced the parsed account list. The panic means accounts were enabled (via settings/flags) but `configured_accounts` was never populated — the config that should define them is missing or failed earlier parsing.
Solutions
- Define the managed accounts in your configuration so `configured_accounts` is populated
- Disable account management (`accounts_enabled = false` / remove the enabling setting) if you don't use it
- Verify the config file containing the accounts section is discovered and trusted (`mise trust`, correct path)
- Check key spelling/casing of the accounts config section
Example fix
# before (mise.toml) — accounts enabled but none configured [settings] system_accounts = true # after [settings] system_accounts = true [[system.accounts]] name = "deploy" uid = 1500
Defensive patterns
Strategy: validation
Validate before calling
# ensure accounts are both enabled AND configured before bootstrapping mise settings get system_accounts && grep -q 'system.accounts' mise.toml || echo 'accounts enabled but none configured'
Type guard
function accountsReady(cfg) { return !cfg.settings?.accounts_enabled || Array.isArray(cfg.system?.accounts) && cfg.system.accounts.length > 0; } Try / catch
if mise bootstrap 2>&1 | grep -q 'enabled accounts were prepared'; then echo 'define the accounts section in config or disable account management'; fi
Prevention
- Never enable account management without also defining the accounts section
- Run `mise trust` on the config file that defines accounts
- Validate config keys against the schema (`mise settings` docs) after edits
When it happens
Trigger: Running a bootstrap flow (e.g. `mise bootstrap`/system setup) with account management enabled while the configuration contained no `[system.accounts]`-style section, or the config file that defines accounts was not loaded/failed validation earlier.
Common situations: User enables account management in settings but never defines the accounts in mise.toml / the system config; a mistyped config key means the accounts section parses to None; config file not trusted or not discovered.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- config index exists
- declaring bootstrap config is loaded
- inline content
- a provided source resolves to a path
- artifact directory was initialized
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/7630937b874ac8c8.
Report an issue: GitHub.
Appendix: source
Thrown at src/cli/bootstrap.rs:1359
/// Every bootstrap part in order. Returns what ran for the generation
/// record; declined prompts end the run early with a note.
async fn run_phases(&self) -> Result<Summary> {
let mut config = Config::get().await?;
let mut hooks = system::hooks_from_config(&config);
let skip = self.skip_parts();
let summary = Summary { message: None };
let accounts_enabled = !skip.contains(&BootstrapPart::Accounts);
let files_enabled = !skip.contains(&BootstrapPart::Files);
let configured_accounts =
if accounts_enabled || (cfg!(target_os = "linux") && files_enabled) {
Some(system::accounts::prepare_requests_from_config(&config)?)
} else {
None
};
let managed_accounts = accounts_enabled.then(|| {
configured_accounts
.as_ref()
.expect("enabled accounts were prepared")
});
let secrets = system::secrets::resolve(&config, self.prompt_secrets)?;
let managed_system_files = if !files_enabled {
None
} else {
Some(system::managed_files::prepare_requests_from_config(
&config, &secrets,
)?)
};
if let Some((files, directories)) = &managed_system_files {
system::managed_files::validate_principals(
files,
directories,
configured_accounts.as_ref(),
accounts_enabled,
)?;
}
let services_enabled = !skip.contains(&BootstrapPart::Services);View on GitHub (pinned to afd2eddd3a)