element-desktop icon indicating copy to clipboard operation
element-desktop copied to clipboard

Session lost on restart

Open Seltyk opened this issue 1 year ago • 2 comments

Steps to reproduce

  1. Start Element and log in as normal
  2. Quit without logging out (e.g. right click > quit on the tray, or rebooting the machine)
  3. Restart Element

Outcome

What did you expect?

Quitting and restarting should maintain the current session and encryption keys.

What happened instead?

A warning about incompatible versions and your session will be permanently lost. The session is forcibly logged out.

Related issue: 1495 which is where this mess began. I have never recovered nominal functionality since that fateful hiccup earlier this week.

Operating system

Void Linux

Application version

1.11.43, 1.11.72, and 1.11.76 have all shown this issue

How did you install the app?

Build from source and execute via yarn start

Homeserver

No response

Will you send logs?

No

Seltyk avatar Sep 01 '24 02:09 Seltyk

Can you please submit screenshots and possibly logs? Not much we can do without it.

MidhunSureshR avatar Sep 05 '24 09:09 MidhunSureshR

Installing keytar manually via npm i -g keytar fixes this issue for me on Gentoo Linux, where element-desktop is installed using ebuilds from the PF4Public overlay (my bug describing this issue there: https://github.com/PF4Public/gentoo-overlay/issues/371). I also received the warning that keytar and seshat were missing. Installing matrix-seshat in the same way did not result in it being detected by Element. I did not experience https://github.com/element-hq/element-web/issues/28168 prior to this issue.

aschaap avatar Sep 06 '24 21:09 aschaap

I can confirm that this also exists on Fedora linux as well.

Installing keytar isn't feasible for me, since I'm using Element inside a flatpak. Is there any solution that's being proposed to fix this?

meyou69 avatar Oct 30 '24 21:10 meyou69

@meyou69 https://github.com/flathub/im.riot.Riot/ for help with the flatpak

t3chguy avatar Oct 31 '24 09:10 t3chguy

The void package should work once this line is merged: https://github.com/void-linux/void-packages/pull/52829/files#diff-1ec5549132a9f1aacbe6efc0d489fbf8a916f5a0f6d7227d73bbac7b84c9be66R55

ssnailed avatar Oct 31 '24 11:10 ssnailed

Indeed, situation resolved.

Seltyk avatar Nov 25 '24 04:11 Seltyk

It was resolved downstream. Should it be also somehow addressed in this repo?

PF4Public avatar Nov 25 '24 18:11 PF4Public

It seems to just be a packaging issue, I don't think it's relevant to this repo.

ssnailed avatar Nov 25 '24 21:11 ssnailed

I wouldn't consider it a packaging issue. keytar should be added into package.json here (it is essentially what yarn add keytar does) since it is a hard dependency. README should be updated to reflect that keytar native module is a must, while others are optional.

PF4Public avatar Nov 26 '24 18:11 PF4Public

Keytar is in the package.json as a dependency for the bespoke hak build script, which isn't run by most downstream packagers.

ssnailed avatar Nov 26 '24 19:11 ssnailed