{"record":{"id":"14c4e5d329505633","repo":"wavetermdev/waveterm","slug":"no-connection-found","errorCode":null,"errorMessage":"no connection found","messagePattern":"no connection found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/blockcontroller/blockcontroller.go","lineNumber":450,"sourceCode":"\tif conncontroller.IsLocalConnName(connName) {\n\t\treturn nil\n\t}\n\tif strings.HasPrefix(connName, \"wsl://\") {\n\t\tdistroName := strings.TrimPrefix(connName, \"wsl://\")\n\t\tconn := wslconn.GetWslConn(distroName)\n\t\tconnStatus := conn.DeriveConnStatus()\n\t\tif connStatus.Status != conncontroller.Status_Connected {\n\t\t\treturn fmt.Errorf(\"not connected: %s\", connStatus.Status)\n\t\t}\n\t\treturn nil\n\t}\n\topts, err := remote.ParseOpts(connName)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error parsing connection name: %w\", err)\n\t}\n\tconn := conncontroller.MaybeGetConn(opts)\n\tif conn == nil {\n\t\treturn fmt.Errorf(\"no connection found\")\n\t}\n\tconnStatus := conn.DeriveConnStatus()\n\tif connStatus.Status != conncontroller.Status_Connected {\n\t\treturn fmt.Errorf(\"not connected: %s\", connStatus.Status)\n\t}\n\treturn nil\n}\n\nfunc makeSwapToken(ctx context.Context, logCtx context.Context, blockId string, blockMeta waveobj.MetaMapType, remoteName string, shellType string) *shellutil.TokenSwapEntry {\n\ttoken := &shellutil.TokenSwapEntry{\n\t\tToken: uuid.New().String(),\n\t\tEnv:   make(map[string]string),\n\t\tExp:   time.Now().Add(5 * time.Minute),\n\t}\n\ttoken.Env[\"TERM_PROGRAM\"] = \"waveterm\"\n\ttoken.Env[\"WAVETERM_BLOCKID\"] = blockId\n\ttoken.Env[\"WAVETERM_VERSION\"] = wavebase.WaveVersion\n\ttoken.Env[\"WAVETERM\"] = \"1\"","sourceCodeStart":432,"sourceCodeEnd":468,"githubUrl":"https://github.com/wavetermdev/waveterm/blob/a4447c1563b2df285ab89e76c82f91e1a1a49c1e/pkg/blockcontroller/blockcontroller.go#L432-L468","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"opts, err := remote.ParseOpts(connName)\nif err == nil && conncontroller.MaybeGetConn(opts) == nil {\n    // connection profile not active — trigger reconnect first\n}","typeGuard":null,"tryCatchPattern":"if err := blockcontroller.CheckConnStatus(blockId); err != nil {\n    if strings.Contains(err.Error(), \"no connection found\") { /* prompt user to reconnect profile */ }\n}","preventionTips":["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"],"tags":["ssh","connection","profile-missing","wave-terminal"],"backgroundTag":"connection-profile-not-found","analyzedSha":"a4447c1563b2df285ab89e76c82f91e1a1a49c1e","analyzedAt":"2026-09-01T15:26:23.972Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}