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

Crash after updating to v1.11.94 on Windows #2161

Closed
meichthys opened this issue Feb 27, 2025 · 41 comments
Closed

Crash after updating to v1.11.94 on Windows #2161

meichthys opened this issue Feb 27, 2025 · 41 comments
Assignees
Labels
A-Electron O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience S-Critical Prevents work, causes data loss and/or has no workaround T-Defect X-Regression Z-Platform-Specific Z-Windows

Comments

@meichthys
Copy link

Steps to reproduce

  1. Click the Update button in the UI
  2. See Element crash
  3. Try to re-launch Element (Fails)

I don't see any errors logged to Windows Event Viewer

Outcome

Windows 11
Element Version: v1.11.94

Operating system

No response

Application version

No response

How did you install the app?

No response

Homeserver

No response

Will you send logs?

Yes

@dosubot dosubot bot added A-Electron O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience S-Critical Prevents work, causes data loss and/or has no workaround labels Feb 27, 2025
@jacotec
Copy link

jacotec commented Feb 27, 2025

Same here, it kills Desktop apps which never can be restarted.
Have filed an issue in Element-Web 5 minutes ago : element-hq/element-web#29379

That version should be pulled immediately.

@arueckbeil
Copy link

Can confirm, the app no longer starts after the update, crashed immediately. I'm on Windows 11 24H2 (26100.3323)

@t3chguy t3chguy marked this as a duplicate of element-hq/element-web#29379 Feb 27, 2025
@FSG-Cat
Copy link

FSG-Cat commented Feb 27, 2025

latest nightly on Windows 10 is also broken.

@AnarcoPunkRJ
Copy link

AnarcoPunkRJ commented Feb 27, 2025

Same, I cant open.

What should I do to be able to open it without losing my settings? Install the old version on top?

@linuxmail
Copy link

Hi,

same for all Windows users at office.

@jacotec
Copy link

jacotec commented Feb 27, 2025

Same, I cant open.

What should I do to be able to open it without losing my settings? Install the old version on top?

Download the app again: https://element.io/download
All settings, rooms and (if there) the own config.json is still there. The download fortunately is 1.11.93.

But then refuse to say "update" when the popup occurs ;-)

@linuxmail
Copy link

You can also use: https://packages.element.io/desktop/install/win32/x64/index.html

@AnarcoPunkRJ
Copy link

Same, I cant open.
What should I do to be able to open it without losing my settings? Install the old version on top?

Download the app again: https://element.io/download All settings, rooms and (if there) the own config.json is still there. The download fortunately is 1.11.93.

But then refuse to say "update" when the popup occurs ;-)

Worked, thanks ^^

@AnarcoPunkRJ
Copy link

It doesn't install when I run the .exe, it just opens the old version, but if I close it and try to open it, it no longer opens. I have to open the installer every time.

@t3chguy
Copy link
Member

t3chguy commented Feb 27, 2025

Cannot reproduce on Linux

Image

@Mainfrezzer
Copy link

Mainfrezzer commented Feb 27, 2025

It doesn't install when I run the .exe, it just opens the old version, but if I close it and try to open it, it no longer opens. I have to open the installer every time.

open the destination on your shortcut and remove the app-1.11.94 folder (it autoupdates after it closes)

@t3chguy
Copy link
Member

t3chguy commented Feb 27, 2025

Cannot reproduce on macos

Image

@t3chguy t3chguy changed the title Crash after updating to v1.11.94 Crash after updating to v1.11.94 on Windows Feb 27, 2025
@jacotec
Copy link

jacotec commented Feb 27, 2025

Cannot reproduce on Linux

As it seems only Windows is affected. I'll try on my Mac ...

@jacotec
Copy link

jacotec commented Feb 27, 2025

@t3chguy Mac OS is fine!

@t3chguy t3chguy marked this as a duplicate of element-hq/element-web#29381 Feb 27, 2025
@rgpublic
Copy link

