-
Notifications
You must be signed in to change notification settings - Fork 3
Description
TL;DR
The reason this app is no longer working on KDE Plasma 6 is that it's using an ancient Electron version (19.1.9) which is three years old, predating KDE Plasma 6 by 2 1/2 years. Upgrading to Electron 33 should fix the issue.
The investigation
When you start the application from a terminal the issue is immediately evident:
95044:0423/001839.754517:ERROR:object_proxy.cc(623)] 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
[95044:0423/001839.754537:ERROR:kwallet_dbus.cc(100)] Error contacting kwalletd (isEnabled)
[95044:0423/001839.754790:ERROR:object_proxy.cc(623)] 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
[95044:0423/001839.754801:ERROR:kwallet_dbus.cc(72)] Error contacting klauncher to start kwalletd
[95044:0423/001839.755041:ERROR:object_proxy.cc(623)] 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
[95044:0423/001839.755052:ERROR:kwallet_dbus.cc(418)] Error contacting kwalletd (close)
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error: Safe Storage is not available
at encryptToken (/tmp/.mount_InternykF8gb/resources/app.asar/dist/main/webpack:/internxt/src/apps/main/auth/service.ts:25:11)
at i.<anonymous> (/tmp/.mount_InternykF8gb/resources/app.asar/dist/main/webpack:/internxt/src/apps/main/auth/handlers.ts:96:3)
at i.emit (node:events:538:35)
at i.emit (node:domain:475:12)
at /tmp/.mount_InternykF8gb/resources/app.asar/dist/main/webpack:/internxt/src/apps/main/main.ts:117:14
(node:95044) UnhandledPromiseRejectionWarning: Error: Safe Storage is not available
at encryptToken (/tmp/.mount_InternykF8gb/resources/app.asar/dist/main/webpack:/internxt/src/apps/main/auth/service.ts:25:11)
at i.<anonymous> (/tmp/.mount_InternykF8gb/resources/app.asar/dist/main/webpack:/internxt/src/apps/main/auth/handlers.ts:96:3)
at i.emit (node:events:538:35)
at i.emit (node:domain:475:12)
at /tmp/.mount_InternykF8gb/resources/app.asar/dist/main/webpack:/internxt/src/apps/main/main.ts:117:14
(Use `internxt --trace-warnings ...` to show where the warning was created)
(node:95044) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
As you can see, this outdated Electron version tries to use the DBus service org.kde.kwalletd. However, there is no such service in KDE Plasma 6. Instead, you have org.kde.kwalletd5 and org.kde.kwalletd6.
Since this long retired Electron version cannot find a system secrets service it can use, safeStorage fails to initialise, therefore the authentication service of this app fails. We are not logged in, therefore we get no sync. This is something everyone has been complaining for months, i.e. ever since Plasma 6 launched, but neither Internxt botheref to ask for console logs, nor did anyone else bothered providing them. I guess I am the intersection of web developer, Linux sysadmin, and person who cares…?
Anyway. As per Electron's safeStorage documentation, the current versions of Electron (presumably 33, 34, and 35) do support kwallet5, and kwallet6.
Therefore, the solution is for Internxt to upgrade Electron, fix any issues they may have with the upgrade, and ship a new version using Electron 33 or later.
Alternatively, they could make the dependencies public so we can chance it on our own. But, really, them shipping an app based on a newer Electron version would do a better service to everyone involved.
How I verified the Electron version
First, I checked package.json which states
"electron": "^19.1.9"Considering that a bit weird, being an obsolete version and all that jazz, I extracted the Appimage with ./Internxt.AppImage --appimage-extract and checked the strings in the internxt binary with strings squashfs/internxt | grep '^Chrome/[0-9.]* Electron/[0-9]' which gave me the Electron version:
Chrome/102.0.5005.167 Electron/19.1.9
About the alternatives
I would dismiss this as a nuisance rather than a complete show stopper if the Internxt CLI would offer a reliable WebDAV service. So far I've had to use workarounds for the subdomain they provide not always resolving to localhost (by editing /etc/hosts), and workarounds for the self-signed TLS certificate (not everything uses the system CA root cache, sadly), but for all my troubles I could only use this with RClone and my own (PHP-based) code. When I try using it with Dolphin the WebDAV KIOSlave crashes.
Sure, yeah, I can work with a local copy I have to then sync to remote storage with RSync but this feels a lot like scratching an itch on my left shoulder with my right foot while doing a handstand on a rollercoaster; quite the impressive party trick, but not exactly safe or sane. It would be so much better if the desktop application worked reliably, which ultimately seems within the realm of feasibility.