chenhg5/cc-connect · error
run_as_user startup checks failed for %d project(s); see log
Error message
run_as_user startup checks failed for %d project(s); see logs above
What it means
runRunAsUserStartupChecks collects per-project fatals and, if any exist, returns this summary error so startup aborts. It deliberately contains no detail; the specific causes were logged above as preflight/probe/audit FATAL lines.
Source
Thrown at cmd/cc-connect/runas_startup.go:155
"project", o.project, "error", o.auditErr)
fatals = append(fatals, fmt.Errorf("project %q probe: %w", o.project, o.auditErr))
continue
}
slog.Info("run_as_user: isolation audit completed",
"project", o.project,
"whoami", o.audit.Identity.Whoami,
"workdir_writable", o.audit.WorkDirStatus.Writable,
"target_paths", len(o.audit.TargetPaths),
"cross_user_results", len(o.audit.CrossUser),
)
for _, f := range o.audit.Fatal {
slog.Error("run_as_user: audit FATAL", "project", o.project, "error", f)
fatals = append(fatals, fmt.Errorf("project %q audit: %s", o.project, f))
}
}
if len(fatals) > 0 {
return fmt.Errorf("run_as_user startup checks failed for %d project(s); see logs above", len(fatals))
}
return nil
}
View on GitHub (pinned to 4000b2338a)
Solutions
- Scroll up in the logs for lines prefixed 'run_as_user: preflight FATAL', 'isolation probe failed to run', or 'audit FATAL'.
- Fix each named project's underlying issue (see those specific errors).
- Restart cc-connect; startup succeeds only when zero projects fail.
Example fix
// before journalctl -u cc-connect | tail -n 20 # only sees summary // after journalctl -u cc-connect | grep 'run_as_user' # find per-project FATAL causes
Defensive patterns
Strategy: try-catch
Validate before calling
systemd-analyze verify cc-connect.service && journalctl -u cc-connect | grep -c 'run_as_user'
Try / catch
if err := runRunAsUserStartupChecks(ctx); err != nil {
slog.Error("run_as_user startup aborted", "err", err)
// inspect logs above for per-project FATAL lines before retrying
os.Exit(1)
} Prevention
- Grep logs for 'run_as_user' to see per-project causes; this error is only a summary.
- Fix all failing projects before restart — startup aborts on any fatal.
- Add startup checks to deployment smoke tests.
When it happens
Trigger: Any project produced a preflight fatal, a probe failure, or an audit fatal during run_as_user startup — the count in the message equals the number of failing projects.
Common situations: First deployment of run_as_user mode with misconfigured permissions across one or more projects; after OS/user changes broke a previously working isolation setup.
Understand the failure class
Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.
Related errors
- project %q preflight: %w
- project %q probe: %w
- project %q audit: %s
- platform %q not ready
- cloud_web: gateway listen: %w
AI-assisted analysis of chenhg5/cc-connect@4000b2338a (2026-09-06).
Data as JSON: /api/errors/b23b08d08c28c932.
Report an issue: GitHub.