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

"Connectivity to the server has been lost." #942

Open
ancientmarinerdev opened this issue May 4, 2023 · 12 comments
Open

"Connectivity to the server has been lost." #942

ancientmarinerdev opened this issue May 4, 2023 · 12 comments
Labels
T-Defect X-Community-Supported-Platform This issue occurs in a platform not directly supported by us, but by a community project elsewhere Z-Suse

Comments

@ancientmarinerdev
Copy link

Steps to reproduce

I tried to check an element DM I had, and I had the following message:

This room is running room version 10, which this homeserver has marked as unstable."

I checked my other rooms on matrix.org, and they had the following:

"Connectivity to the server has been lost.
Sent messages will be stored until your connection has returned."

This happened in the last half a week. Probably earliest of Friday, but I was away for the weekend. I am using OpenSuse TW, and updated to the latest version, and restarted computer, and it did not resolve.

I do not know if this is a central issue or a local one or how to approach it. I did see someone in reddit had the same issue from 15 days ago though.

I have no idea how to diagnose or troubleshoot this issue. I don't know if it's a local or central issue. Any help would be appreciated.

Information for package element-desktop:

Repository : openSUSE-Tumbleweed-Oss
Name : element-desktop
Version : 1.11.30-1.1
Arch : noarch
Vendor : openSUSE
Installed Size : 11.3 MiB
Installed : Yes
Status : up-to-date
Source package : element-desktop-1.11.30-1.1.src
Upstream URL : https://github.com/vector-im/element-desktop
Summary : A glossy Matrix collaboration client - desktop
Description :
A glossy Matrix collaboration client - desktop

Outcome

What did you expect?

The client to start and connect so I could use element.

What happened instead?

It's unusable without a connection

Operating system

OpenSuse TW

Application version

1.11.30-1.1

How did you install the app?

Zypper, I think

Homeserver

matrix.org

Will you send logs?

Yes

@t3chguy t3chguy added X-Community-Supported-Platform This issue occurs in a platform not directly supported by us, but by a community project elsewhere Z-Suse labels May 5, 2023
@FireSpike0
Copy link

I can confirm this issue on an other OS (NixOS), so it does not seem to be OS-specific.
I'm not entirely sure, but I seem to remember that the issue started occurring before issuing a system update.

@githubber4ever
Copy link

got the same issue as of today after the element-desktop update today (im on Windows), all mobile clients (Android+iOS) still work without an issue.

@mm2293
Copy link

mm2293 commented May 12, 2023

I can confirm... Same issue here on Windows 10 x64. I'm using my own server.
Network shows the following:
image

image

You can reproduce with just close and start. Seems like the Desktop client losses the authentication credential cache

@niels0n
Copy link

niels0n commented May 18, 2023

I have the same issue on Tumbleweed and I thought it was a distro-specific issue, apparently it's not.
I have to logout and login again everytime I open Element.

@Powsu
Copy link

Powsu commented May 25, 2023

Screenshot from 2023-05-24 20-31-17

Hiya! The issue also affects the official flatpak on Linux Mint. With a false unstable version warning.

Downgrading by five commits, masking updates and purging cache fixed the issue for me. I had my home server admin check the server-end, and there wasn't any conflicting configuration on the synapse side of things.

I suspect this issue is caused by a mistake in a recent update. Perhaps if a developer could look back on recent merged commits and hunt down the offending code, we could patch this out.

@t3chguy
Copy link
Member

t3chguy commented May 25, 2023

@Powsu

official flatpak

The flatpak isn't official.

image

https://github.com/flathub/im.riot.Riot/

This is a community-maintained Flatpak distribution of Element Desktop, formerly called Riot.

Downgrading by five commits, masking updates and purging cache fixed the issue for me. I had my home server admin check the server-end, and there wasn't any conflicting configuration on the synapse side of things.

I suggest feeding this back to https://github.com/flathub/im.riot.Riot/

I suspect this issue is caused by a mistake in a recent update. Perhaps if a developer could look back on recent merged commits and hunt down the offending code, we could patch this out.

No reports from the official packages yet unfortunately, so is treated as a packaging issue

@ancientmarinerdev
Copy link
Author

