RocketChat / RocketChat/Rocket.Chat.Electron
ubuntu (re)start/launch problem (snap) - When ~/Documents is symlink
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.7k
- Forks
- 835
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 15
Description
Describe the bug
rocketchat-desktop starts/launches once and failes all consecutive times when any of {~/Documents, ~/Pictures, ~/Music} is a symlink.
- During the first startup rocketchat creates it's config files (in my case in
~/snap/rocketchat-desktop/current/.config) - It then failes to start UNTIL one provides a real directory (no symlink) at the
~/snap/rocketchat-desktop/current/.config/user-dirs.dirs :: XDG_*target paths- In my case
~/Documents(i.e.XDG_DOCUMENTS_DIR) was a symlink
- In my case
To Reproduce
- Revoke rocktechat config
(e.g.rm -rf ~/snap/rocketchat-desktop/*) - Make your
~/Documentspath a symlink
(e.g.mv ~/Documents ~/Documents_moved && ln -s ~/Documents_moved ~/Documents) - Start rocketchat-desktop once -> everything works just fine (some minor GTK warnings, but well)
- Close the electron app
- Re-open rocketchat-desktop
app closes without any output i.e. immediately with exit code (echo $?) == 1
Expected behavior
Normal startup even if XDG_DOCUMENTS_DIR is a symlin.
Additional context
Tested with all channel version today including {3.5.5, 3.0.0-develop, 3.2.2}
$ snap info rocketchat-desktop
name: rocketchat-desktop
summary: Official Desktop Client for Rocket.Chat
publisher: Rocket.Chat (rocketchat✓)
store-url: https://snapcraft.io/rocketchat-desktop
[...]
channels:
latest/stable: 3.2.2 2021-05-14 (416) 68MB -
latest/candidate: 3.3.0-snapshot 2021-06-12 (451) 70MB -
latest/beta: 3.0.0-develop 2020-09-30 (191) 69MB -
latest/edge: 3.5.5 2021-09-21 (517) 71MB -
installed: 3.5.5 (517) 71MB -
Kernel
Linux rock 5.11.0-34-generic
Ubuntu rev
VERSION="20.04.3 LTS (Focal Fossa)"
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 by reproducing the Ubuntu snap launch sequence with a symlinked ~/Documents, following the reported reset of ~/snap/rocketchat-desktop/* and the generated .config/user-dirs.dirs file. Compare the first and second launches and inspect how the XDG_DOCUMENTS_DIR target is handled. Done means the app starts normally on repeated launches when the XDG directory is a symlink.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, typescript
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100