FWIW: One easy trick I found was to go to the 1.11.93 folder which seems to be still there after the update under AppData/... and run the Element.exe in there. You can obviously also drag that EXE to your taskbar to create a shortcut for the time being. This is perhaps the quickest solution until this is resolved.

@t3chguy t3chguy marked this as a duplicate of element-hq/element-web#29382 Feb 27, 2025
@lands39
Copy link

lands39 commented Feb 27, 2025

just updated, can confirm i'm also having this issue on windows 10 22H2 this morning.

@agitechcr
Copy link

We solved it directly by running the previous version which is available in AppData

C:\users\your_user\AppData\Local\element-desktop\app-1.11.93

Running version 1.11.94 gives the following error on Windows 11 24H2 build 26100.3194.

Image

@Rudolfo1967
Copy link

did not work here!

Download the app again: https://element.io/download All settings, rooms and (if there) the own config.json is still there. The download fortunately is 1.11.93.
But then refuse to say "update" when the popup occurs ;-)

@ccarter-tmt
Copy link

I have exactly the same issue as of moments ago. Accepted prompted upgrade, following which Element did not restart and could not be restarted. Rebooted W10, no change. Downloaded current W64 Desktop install package from official site, installed, no change. Element on W10 is unavailable following the upgrade - total loss of service.

@t3chguy
Copy link
Member

t3chguy commented Feb 27, 2025

Further digging has pointed to this looking like an issue in a Node upgrade done by Github Actions.

actions/runner-images@07e271d#diff-d3119a278ce9ce80fc4b5af63a1112fb3a044aec3e6002d838e8eb26d7a3a499R172

Still investigating the full scope of the issue but a keytar.node file built for ElectronNode v20.18 using Node 22.13.1 works but one built using Node 22.14.0 does not.

The keytar.node file from .93 works fine for .94.

Pinning back the Node version to the strict version #2166 rather than targeting LTS seems to be a workaround.

The keytar.node file from .94 (built by 22.14.0)

  • Works fine under Node 18.15.0
  • Explodes under Node 20.18.3 (Node & Electron)
  • Explodes under Node 22.13.1
  • Works fine under Node 22.14.0

Seems really odd that 22.13.1 can compile for 20.18 just fine, but 22.14.0 cannot compile for 20.18 or 22.13.1

Image

@t3chguy t3chguy marked this as a duplicate of element-hq/element-web#29386 Feb 27, 2025
@bblacher
Copy link

It think this might be the same issue on Arch Linux, also fixed by downgrading Node.
https://gitlab.archlinux.org/archlinux/packaging/packages/element.io/-/issues/14

@t3chguy

@t3chguy
Copy link
Member

t3chguy commented Feb 27, 2025

Thanks for the ping @bblacher

Turns out this issue only affects Windows because the macos runner still has a working Node version https://github.com/actions/runner-images/blob/main/images/macos/macos-14-arm64-Readme.md#nodejs

and the Ubuntu runner has the broken Node version but we build keytar in Docker with a not broken Node version https://github.com/element-hq/element-desktop/blob/develop/dockerbuild/Dockerfile#L24

@proterian
Copy link

I have exactly the same issue . Accepted upgrade, following which Element did not restart and could not be restarted.

@plotpoint
Copy link

same here.... The whole company desktop clients.

@cli-ish
Copy link

cli-ish commented Feb 28, 2025

Same issue here, used the workaround by manual starting the old version.
When will this be patched?

Error:

[2820:0228/084121.389:ERROR:crashpad_client_win.cc(868)] not connected

@t3chguy t3chguy marked this as a duplicate of element-hq/element-web#29391 Feb 28, 2025
@t3chguy
Copy link
Member

t3chguy commented Feb 28, 2025

When will this be patched?

We pulled the .94 update. There is no need to patch given broken installs won't self fix as Node is crashing before our code gets to run the auto updater.

