element-hq / element-hq/element-web

Constant "Connectivity to the server has been lost"

Open
#27,061 0 comments 0 reactions 0 assignees View on GitHub
O-Uncommon S-Major T-Defect
Dominant language
TypeScript
Stars
13.5k
Forks
2.8k
PR merge metrics
PR metrics pending

Description

### Steps to reproduce

In any of the open chats that I have going in Element I am constantly faced with the error message "Connectivity to the server has been lost". This error message comes and goes and after waiting 10 seconds the message I was trying to send eventually goes until the next one is sent.

![Screenshot 2024-02-21 at 2 19 43 pm](https://github.com/element-hq/element-web/assets/956368/fe040886-6c28-486b-a027-f8f671d29357)

I suspect that this problem has something to do with dual network connections on my laptop. Specifically when docked it has both ethernet and wifi enabled. I see this error in the log around the same time:

```
2024-02-23T08:33:32.924Z E /sync error %s fetch failed: Failed to fetch
ConnectionError: fetch failed: Failed to fetch
at A.requestOtherUrl (vector://vector/webapp/bundles/6843bc7716edc2c4169d/bundle.js:2:849027)
at async A.authedRequest (vector://vector/webapp/bundles/6843bc7716edc2c4169d/bundle.js:2:846904)
at async F.doSync (vector://vector/webapp/bundles/6843bc7716edc2c4169d/bundle.js:2:1108153)
```

### Outcome

For there to be no connectivity issues.

### Operating system

macOS

### Application version

1.11.58

### How did you install the app?

From element.io

### Homeserver

ubuntu.com

### Will you send logs?

Yes

Contributor guide

Open the contributing guide

Research direction

Reproduce the intermittent failure on macOS with Ethernet and Wi-Fi enabled, then inspect the sync error around the bundled entry points A.requestOtherUrl, A.authedRequest, and F.doSync. Compare the behavior while sending messages and verify that sync remains connected without the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.