element-hq / element-hq/element-web
Constant "Connectivity to the server has been lost"
- 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.

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
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