Linux startup crash: invalid D-Bus name in single-instance plugin
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 66/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- linux, rust, tauri
- Domain
- desktop-dev
Research direction
The panic comes from the single-instance plugin's Linux D-Bus registration in tauri-plugin-single-instance 2.4.5 (src/platform_impl/linux.rs, line 59). Start in desktop/src-tauri/src/lib.rs, where the plugin is initialised, and find the builder option that sets the bus name. Done means the app starts on Linux without the panic, with a D-Bus-legal name set in the builder and the app identifier left unchanged.
Written by the indexing model from the issue text.
Description
Problem
On Linux, the app panics on launch before any window appears:
thread 'main' panicked at tauri-plugin-single-instance-2.4.5/src/platform_impl/linux.rs:59:18:
called `Result::unwrap()` on an `Err` value:
Names(InvalidName("Invalid well-known name. ..."))
macOS and Windows are unaffected.
Cause
tauri-plugin-single-instance registers a D-Bus well-known name derived from the app identifier (com.2048labs.speaktype -> com.2048labs.speaktype.SingleInstance). D-Bus names don't allow a dot-separated element to start with a digit, and 2048labs does, so registration fails and the plugin's .unwrap() panics.
This identifier has been D-Bus-illegal since a837dd1 (renamed to match SpeakType 1's app ID, for shared macOS permissions/updates), but nothing exercised D-Bus until ad88e58 (#156) added the single-instance plugin which defaults to the app identifier as its bus name.
Fix
Keep the app identifier unchanged (macOS permissions/updates depend on it) and give the plugin a separate, D-Bus-legal name via its builder API in desktop/src-tauri/src/lib.rs:
Steps to reproduce
cd desktop && npm run appto start the app.- It will show -> thread 'main' panicked error message
Which system?
Linux
System version
Fedora 44
SpeakType version
2.0.0
- Dominant language
- Swift
- Stars
- 540
- Forks
- 74
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing 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.
More from karansinghgit/speaktype
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
karansinghgit/speaktype#211 ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
karansinghgit/speaktype#209 ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
karansinghgit/speaktype#208 · 2 comments ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 52/100
karansinghgit/speaktype#207 ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 55/100
karansinghgit/speaktype#205 · 1 comment ·
All issues in karansinghgit/speaktype
Similar issues
-
area: agents follow-up
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
manaflow-ai/cmux#37234 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
bug product / functions
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 61/100
JWhite212/SignalLadder#215 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100