It seems it's fine when I relog in, it seems to be that I'm using Element on mobile and desktop and the mobile session invalidates the desktop session.

Basically, people cannot use both at same time which is quite a significant bug.

@Hi-Angel
Copy link

Just got same problem. I only use a desktop instance, no mobile version, so I don't thinks it's relevant.

Logging out/in helped.

@kc01-8
Copy link

kc01-8 commented Aug 16, 2023

Exact same issue on ubuntu 22.04
Completely vanilla install aside from caddy, matrix-synapse, postgresql-14 and htop
The server was working surprisingly well until a few hours ago it began to have this issue.
Strangely, it wants me to "upgrade" the room to version 9 when it is at version 10.
I remember seeing this issue on another server some time ago but I didn't host this one so no further info.
I can restart the matrix synapse service, caddy, and postgresql with no issues. I even edited the default
matrix synapse index.html, and saw these changes happen as expected.
The client I am using to connect to my server is schildi.chat. Is this actually an issue with element?

@stikonas
Copy link

stikonas commented Sep 24, 2023

This might be related to SchildiChat/schildichat-desktop#170 though I can reproduce this bug on Gentoo.

EDIT: most likely it is actually issue with keytar not being available: #850

@johnjaylward
Copy link

johnjaylward commented Nov 9, 2023

I'm having the same issue, and it seems to be related to some kind of database corruption in the client as I see this line in my logs for when the client starts up:

"Error opening the database: DatabaseUnlockError("Invalid passphrase")"

key log line:

2023-11-09T18:08:30.938Z D StorageManager: Checking storage consistency
2023-11-09T18:08:30.938Z D StorageManager: Local storage supported? true
2023-11-09T18:08:30.938Z D StorageManager: IndexedDB supported? true
2023-11-09T18:08:30.938Z D StorageManager: Local storage contains data? true
2023-11-09T18:08:30.938Z D StorageManager: Crypto initialised? true
2023-11-09T18:08:30.940Z D StorageManager: Sync store using IndexedDB contains data? true
2023-11-09T18:08:30.940Z D StorageManager: Crypto store using IndexedDB contains data? true
2023-11-09T18:08:30.940Z D StorageManager: Storage consistency checks passed
2023-11-09T18:08:30.968Z E Expected a pickle key, but none provided.  Encryption may not work.
2023-11-09T18:08:30.968Z D Session persisted for @redacted:matrix.redacted.server
2023-11-09T18:08:30.968Z D Lifecycle: Starting MatrixClient
2023-11-09T18:08:30.972Z D FetchHttpApi: --> GET https://matrix.redacted.server/_matrix/client/v3/thirdparty/protocols
2023-11-09T18:08:30.978Z D StorageManager: Persistent? true
2023-11-09T18:08:30.979Z D Switching to room id !qfhFJYaXaUcoggTKJK:matrix.redacted.server at event undefined
2023-11-09T18:08:31.180Z D EventIndex: Error initializing the event index {"message":"Error opening the database: DatabaseUnlockError(\"Invalid passphrase\")"}
2023-11-09T18:08:31.180Z D IndexedDBStore.startup: connecting to backend
2023-11-09T18:08:31.180Z D MatrixClientPeg: waiting for MatrixClient store to initialise
2023-11-09T18:08:31.197Z D IndexedDB worker is ready

Once loading the session failed, the client continues to try to process the connections. However, it appears that this "Invalid passphrase" error is not being properly handled. Either the user should be asked to re-enter the passphrase, or the client should explain the error and ask the user to re-auth, then restart the session.

@johnjaylward
Copy link

My issue appears to be KDE/Gnome keystore issue. After logging in, I stepped away from the keyboard and the keystore prompted me for my passphrase, but I didn't enter it until I returned some 30+minutes later. Meanwhile, Element-Desktop started up (as I have it set to auto-start on login) and the keystore was not unlocked yet.

Logging out of my screen and back in the error did not repeat itself.

@github-actions github-actions bot added the Stale label Feb 11, 2025
@RiotRobot RiotRobot removed the Stale label Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Defect X-Community-Supported-Platform This issue occurs in a platform not directly supported by us, but by a community project elsewhere Z-Suse
Projects
None yet
Development

No branches or pull requests