multica-ai/multica · error

timed out waiting for workspace creation

Error message

timed out waiting for workspace creation

What it means

Thrown by waitForWorkspaceCreation after the login flow has polled GET /api/workspaces every 2 seconds for a hard 5-minute deadline (cmd_login.go:176-206) without ever seeing a non-empty workspace list. Transient per-poll errors are intentionally swallowed (continue), so this error means either the user never completed workspace creation in the browser, or every poll failed silently for 5 minutes (bad token, network partition).

Source

Thrown at server/cmd/multica/cmd_login.go:206

		time.Sleep(pollInterval)

		ctx, cancel := context.WithTimeout(context.Background(), pollRequestTimeout)
		var workspaces []struct {
			ID   string `json:"id"`
			Name string `json:"name"`
		}
		err := client.GetJSON(ctx, "/api/workspaces", &workspaces)
		cancel()

		if err != nil {
			continue // transient error, keep polling
		}
		if len(workspaces) > 0 {
			return workspaces, nil
		}
	}

	return nil, fmt.Errorf("timed out waiting for workspace creation")
}

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Re-run `multica login` and complete workspace creation in the browser within 5 minutes; copy the URL printed to stderr if no browser opened.
  2. Confirm the account already has a workspace — if it does and the error still fires, the polls are failing: check server reachability and token validity.
  3. For headless/SSH setups, forward the URL manually (e.g. port-forward localhost and open the URL on your workstation).
  4. For automation, skip the interactive wait: pre-create the workspace via the API and configure the token directly instead of using `login`.

Example fix

// before: interactive login blocks 5 min then fails on headless box
multica login
// timed out waiting for workspace creation

// after: create the workspace out-of-band, then login resolves immediately
 curl -X POST https://server/api/workspaces -H "Authorization: Bearer $TOKEN" -d '{"name":"main"}'
multica login   # first poll now returns a workspace
Defensive patterns

Strategy: retry

Try / catch

workspaces, err := waitForWorkspaceCreation(cmd, client)
if err != nil && strings.Contains(err.Error(), "timed out waiting") {
    // fall back to non-interactive path: create workspace via API or abort with guidance
}

Prevention

When it happens

Trigger: Login succeeded but the user never visited the create-workspace URL or abandoned the browser flow; every GetJSON poll fails for the full 5 minutes (server died mid-poll, token revoked); the account genuinely has zero workspaces and none was created in time.

Common situations: Browser did not open automatically on a headless machine/SSH session (the CLI prints the URL to stderr but the user missed it); CI/automation invoking interactive login; slow human response exceeding 5 minutes; server restarted during the wait.

Understand the failure class

Related errors


AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15). Data as JSON: /api/errors/9ba48571aa5acbd8. Report an issue: GitHub.