{"record":{"id":"30537ce4efdc1051","repo":"Eugeny/tabby","slug":"no-username","errorCode":null,"errorMessage":"No username","messagePattern":"No username","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"tabby-ssh/src/session/ssh.ts","lineNumber":644,"sourceCode":"            }\n        })\n        try {\n            return await this._handleAuth()\n        } finally {\n            subscription.unsubscribe()\n        }\n    }\n\n    // eslint-disable-next-line max-statements\n    private async _handleAuth (): Promise<russh.AuthenticatedSSHClient|null> {\n        this.activePrivateKey = null\n\n        if (!(this.ssh instanceof russh.SSHClient)) {\n            throw new Error('Wrong state for auth handling')\n        }\n\n        if (!this.authUsername) {\n            throw new Error('No username')\n        }\n\n        const noneResult = await this.ssh.authenticateNone(this.authUsername)\n        if (noneResult instanceof russh.AuthenticatedSSHClient) {\n            return noneResult\n        }\n\n        let remainingMethods = [...this.allAuthMethods]\n        let methodsLeft = noneResult.remainingMethods\n\n        function maybeSetRemainingMethods (r: russh.AuthFailure) {\n            if (r.remainingMethods.length) {\n                methodsLeft = r.remainingMethods\n            }\n        }\n\n        while (true) {\n            const m = methodsLeft","sourceCodeStart":626,"sourceCodeEnd":662,"githubUrl":"https://github.com/Eugeny/tabby/blob/14e2d60b9b6dee84a53c37f05eefeb803787de04/tabby-ssh/src/session/ssh.ts#L626-L662","documentation":"Thrown at the top of the private _handleAuth() when this.authUsername is falsy. russh requires a username for every authenticate* call, so the session refuses to proceed without one. The username is resolved earlier from the profile, an interactive prompt, or a $ENV-variable reference, so reaching here means all of those failed to produce a value.","triggerScenarios":"this.authUsername is null/empty at ssh.ts:643. That happens when the profile has no user set, the username prompt (PromptModalComponent) was dismissed/cancelled, and the env-var fallback ($VAR) resolved to empty. _handleAuth is called from handleAuth (ssh.ts:477) during the main start() flow.","commonSituations":"New SSH profile with the 'User' field left blank and the user dismisses the username prompt; profile user set to '$FOO' but that environment variable is unset/empty; profile imported from a URL/host without a user component and defaults failed.","solutions":["Set the 'User' field on the SSH profile (profile.options.user) before connecting.","If using a $ENV reference, ensure that environment variable is exported and non-empty in the process running Tabby.","Provide a username in the connect string (user@host) when creating the profile.","Catch the prompt cancellation upstream and fall back to a sane default like the OS username or 'root'."],"exampleFix":"// before: profile.options.user = ''\n// after\nprofile.options.user = process.env.USER || 'root'","handlingStrategy":"validation","validationCode":"if (!profile.options.user && !(profile.options.user ?? '').startsWith('$')) {\n    throw new Error('SSH profile is missing a username')\n}\n// if using $ENV:\nif ((profile.options.user ?? '').startsWith('$')) {\n    const v = process.env[profile.options.user.slice(1)]\n    if (!v) throw new Error(`Referenced env var ${profile.options.user} is empty`)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always set profile.options.user when creating an SSH profile.","Validate $ENV references resolve to a non-empty value before connecting.","Provide a default username in the connect string (user@host)."],"tags":["ssh","authentication","username","config"],"backgroundTag":null,"analyzedSha":"14e2d60b9b6dee84a53c37f05eefeb803787de04","analyzedAt":"2026-08-12T11:46:48.773Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}