Hmbown/CodeWhale · error
self-update is not supported on HarmonyOS/OpenHarmony yet
Error message
self-update is not supported on HarmonyOS/OpenHarmony yet
What it means
The built-in self-update command is not implemented for the HarmonyOS/OpenHarmony (ohos) target; on that platform `update run` is compiled to a stub that always returns this error. The CLI self-update mechanism itself has no ohos packaging/distribution path yet.
Solutions
- Upgrade Codewhale through the platform's package manager or app distribution channel instead
- Download and install a newer release manually for the ohos target
- Check release notes for when ohos self-update support lands
Example fix
// before (on ohos) $ codewhale update // after: update via platform package manager, e.g. $ hpm update codewhale # or reinstall from the vendor distribution channel
Defensive patterns
Strategy: fallback
Validate before calling
// skip self-update on ohos targets
#[cfg(target_env = "ohos")]
let can_self_update = false;
#[cfg(not(target_env = "ohos"))]
let can_self_update = true;
if !can_self_update { eprintln!("use the platform package manager to update on ohos"); } Try / catch
match update_result {
Err(e) if e.to_string().contains("HarmonyOS/OpenHarmony") => {
eprintln!("falling back to platform-managed update");
platform_update()?;
}
other => other?,
} Prevention
- On ohos, never script `codewhale update`; use the vendor distribution channel
- Gate update commands behind an OS check in automation
- Track release notes for ohos self-update support before enabling it in tooling
When it happens
Trigger: Running `codewhale update` (self-update subcommand) on a build compiled with target_env = "ohos".
Common situations: Using the CLI on HarmonyOS/OpenHarmony devices or an ohos-cross-compiled build and attempting an in-place upgrade.
Understand the failure class
Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.
Related errors
- Android dladdr could not locate the updater's loaded image
- Android dladdr returned an empty loaded-image path
- loaded-image mapping for updater marker has no file inode
- loaded-image mapping for updater marker has no pathname
- loaded-image mapping for updater marker is not executable
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/754a52d3574d241e.
Report an issue: GitHub.
Appendix: source
Thrown at crates/cli/src/lib.rs:2308
stdout.write_all(render_completion_script(shell).as_bytes())?;
stdout.flush()?;
Ok(())
}
Some(Commands::Metrics(args)) => run_metrics_command(args),
Some(Commands::Update(args)) => {
let resolved_runtime =
resolve_runtime_for_diagnostic_dispatch(&store, &runtime_overrides);
let session = start_cli_telemetry(
&resolved_runtime,
Some(store.path().to_path_buf()),
Surface::Cli,
);
#[cfg(not(target_env = "ohos"))]
let outcome = update::run_update(args.beta, args.check, args.proxy);
#[cfg(target_env = "ohos")]
let outcome = {
let _ = args;
Err(anyhow!(
"self-update is not supported on HarmonyOS/OpenHarmony yet"
))
};
finish_cli_telemetry(session, &outcome);
outcome
}
Some(Commands::Providers(args)) => run_providers_command(args),
None => {
let resolved_runtime = resolve_runtime_for_dispatch(&mut store, &runtime_overrides);
let forwarded = root_tui_passthrough(&cli)?;
run_tui_in_process(&cli, &resolved_runtime, forwarded)
}
}
}
fn root_tui_passthrough(cli: &Cli) -> Result<Vec<String>> {
let mut forwarded = Vec::new();
if cli.continue_session {View on GitHub (pinned to 73e0f67d83)