{"record":{"id":"cf0afd097b0fed2c","repo":"gitbutlerapp/gitbutler","slug":"the-browser-did-not-finish-signing-in","errorCode":null,"errorMessage":"The browser did not finish signing in","messagePattern":"The browser did not finish signing in","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"apps/lite/ui/src/routes/project/$id/workspace/Settings/Account.tsx","lineNumber":63,"sourceCode":"\t\tsetSigningIn(true);\n\t\tsetError(null);\n\t\ttry {\n\t\t\tconst login = await window.lite.getLoginToken();\n\t\t\t// Names the client for the login page, as apps/desktop does with its\n\t\t\t// build type. Without it the page can only offer a token to copy.\n\t\t\tconst url = new URL(login.url);\n\t\t\turl.searchParams.set(\"bt\", \"release\");\n\t\t\tawait window.lite.openInWebBrowser(url.toString());\n\t\t\t// The page sends the account back over `but://login`, which the main\n\t\t\t// process persists, so this waits for the account to appear rather\n\t\t\t// than for a reply of its own.\n\t\t\tawait pollUntilSuccess({\n\t\t\t\tattempt: async () => {\n\t\t\t\t\t// Signed out reads as `null` rather than an error, which would end\n\t\t\t\t\t// the poll on its first try. The message is only ever seen if the\n\t\t\t\t\t// poll then runs out of time, so it reads as the failure.\n\t\t\t\t\tconst profile = await window.lite.getUserProfileLocal();\n\t\t\t\t\tif (profile === null) throw new Error(\"The browser did not finish signing in\");\n\t\t\t\t\treturn profile;\n\t\t\t\t},\n\t\t\t\tintervalMs: pollIntervalMs,\n\t\t\t\ttimeoutMs: pollTimeoutMs,\n\t\t\t\tsignal: controller.signal,\n\t\t\t});\n\t\t\tawait client.invalidateQueries({ queryKey: userProfileQueryOptions.queryKey });\n\t\t\tawait client.invalidateQueries({ queryKey: aiConfigurationQueryOptions.queryKey });\n\t\t} catch (caught) {\n\t\t\t// Abandoning is not a failure to report.\n\t\t\tif (!controller.signal.aborted) setError(errorMessageForToast(caught));\n\t\t} finally {\n\t\t\tif (!controller.signal.aborted) setSigningIn(false);\n\t\t}\n\t};\n\n\treturn (\n\t\t// A card of its own rather than a row: the drawing leads, and the button sits under","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/gitbutlerapp/gitbutler/blob/58e5313667b857ef39a730e380af31816a7b1768/apps/lite/ui/src/routes/project/$id/workspace/Settings/Account.tsx#L45-L81","documentation":"Fires in Lite's sign-in flow when polling for the completed browser login exhausted its attempts: the app opened the login page and waited for the account to arrive via the but://login callback, but the user never finished signing in (or the callback never reached the app). The error distinguishes an incomplete login from other sign-in failures.","triggerScenarios":"Thrown at apps/lite/ui/src/routes/project/$id/workspace/Settings/Account.tsx:63 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry sign-in and complete the flow in the opened browser tab before the poll times out","Verify the but://login deep link can reach the app (default browser / protocol handler settings)","If the login page offers a copyable token, fall back to manual token entry"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"58e5313667b857ef39a730e380af31816a7b1768","analyzedAt":"2026-09-18T06:50:32.052Z","contentChangedAt":"2026-09-18T06:50:32.052Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}