wavetermdev/waveterm · error
no connection found
Error message
no connection found
What it means
After parsing the connection name, CheckConnStatus resolves it to a live connection object via conncontroller.MaybeGetConn(opts). This error means no active connection instance exists for those options — the profile parses but is not currently registered/open in the connection controller.
Source
Thrown at pkg/blockcontroller/blockcontroller.go:450
if conncontroller.IsLocalConnName(connName) {
return nil
}
if strings.HasPrefix(connName, "wsl://") {
distroName := strings.TrimPrefix(connName, "wsl://")
conn := wslconn.GetWslConn(distroName)
connStatus := conn.DeriveConnStatus()
if connStatus.Status != conncontroller.Status_Connected {
return fmt.Errorf("not connected: %s", connStatus.Status)
}
return nil
}
opts, err := remote.ParseOpts(connName)
if err != nil {
return fmt.Errorf("error parsing connection name: %w", err)
}
conn := conncontroller.MaybeGetConn(opts)
if conn == nil {
return fmt.Errorf("no connection found")
}
connStatus := conn.DeriveConnStatus()
if connStatus.Status != conncontroller.Status_Connected {
return fmt.Errorf("not connected: %s", connStatus.Status)
}
return nil
}
func makeSwapToken(ctx context.Context, logCtx context.Context, blockId string, blockMeta waveobj.MetaMapType, remoteName string, shellType string) *shellutil.TokenSwapEntry {
token := &shellutil.TokenSwapEntry{
Token: uuid.New().String(),
Env: make(map[string]string),
Exp: time.Now().Add(5 * time.Minute),
}
token.Env["TERM_PROGRAM"] = "waveterm"
token.Env["WAVETERM_BLOCKID"] = blockId
token.Env["WAVETERM_VERSION"] = wavebase.WaveVersion
token.Env["WAVETERM"] = "1"View on GitHub (pinned to a4447c1563)
Solutions
- Reconnect the SSH profile from the connections menu before using the terminal block
- Verify the profile still exists in connection settings and re-point the block's meta.connection to it
- Check network reachability to the host, then retry the connect
- If the profile is intentionally gone, clear the block's connection meta
Defensive patterns
Strategy: fallback
Validate before calling
opts, err := remote.ParseOpts(connName)
if err == nil && conncontroller.MaybeGetConn(opts) == nil {
// connection profile not active — trigger reconnect first
} Try / catch
if err := blockcontroller.CheckConnStatus(blockId); err != nil {
if strings.Contains(err.Error(), "no connection found") { /* prompt user to reconnect profile */ }
} Prevention
- Reconnect saved profiles on app startup before restoring blocks
- Remove or re-point blocks referencing deleted connection profiles
- Keep connection profile names stable across machines when syncing config
When it happens
Trigger: SSH profile referenced by the block was never connected in this session, the connection was torn down (logout, network switch, app restart) before the resync, or the profile was deleted while blocks still reference it.
Common situations: App restarted and saved connection not auto-reconnected; remote host removed from connection list; block meta references a deleted profile; laptop offline so connection never established.
Related errors
- cannot parse connection name: %w
- getting ssh connection status: %w
- connecting connection: %w
- cannot start shellproc: %w
- connection %q not found
AI-assisted analysis of wavetermdev/waveterm@a4447c1563 (2026-09-01).
Data as JSON: /api/errors/14c4e5d329505633.
Report an issue: GitHub.