[Bug]: Linux AppImage OAuth callback fails until desktop application cache is refreshed
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 23k
- Forks
- 5.9k
- Avg merge
- 11h 14m
- Merged PRs (30d)
- 357
Description
Area
apps/desktop
Version and environment
T3 Code 0.0.38, x86_64 AppImage launched from Downloads; Pop!_OS 24.04 LTS, COSMIC/Wayland, Google Chrome.
Steps and actual behavior
- Launch the AppImage and start Google sign-in from T3 Code.
- Follow the browser flow back to the app.
- The desktop opens an "Open With" dialog saying "No Apps available" for
t3code://app/. Sign-in cannot complete.
Expected: the callback opens the running T3 Code app and completes sign-in.
Diagnostic evidence
~/.local/share/applications/t3code-url-handler.desktop already existed, pointed to the current AppImage, and declared MimeType=x-scheme-handler/t3code;. desktop-file-validate reported no errors.
Before the repair, gio mime x-scheme-handler/t3code reported:
Default application for “x-scheme-handler/t3code”: t3code-url-handler.desktop
No registered applications
No recommended applications
Confirmed workaround
update-desktop-database ~/.local/share/applications
Afterward, gio mime x-scheme-handler/t3code listed t3code-url-handler.desktop under both registered and recommended applications. I closed the browser tab and restarted login from T3 Code. The browser flow then completed and signup succeeded, without restarting T3 Code.
Likely cause
DesktopLinuxUrlHandler.ts writes the desktop entry and runs xdg-mime default, but does not refresh the desktop application database. Please consider refreshing it after registration. The observed cache repair and successful retry support this explanation; I have not reproduced it on a clean installation.
Related: #5978 mentions a missing Linux handler. In this case the handler existed and was the default, but was absent from the registered application list.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with apps/desktop/src/app/DesktopLinuxUrlHandler.ts and inspect the desktop-entry registration around the existing xdg-mime call. Use gio mime x-scheme-handler/t3code and the reported update-desktop-database workaround to verify the handler becomes registered; done means the browser callback opens the running T3 Code app and completes sign-in.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, typescript
- Domain
- authentication, desktop
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 82/100