Login fails with "Unexpected error"
Wire version: 3.35.3348 Wire for web version: 2024.04.11.07.16.27 Operating system: Arch Linux Which antivirus software do you have installed: none
What steps will reproduce the problem?
- Start Wire
- Login
What is the expected result?
Login should work
What is the actual result?
Login failes with the error message:
Unexpected error
when started froma terminal, this additional error is printed:
Error occurred in handler for 'EVENT_TYPE.ACTION.ENCRYPT': Error: Error while encrypting the text provided to safeStorage.encryptString. Encryption is not available.
at /usr/lib/wire-desktop/electron/dist/main.js:254:115
at WebContents.<anonymous> (node:electron/js2c/browser_init:2:79681)
at WebContents.emit (node:events:514:28)
Please provide any additional information below. Attach a screenshot if possible.
The error has been reproduced by both version 3.34.3307 from the official arch repository as well as with the current version 3.35.3348 rebuild today. ...
This also happens to me after updating wire-desktop today.
Wire version: 3.35.3348 Wire for web version: 2024.04.11.07.16.27 Operating system: Linux, Debian Testing Which antivirus software do you have installed: none
Using the correct password gives the message "Unexpected error", and prevents log in. Using the wrong password gives the message "Please verify your details and try again".
Starting wire-desktop --enable-logging yields this console message:
Error occurred in handler for 'EVENT_TYPE.ACTION.ENCRYPT': Error: Error while encrypting the text provided to safeStorage.encryptString. Encryption is not available.
at /opt/Wire/resources/app.asar/electron/dist/main.js:254:115
at WebContents.<anonymous> (node:electron/js2c/browser_init:2:78183)
at WebContents.emit (node:events:514:28)
[1710667:0411/143522.744812:INFO:CONSOLE(2)] "%c@wireapp/webapp%c %caction%c %cLOGIN_FAILED%c color:#F99157; font-weight:bold; font-weight:bold; background-color:rgba(255,204,102, 0.1);color:#FFCC66;padding:2px 5px;border-radius:2px; ", source: https://app.wire.com/min/auth.js?2024.04.11.07.16.27 (2)
[1710667:0411/143522.744896:INFO:CONSOLE(2)] "%cprev state%c color:#999999; font-weight:bold; [object Object]", source: https://app.wire.com/min/auth.js?2024.04.11.07.16.27 (2)
[1710667:0411/143522.744985:INFO:CONSOLE(2)] "%caction%c color:#FFCC66; font-weight:bold; [object Object]", source: https://app.wire.com/min/auth.js?2024.04.11.07.16.27 (2)
[1710667:0411/143522.745069:INFO:CONSOLE(2)] "%cnext state%c color:#6699CC; font-weight:bold; [object Object]", source: https://app.wire.com/min/auth.js?2024.04.11.07.16.27 (2)
[1710667:0411/143522.745221:INFO:CONSOLE(2)] "%c@wireapp/webapp%c %caction%c %cLOGIN_FAILED%c color:#F99157; font-weight:bold; font-weight:bold; background-color:rgba(255,204,102, 0.1);color:#FFCC66;padding:2px 5px;border-radius:2px; ", source: https://app.wire.com/min/auth.js?2024.04.11.07.16.27 (2)
[1710667:0411/143522.746524:INFO:CONSOLE(2)] "Uncaught (in promise) Error: Error invoking remote method 'EVENT_TYPE.ACTION.ENCRYPT': Error: Error while encrypting the text provided to safeStorage.encryptString. Encryption is not available.", source: node:electron/js2c/renderer_init (2)```
However, after attempting to work around the issue by using previous versions of wire-desktop, the issue persisted. Perhaps the wire-desktop update merely caused a new log-in attempt (through restarting the app).
Same here after update: Wire app (snap): 3.32.3079 (= lastest/stable snap version) OS: Kubuntu 23.10 (6.5.0-27-generic kernel) Which antivirus software do you have installed: none
wire --enable-logging
Error occurred in handler for 'EVENT_TYPE.ACTION.ENCRYPT': Error: Error while decrypting the ciphertext provided to safeStorage.decryptString. Encryption is not available.
at /snap/wire/365/opt/Wire/resources/app.asar/electron/dist/main.js:210:115
at node:electron/js2c/browser_init:2:97909
at EventEmitter.<anonymous> (node:electron/js2c/browser_init:2:81422)
at EventEmitter.emit (node:events:513:28)
Edit: Also occurs with Wire snap app version 3.35.3348 (= latest/edge snap version)
This happened after the incident couple of days ago when SSL certificate for app.wire.com expired. It was down for several hours.
After the last update+restart login stopped working. The old version doesn't work either anymore.
thanks for reporting this! wire is working on a fix, but there is no release time yet.
the reason for the problem is an error in handling a missing library on the underlying OS. as a workaround, you can manually set the safeStorage backend for electron with eg.:
wire-desktop --password-store=gnome-libsecret
or
wire-desktop --password-store=kwallet5
these instructions may require some tweaking depending on your setup. for example, on debian without gnome, you may need to do this:
sudo apt install libsecret-tools
wire-desktop --password-store=gnome-libsecret
apologies for the hickup, and thanks again for the reports!
@fisx thanks,
while we're here, do you have any idea why on https://wire.com/en/app-download Linux is marked as unsupported, and the latest version is from December 2022?
thanks for reporting this! wire is working on a fix, but there is no release time yet.
the reason for the problem is an error in handling a missing library on the underlying OS. as a workaround, you can manually set the safeStorage backend for electron with eg.:
wire-desktop --password-store=gnome-libsecretor
wire-desktop --password-store=kwallet5these instructions may require some tweaking depending on your setup. for example, on debian without gnome, you may need to do this:
sudo apt install libsecret-tools wire-desktop --password-store=gnome-libsecretapologies for the hickup, and thanks again for the reports!
Thank you for the update. Sadly, the workaround isn't working on Plasma with the snap version of the wire app (kwallet is installed):
wire --password-store=kwallet5
Error org.freedesktop.DBus.Error.Failed: cannot find desktop file "/var/lib/snapd/desktop/applications/wire_Wire.desktop"
(wire-desktop:22376): Gtk-WARNING **: 21:53:30.820: Theme parsing error: gtk.css:3536:25: 'font-feature-settings' is not a valid property name
Gtk-Message: 21:53:30.836: Failed to load module "colorreload-gtk-module"
Gtk-Message: 21:53:30.837: Failed to load module "window-decorations-gtk-module"
[22376:0411/215330.870232:ERROR:object_proxy.cc(576)] Failed to call method: org.kde.KWallet.isEnabled: object_path= /modules/kwalletd5: org.freedesktop.DBus.Error.AccessDenied: An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.179" (uid=1000 pid=22376 comm="/snap/wire/444/opt/Wire/wire-desktop --no-sandbox " label="snap.wire.wire (enforce)") interface="org.kde.KWallet" member="isEnabled" error name="(unset)" requested_reply="0" destination="org.kde.kwalletd5" (uid=1000 pid=3017 comm="/usr/bin/kwalletd5 --pam-login 13 14" label="unconfined")
[22376:0411/215330.870248:ERROR:kwallet_dbus.cc(112)] Error contacting kwalletd5 (isEnabled)
[22376:0411/215330.870429:ERROR:object_proxy.cc(576)] Failed to call method: org.kde.KLauncher.start_service_by_desktop_name: object_path= /KLauncher: org.freedesktop.DBus.Error.ServiceUnknown: The name org.kde.klauncher was not provided by any .service files
[22376:0411/215330.870432:ERROR:kwallet_dbus.cc(81)] Error contacting klauncher to start kwalletd5
[22376:0411/215330.870485:ERROR:object_proxy.cc(576)] Failed to call method: org.kde.KWallet.close: object_path= /modules/kwalletd5: org.freedesktop.DBus.Error.AccessDenied: An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.179" (uid=1000 pid=22376 comm="/snap/wire/444/opt/Wire/wire-desktop --no-sandbox " label="snap.wire.wire (enforce)") interface="org.kde.KWallet" member="close" error name="(unset)" requested_reply="0" destination="org.kde.kwalletd5" (uid=1000 pid=3017 comm="/usr/bin/kwalletd5 --pam-login 13 14" label="unconfined")
[22376:0411/215330.870490:ERROR:kwallet_dbus.cc(503)] Error contacting kwalletd5 (close)
@fisx thanks,
while we're here, do you have any idea why on https://wire.com/en/app-download Linux is marked as unsupported, and the latest version is from December 2022?
If you use the debian package (debian- or ubuntu-based distros), you'll get the most recent version (today: Version 3.35.3348 - Wire für Web-Version 2024.04.11.07.16.27).
On other distros, you can get today's release here. all releases are here.
The reason linux is marked as unsupported is that we do care about Linux, but we don't have the capacity to commit to always preventing issues like this from happening. Many Wire developers are using wire on Linux, and we're hopeful to add official Linux support at some point in the future, but for now it's just available without any guarantees.
Sorry, I myself wouldn't be very impressed by how this looks. We're doing what we can with the resources we have.
Sadly, the workaround isn't working on Plasma with the snap version of the wire app (kwallet is installed):
have you tried kwallet instead?
as I said, it may need some tinkering.
Sadly, the workaround isn't working on Plasma with the snap version of the wire app (kwallet is installed):
have you tried
kwalletinstead?as I said, it may need some tinkering.
Doesn't work either. I guess I have to wait for a fix.
wire --password-store=kwallet
Error org.freedesktop.DBus.Error.Failed: cannot find desktop file "/var/lib/snapd/desktop/applications/wire_Wire.desktop"
(wire-desktop:26508): Gtk-WARNING **: 22:30:24.497: Theme parsing error: gtk.css:3536:25: 'font-feature-settings' is not a valid property name
Gtk-Message: 22:30:24.507: Failed to load module "colorreload-gtk-module"
Gtk-Message: 22:30:24.507: Failed to load module "window-decorations-gtk-module"
[26508:0411/223024.538857:ERROR:object_proxy.cc(576)] Failed to call method: org.kde.KWallet.isEnabled: object_path= /modules/kwalletd: org.freedesktop.DBus.Error.ServiceUnknown: The name org.kde.kwalletd was not provided by any .service files
[26508:0411/223024.538872:ERROR:kwallet_dbus.cc(112)] Error contacting kwalletd (isEnabled)
[26508:0411/223024.539031:ERROR:object_proxy.cc(576)] Failed to call method: org.kde.KLauncher.start_service_by_desktop_name: object_path= /KLauncher: org.freedesktop.DBus.Error.ServiceUnknown: The name org.kde.klauncher was not provided by any .service files
[26508:0411/223024.539039:ERROR:kwallet_dbus.cc(81)] Error contacting klauncher to start kwalletd
[26508:0411/223024.539236:ERROR:object_proxy.cc(576)] Failed to call method: org.kde.KWallet.close: object_path= /modules/kwalletd: org.freedesktop.DBus.Error.ServiceUnknown: The name org.kde.kwalletd was not provided by any .service files
[26508:0411/223024.539240:ERROR:kwallet_dbus.cc(503)] Error contacting kwalletd (close)
Driver does not support the 0xa7a0 PCI ID.
(wire-desktop:26508): Gtk-WARNING **: 22:30:24.577: Theme parsing error: gtk.css:3536:25: 'font-feature-settings' is not a valid property name
Error occurred in handler for 'EVENT_TYPE.ACTION.ENCRYPT': Error: Error while encrypting the text provided to safeStorage.encryptString. Encryption is not available.
at /snap/wire/444/opt/Wire/resources/app.asar/electron/dist/main.js:254:115
at WebContents.<anonymous> (node:electron/js2c/browser_init:2:78183)
at WebContents.emit (node:events:514:28)
Error occurred in handler for 'EVENT_TYPE.ACTION.ENCRYPT': Error: Error while encrypting the text provided to safeStorage.encryptString. Encryption is not available.
at /snap/wire/444/opt/Wire/resources/app.asar/electron/dist/main.js:254:115
at WebContents.<anonymous> (node:electron/js2c/browser_init:2:78183)
at WebContents.emit (node:events:514:28)
(I updated the instructions in the wiki, hopefully this helps!)
the reason for the problem is an error in handling a missing library on the underlying OS.
Does this mean that this bug could alternatively be worked around by installing the missing library? And, if so, which?
We will be working on a fix for this internally but if you are still having issues i recommend using the webapp for the time being. Apologies for the issue.
Thanks for the logs @sebastian-zero !
It seems your issue is related with AppArmor policies, could you see if editing the AppArmor profile of the Snap helps? See here.
Unfortunately, we do not package the Snap on SnapCraft ourselves to edit those policies, the issue is likely to persist (without manually editing the profile file) until the maintainer is aware of he issue, I'll try to get in touch with them.
Result of the investigation so far:
Cause
- We started using safeStorage with our latest release yesterday (2024-04-11)
Identified Issues (on Linux)
- Using the Electron app, login will fail if you don't have the library for one of the supported keychain installed (gnome_libsecret or kwallet)
- Even with the correct keychain on your system, login will fail if you're not running a full desktop environment supported by Chromium (see here for a list), this will affect most users running a tiling window manager
- Using the Snap from SnapCraft (not packaged or maintained by Wire) the AppArmor profile prevents access to the keychain, even if present on the system
How to fix today
- If your system is missing a standard keychain install either
gnome-libsecretor akwalletversion, for examplegnome-libsecreton a Debian based distro would be:
sudo apt install libsecret-tools
- If a keychain is installed but not recognized by Electron, launch the app with the correct
--password-storeflag, or add it to the wire-desktop.desktopfile, example:
wire-desktop --password-store=gnome-libsecret
Plans to solve the issue
- Handle the error and provide steps to solve the issue on login (instead of
Unexpected error), this will require a fix to be applied to our production web app. - If Electron is able to correctly detect that you have a keychain installed, we should be able to release a fix to the Linux Electron app that would set the correct
password-storeflag, we're investigating - I'll try to reach out to one of the SnapCraft maintainer to try and solve the AppArmor issue
How can you help?
- If you're having an issue we haven't identified (you're running a full desktop environment and your Wire application is not a Snap), please report it here with details on your app version, distribution, keychain and desktop environment.
- If you're able to fix the snap issue editing the AppArmor profile, please share a step-by-step here
I will follow this thread best I can during the weekend, apologies to those affected, thank you for reporting the issue and for your patience
Small update:
- @sebastian-zero I think I identified a potential fix for the Snap, I contacted the maintainer
- I'm working on handling the error so it would direct you to a support page
- I created this wiki entry as reference before our localization team can work on a support article (I missed your post @jknockel , apologies, this should answer your question)
In a nutshell, I hope the Snap issue will be addressed soon, it doesn't seem we can provide a better experience than linking to a support page for people who don't run a desktop environment, I hope it's satisfying, I imagine users running a tiling window manager are not afraid of the command line :smile: .
I'll let you know when the error handling is live, thanks for your patience
Trying the workaround on Debian testing I get this when attempting to log in:
$ sudo apt install libsecret-tools
<snip>
$ wire-desktop --password-store=gnome-libsecret
Error occurred in handler for 'EVENT_TYPE.ACTION.DECRYPT': TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received an instance of Object
at new NodeError (node:internal/errors:406:5)
at Function.from (node:buffer:324:9)
at /opt/Wire/resources/app.asar/electron/dist/main.js:255:136
at WebContents.<anonymous> (node:electron/js2c/browser_init:2:78183)
at WebContents.emit (node:events:514:28) {
code: 'ERR_INVALID_ARG_TYPE'
}
Error occurred in handler for 'EVENT_TYPE.ACTION.ENCRYPT': Error: Error while encrypting the text provided to safeStorage.encryptString. Encryption is not available.
at /opt/Wire/resources/app.asar/electron/dist/main.js:254:115
at WebContents.<anonymous> (node:electron/js2c/browser_init:2:78183)
at WebContents.emit (node:events:514:28)
Edit: After installing gnome-keyring it failed with "unexpected error" again the first launch when I got a prompt to set up a keyring password, but after a relaunch it works! Unfortunately my scrollback is gone. :'(
@V-Gira thank you for your help!
A bit off-topic suggestion to the Wire engineering team: Maybe it would be beneficial if Wire would focus on one Linux cross-distro distribution format like flatpak (or snap, but flatpak seems more popular) and maybe retire the 3rd party ppa in the long run. This could mean that Wire takes ownership of the flatpak (or snap). Another benefit for the Wire team: less testing efforts on new releases.
@V-Gira thank you for your help!
A bit off-topic suggestion to the Wire engineering team: Maybe it would be beneficial if Wire would focus on one Linux cross-distro distribution format like flatpak (or snap, but flatpak seems more popular) and maybe retire the 3rd party ppa in the long run. This could mean that Wire takes ownership of the flatpak (or snap). Another benefit for the Wire team: less testing efforts on new releases.
What you are describing is exactly how I would personally envision limited Linux support, starting with the Flatpak and narowing it down to wayland+pipewire or xorg+pulseaudio.
We"re not ready for that discussion yet (assigning resources to Linux support), but I certainly am :laughing:
I did manage to build a working Snap btw, the (much more knowledgeable than me) maintainer should be able to fix the issue I imagine.
Hi, i have also experienced this issue and after enabling KDE Wallet on my system i managed to login initially.
But, when i get prompted to input the account passcode i get redirected back to the login screen again.
Hi, i have also experienced this issue and after enabling KDE Wallet on my system i managed to login initially.
But, when i get prompted to input the account passcode i get redirected back to the login screen again.
@bik0t I did test kwallet on an Arch VM, maybe you could try to see if you have better luck with a different version of kwallet?
For what it's worth, I couldn't get kwallet6 to work, but kwallet5 is working as expected.
Hi @V-Gira , thank you for the reply.
I am currently using kwallet5. The issue though is only when using Wire with a passcode. If I don't setup a passcode for the account everything works as expected.
If I do setup a passcode, after initially logging in, setting up the passcode and quitting the app, when I open it back I get stuck in the loop as described previously.
EDIT: is there any way I can disable the passcode manually in ~/.config/Wire? I tried building and running from dev branch over the same directory but could not see how to easily remove the passcode. Otherwise I am afraid I will lose all my chats.
@bik0t There's no good passcode workaround but I sent you a private message on Github (no it's not a thing, but it kinda is, you'll see)
Has anyone tried Kalium from the commandline? I would like to know if Kalium is also affected by this problem.
It would be very interesting to ditch the very fat Electron bloat in favor of a simple TUI. I tried Kalium a year (or 3) ago but could not get it going likely due to lack of documentation. I reported bugs but the whole bug tracker was later deleted so there are no longer records of what I tried and what failed.
The Android app app no longer gets notifications. My version was spontaneously hit with unannounced forced obsolescence a couple years ago with no upgrade possibility, so up until this bug notifications were the only thing that worked. But now the notifications are apparently broken too.
I’m a bit shocked that there are on the order of ~5 people affected. After a week of being unable to communicate with people I would think a crowd of thousands would be in here looking to crucify someone. I must have overestimated the popularity of Linux.
What you are describing is exactly how I would personally envision limited Linux support, starting with the Flatpak
Please do not release your app on flatpak. We prefer apt. It's more secure.
I’m a bit shocked that there are on the order of ~5 people affected.
You're counting the number of people who have issues and have GitHub and bothered to search for this issue on GitHub.
Generally I estimate that the number of folks who go through the extra effort to signup for GitHub and report the issue is ~1% of those affected. So, yes, this probably is impacting hundreds or thousands of people.
I'm one of the other 99% watching and waiting. I have the web version running in a browser window as a stopgap. However it only displays a tiny few past messages.
I dread losing my chat history on this machine.
M.
End of week update:
- There doesn't appear to be a way to set up the correct flag automatically, we're handling the error and redirecting to the help page, no ETA but it should be live soon.
- I raised a PR on the Snapcraft repo, it's now up to the maintainer but it was a straihtforward fix.
@bruceleerabbit , @maltfield , @mdevour you should be able to fix the issue by following the steps here , if your issue is not covered, please tell us more.
@bruceleerabbit kalium (or any other client) is not affected, the issue concerns only the Electron wrapper (the browser version is not affected as far as we know, let us know otherwise)
Hi, created an account to comment here.
On an up to date debian bookworm and wire-desktop, I'm still having this issue after installing libsecret-tools and giving the --password-store flag.
I get the following error:
Error occurred in handler for 'EVENT_TYPE.ACTION.ENCRYPT': Error: Error while encrypting the text provided to safeStorage.encryptString. Encryption is not available.
at /opt/Wire/resources/app.asar/electron/dist/main.js:254:115
at WebContents.<anonymous> (node:electron/js2c/browser_init:2:78183)
at WebContents.emit (node:events:514:28)
I'm guessing because of this I lost all my chat history and will never receive the messages for the last week...
@bik0t There's no good passcode workaround but I sent you a private message on Github (no it's not a thing, but it kinda is, you'll see)
I have exactly the same issue, I am using the appimage version of the app and since I had a passcode I am unable to get out of the login loop described. @V-Gira is there a way to fix this without loosing chat history ?
@bik0t any chance you can share the workaround @V-Gira told you?