Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Element desktop starts new instance instead of opening old instance #22200

Closed
schuelermine opened this issue May 14, 2022 · 11 comments
Closed

Element desktop starts new instance instead of opening old instance #22200

schuelermine opened this issue May 14, 2022 · 11 comments

Comments

@schuelermine
Copy link

schuelermine commented May 14, 2022

Steps to reproduce

  1. Launch Element desktop
  2. Close the App (make sure it’s running in the background)
  3. Launch Element again

Outcome

What did you expect?

The old Element desktop instance reopens.

What happened instead?

A new Element instance opens and prompts to log in. This seems like it could corrupt state.

Operating system

NixOS 22.05.20220511.41ff747 (Quokka)

Application version

Element version: 1.10.11, Olm version: 3.2.8

How did you install the app?

using home-manager, from nixpkgs

Homeserver

matrix.org

Will you send logs?

Yes

@t3chguy
Copy link
Member

t3chguy commented May 14, 2022

This sounds like a packaging issue with the community-maintained nixpkg, I suggest contacting the maintainer. Flatpak had a similar issue due to sandboxing.

@t3chguy t3chguy added Z-Platform-Specific A-Electron X-Community-Supported-Platform This issue occurs in a platform not directly supported by us, but by a community project elsewhere labels May 14, 2022
@schuelermine
Copy link
Author

It doesn’t happen immediately after startup, as I’ve found out now. It sometimes happens a while later. Maybe it happens on suspend? I feel like this isn’t a packaging issue, as console element-desktop invocations detect the instance normally but also don’t for me sometimes.

@t3chguy
Copy link
Member

t3chguy commented May 14, 2022

Well its either a packaging issue or an electron one as this is a built-in feature of electron, https://www.electronjs.org/docs/latest/api/app#apprequestsingleinstancelockadditionaldata

@schuelermine
Copy link
Author

I will test if this is triggered by suspend.
Thank you for the information!

@schuelermine
Copy link
Author

I am now somewhat sure this is caused by suspend.

@schuelermine schuelermine reopened this May 14, 2022
@schuelermine
Copy link
Author

The second instance is being detected by any third instance.
Screenshot from 2022-05-14 19-27-59

Closing the first instance and re-launching via CLI launches a second instance.
Screenshot from 2022-05-14 19-28-28

@JokerGermany
Copy link

I have the same Problem with the standard repo https://packages.element.io/debian/
When the instance is already running, it tries to start a new one.
When you open element out of a matrix.to link it tries to open a new one.

It seems to have to do with the autostart.
When you close the autostarted element and start it normal the problem vanished.
Then you get this in a terminal:
/opt/Element/element-desktop %U

/home/jokergermany/.config/Element exists: yes
/home/jokergermany/.config/Riot exists: no
Other instance detected: exiting

Will post tomorrow the terminal output when the bug appers.

@JokerGermany
Copy link

JokerGermany commented Aug 7, 2022

/opt/Element/element-desktop --hidden

/home/jokergermany/.config/Element exists: yes
/home/jokergermany/.config/Riot exists: no
Starting auto update with base URL: https://packages.element.io/desktop/update/
Auto update not supported on this platform
Fetching translation json for locale: en_EN
Changing application language to de
Fetching translation json for locale: de
Resetting the UI components after locale change
Resetting the UI components after locale change
mesa: for the --amdgpu-atomic-optimizations option: may only occur zero or one times!
[324551:0807/192947.281627:ERROR:browser_main_loop.cc(271)] Gdk: gdk_window_thaw_toplevel_updates: assertion 'window->update_and_descendants_freeze_count > 0' failed
Changing application language to de
Fetching translation json for locale: de
Resetting the UI components after locale change
[324551:0807/192952.408606:ERROR:leveldb_factory.cc(88)] Failed to open LevelDB database from /home/jokergermany/.config/Element/IndexedDB/vector_vector_0.indexeddb.leveldb,IO error: /home/jokergermany/.config/Element/IndexedDB/vector_vector_0.indexeddb.leveldb/LOCK: File currently in use. (ChromeMethodBFE: 15::LockFile::2)
[324551:0807/192953.418660:ERROR:leveldb_factory.cc(88)] Failed to open LevelDB database from /home/jokergermany/.config/Element/IndexedDB/vector_vector_0.indexeddb.leveldb,IO error: /home/jokergermany/.config/Element/IndexedDB/vector_vector_0.indexeddb.leveldb/LOCK: File currently in use. (ChromeMethodBFE: 15::LockFile::2)
[324551:0807/192953.748112:ERROR:nss_util.cc(335)] After loading Root Certs, loaded==false: NSS error code: -8018
[324551:0807/192954.885684:ERROR:leveldb_factory.cc(88)] Failed to open LevelDB database from /home/jokergermany/.config/Element/IndexedDB/vector_vector_0.indexeddb.leveldb,IO error: /home/jokergermany/.config/Element/IndexedDB/vector_vector_0.indexeddb.leveldb/LOCK: File currently in use. (ChromeMethodBFE: 15::LockFile::2)
[324551:0807/192955.895411:ERROR:leveldb_factory.cc(88)] Failed to open LevelDB database from /home/jokergermany/.config/Element/IndexedDB/vector_vector_0.indexeddb.leveldb,IO error: /home/jokergermany/.config/Element/IndexedDB/vector_vector_0.indexeddb.leveldb/LOCK: File currently in use. (ChromeMethodBFE: 15::LockFile::2)

The last line repeats over and over again

@JokerGermany
Copy link

@t3chguy Pls remove the X-Community-Supported-Platform

@t3chguy t3chguy added Z-Upstream and removed X-Community-Supported-Platform This issue occurs in a platform not directly supported by us, but by a community project elsewhere labels Aug 8, 2022
@BloodyIron
Copy link

This is the same issue I've been seeing for over a year now in element-hq/element-desktop#679

Can we get some eyes on this already??? :/

@t3chguy
Copy link
Member

t3chguy commented Mar 22, 2023

Duplicate of element-hq/element-desktop#679

@t3chguy t3chguy closed this as completed Mar 22, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants