juanfont/headscale · error
test failed
Error message
test failed
What it means
Terminal error from WaitForTailscaleUp when the requested user does not exist in s.users (errNoUserAvailable). The wait loop over user.Clients cannot run because the user lookup failed.
Source
Thrown at cmd/hi/docker.go:29
"os"
"os/exec"
"path/filepath"
"strings"
"time"
"github.com/cenkalti/backoff/v5"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/image"
"github.com/docker/docker/api/types/mount"
"github.com/docker/docker/client"
"github.com/docker/docker/pkg/stdcopy"
"github.com/juanfont/headscale/integration/dockertestutil"
)
const defaultDirPerm = 0o755
var (
ErrTestFailed = errors.New("test failed")
ErrUnexpectedContainerWait = errors.New("unexpected end of container wait")
ErrNoDockerContext = errors.New("no docker context found")
ErrMemoryLimitViolations = errors.New("container(s) exceeded memory limits")
)
// runTestContainer executes integration tests in a Docker container.
//
//nolint:gocyclo // complex test orchestration function
func runTestContainer(ctx context.Context, config *RunConfig) error {
cli, err := createDockerClient(ctx)
if err != nil {
return fmt.Errorf("creating Docker client: %w", err)
}
defer cli.Close()
runID := dockertestutil.GenerateRunID()
containerName := "headscale-test-suite-" + runID
logsDir := filepath.Join(config.LogsDir, runID)View on GitHub (pinned to 565fd254d0)
Solutions
- Create the user (and its nodes) before waiting: CreateUser then CreateTailscaleInUser then WaitForTailscaleUp.
- Match the user string exactly with prior calls.
- Fix earlier setup errors that prevented user creation.
Defensive patterns
Strategy: validation
Validate before calling
if _, ok := scenario.Users()[userStr]; !ok {
return fmt.Errorf("user %q missing; create it before WaitForTailscaleUp", userStr)
} Prevention
- Sequence scenario calls so every referenced user is created first.
- Handle setup errors immediately so later lookups cannot fail.
When it happens
Trigger: Calling WaitForTailscaleUp(userStr, ...) with a user string never created via Scenario.CreateUser, or with a mismatched name/format.
Common situations: Typo'd or reformatted user names, scenario setup partially failed, or calling the wait before creating nodes in that user.
Related errors
- no docker context found
- system checks failed
- getting clients: %w
- unexpected end of container wait
- unknown --set value (want must|all)
AI-assisted analysis of juanfont/headscale@565fd254d0 (2026-08-15).
Data as JSON: /api/errors/dc0846b4ab4a82dc.
Report an issue: GitHub.