flathub / flathub/net.blix.BlueMail
Google/OAuth login never completes: Exec uses %F, dropping the me.blueone.linux:// redirect (one-line fix)
- Dominant language
- Shell
- Stars
- 2
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
### Symptom
"Add account" with a Google address opens the consent screen in the browser; after granting consent, nothing happens — neither in the browser nor in the app. Same as the long-standing (closed) #17, still reproducible on 1.143.46.
### Root cause — one-line packaging fix
Google's OAuth flow redirects back to the app via the custom scheme `me.blueone.linux://`. The desktop file declares the handler correctly (`x-scheme-handler/me.blueone.linux`), but its Exec line is:
```
Exec=bluemail %F
```
`%F` accepts **local files only**, so when the browser dispatches the redirect URI to the handler, the URI is dropped before it reaches the app (the exported line becomes `--file-forwarding … @@ %F @@`, and file-forwarding discards non-file arguments). A second instance is spawned **with no arguments**, defers to the single-instance lock, and exits silently — hence "nothing happens".
The app cannot register the handler itself either: `app.setAsDefaultProtocolClient()` shells out to `xdg-settings`, which doesn't exist inside the sandbox (`LaunchProcess: failed to execvp: xdg-settings` in the logs).
### Verification
- `flatpak run net.blix.BlueMail "me.blueone.linux://auth/test"` (URI reaching the app) → the running instance logs `Received platform-specific URL:` and handles the deep link correctly. The app-side logic is fine.
- Replacing the Exec line with URI forwarding and re-testing with `gio open "me.blueone.linux://auth/test"` → the full browser → handler → app chain works.
### Fix
In `net.blix.BlueMail.desktop`:
```diff
-Exec=bluemail %F
+Exec=bluemail %U
```
(flatpak's exporter then emits `@@u %U @@`, which forwards URIs.)
While at it, the MimeType line lists `x-scheme-handler/me.blueone.linux` twice:
```diff
-MimeType=x-scheme-handler/me.blueone.linux;x-scheme-handler/mailto;x-scheme-handler/me.blueone.linux;
+MimeType=x-scheme-handler/me.blueone.linux;x-scheme-handler/mailto;
```
Tested locally on 1.143.46 (KDE Plasma, Wayland): with `%U` the Google account links correctly. Happy to open a PR if useful.
Contributor guide
No contributing guide indexed for this repository
Research direction
Edit net.blix.BlueMail.desktop, checking the Exec and MimeType entries described in the issue. Run flatpak run net.blix.BlueMail "me.blueone.linux://auth/test" and gio open "me.blueone.linux://auth/test" to verify that the redirect reaches the running app and the Google login completes.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 92/100