abiosoft/colima · warning
unable to read embedded file: %w
Error message
unable to read embedded file: %w
What it means
A warning inside editConfigFile when embedded.ReadString('defaults/abort.yaml') fails to read the abort-instruction header from the go:embed filesystem compiled into the colima binary. Because the assets are embedded at build time, a failure nearly always means a broken custom build (asset removed from the tree before compiling, embed pattern mismatch), not a runtime environment issue. The flow continues with an empty header.
Source
Thrown at cmd/start.go:677
}
setFixedConfigs(&startCmdArgs.Config)
}
// editConfigFile launches an editor to edit the config file.
func editConfigFile() (config.Config, error) {
var c config.Config
// preserve the current file in case the user terminates
currentFile, err := os.ReadFile(config.CurrentProfile().File())
if err != nil {
return c, fmt.Errorf("error reading config file: %w", err)
}
// prepend the config file with termination instruction
abort, err := embedded.ReadString("defaults/abort.yaml")
if err != nil {
log.Warnln(fmt.Errorf("unable to read embedded file: %w", err))
}
tmpFile, err := waitForUserEdit(startCmdArgs.Flags.Editor, []byte(abort+"\n"+string(currentFile)))
if err != nil {
return c, fmt.Errorf("error editing config file: %w", err)
}
// if file is empty, abort
if tmpFile == "" {
return c, fmt.Errorf("empty file, startup aborted")
}
defer func() {
_ = os.Remove(tmpFile)
}()
if startCmdArgs.Flags.SaveConfig {
if err := configmanager.SaveFromFile(tmpFile); err != nil {
return c, errView on GitHub (pinned to c3a5f9184d)
Solutions
- If using an official binary, this is not your config — reinstall colima to rule out corruption
- If building from source, restore embedded/defaults/abort.yaml (or fix the //go:embed pattern in embedded/embed.go) and rebuild
- Ignore safely: the edit flow proceeds, only the instructional comment atop the temp file is missing
Example fix
// before: asset missing from the embed tree // (build warning at compile time, runtime warn on `colima start --edit`) // after: ensure the file exists relative to the embed directive // embedded/embed.go: //go:embed network k3s defaults images // embedded/defaults/abort.yaml must exist; then rebuild: // go build ./cmd/colima
Defensive patterns
Strategy: fallback
Prevention
- Use official colima distributions (brew/Nix/releases) so embedded assets are intact
- When building from source, build from a clean checkout after touching embedded/
When it happens
Trigger: Running a colima binary built from a source tree where embedded/defaults/abort.yaml was deleted or renamed without updating the //go:embed directive; corrupted binary. Not triggerable by normal user configuration.
Common situations: Contributors building colima locally after moving embedded assets; patched/repacked binaries distributed outside brew/Nix; effectively never seen in official releases.
Related errors
- error reading embedded file: %w
- error reading template file: %w
- error editing config file: %w
- empty file, startup aborted
- error editing template file: %w
AI-assisted analysis of abiosoft/colima@c3a5f9184d (2026-08-15).
Data as JSON: /api/errors/e0b1fd503326a786.
Report an issue: GitHub.