https://element.io/blog/element-desktop-update-for-windows/

@sascha-wi
Copy link

What a tremendous blunder...way to go.

@Rudolfo1967
Copy link

Rudolfo1967 commented Feb 28, 2025 via email

@cli-ish
Copy link

cli-ish commented Feb 28, 2025

When will this be patched?

We pulled the .94 update. There is no need to patch given broken installs won't self fix as Node is crashing before our code gets to run the auto updater.

https://element.io/blog/element-desktop-update-for-windows/

It worked, thanks for the quick fix i am now on the version 1.11.93 like the
https://packages.element.io/desktop/update/win32/x64/ lists.

@t3chguy
Copy link
Member

t3chguy commented Feb 28, 2025

Ultimately this bug was a horrible combination of things happening all at once.

  1. Our tests run on changes, not during releases
  2. Node shipped a new NAPI version in a minor release 22.14.0
  3. Our node version got changed out from under us leading to using 22.14.0 due to a Github runner-images update which we have no way of opting out of
  4. prebuild-install fails to determine target on Node 23.6.0 prebuild/prebuild-install#203
  5. Failures on Node.js 22 nodejs/node-addon-api#1639
  6. https://github.com/atom/node-keytar being archived and thus not receiving the fixes for the 2 above issues + element-desktop needs to move away from Keytar now it is deprecated #1947
  7. The Node crash being such that it isn't caught by a try-catch block Node hard crash when importing napi module nodejs/node#57233 meaning it took out the whole app and any capacity for it to recover or even log anything
  8. It wasn't caught by Nightlies because the Node update rollout was slow and only affected the nightly built just a handful of hours earlier - on which no one reported any issues.

We have made some remediations:

  1. Pulled .94 installer & update nupkg
  2. Announcement and a blog post detailing how to recover (reinstall .93 - no data loss)
  3. Pinned the Node version to one which works 22.13.1
  4. Switched from keytar to keytar-forked - maintained by a github staffer (and unpinned node)

Hoping to get #1947 on the agenda such that we can get away from unmaintained code but just ditching keytar would result in all existing sessions being thrown away, as it secures your session on disk at rest.

We also have a backburner project coined Saner Releases which aims to flip how we do releases, including running smoke tests on the release artifacts before publishing them to catch exactly this sort of stuff.

We do not have a QA team. The Web team is small (4 engineers most of the time and we often get pulled away to help other teams). Running manual tests on every update would be impossible given the vast amount of hardware and time one would need, automating it is difficult as many things lack test orchestration, like there's no test harness around Apple Keychain where we can mock things out to test keytar. So we do rely on users reporting from Nightlies in a wide range of environments to catch issues such as this.

@t3chguy t3chguy assigned t3chguy and unassigned MidhunSureshR Feb 28, 2025
@MichaMican
Copy link

MichaMican commented Mar 3, 2025

@t3chguy You might also want to pull this version from the GitHub Releases

Image

@bblacher
Copy link

bblacher commented Mar 3, 2025

@MichaMican The GitHub releases don't include binaries, as this is a bug in the build system the GitHub releases don't need to be pulled.

@t3chguy
Copy link
Member

t3chguy commented Mar 3, 2025

Yeah, only the windows version was pulled. Mac and Linux are still on 94

@t3chguy
Copy link
Member

t3chguy commented Mar 3, 2025

Unfortunately seems like Node doesn't care that a try-catch is useless to catch broken dependencies if the N-API is involved. We have done all that we can remediate against this issue.

Closing in favour of

#771 which would give us more control by moving away from Node to something which lets us trap & recover from issues of this sort.
#1947 which moves away from archived code.
The saner releases project which adds release artifact testing as much as possible.

The next Element Desktop release will go out on schedule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Electron O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience S-Critical Prevents work, causes data loss and/or has no workaround T-Defect X-Regression Z-Platform-Specific Z-Windows
Projects
None yet
Development

No branches or pull requests