element-hq / element-hq/element-android

Infinite initial sync when homeserver down

Open
#8,527 0 comments 0 reactions 0 assignees View on GitHub
A-Initial sync O-Occasional S-Tolerable T-Defect
Dominant language
Kotlin
Stars
3.7k
Forks
917
PR merge metrics
No merged PRs in 30d

Description

### Steps to reproduce

1. Make sure the homeserver is down.
2. Start an initial sync.

### Outcome

#### What did you expect?

The app should first ping the homeserver to ensure it is up and working, before starting the sync process. If it is not, then the app should gracefully refuse to sync, stating the reason.

(Corollary: I haven't faced this, but if the homeserver goes down midway, there should be a reliable way for the sync process to end without losing any data, as well.)

#### What happened instead?

The initial sync progress bar showed up and stayed there at 0% for **_several hours_**, until the homeserver came back up. This generated fears of anything from a broken app to a corrupted database, until it struck me to check if the homeserver was down.

Meanwhile, the app was completely unusable, and had to be delicately kept open by ensuring no other RAM-heavy application was opened until the sync finished, again, due to fear of interrupting the initial sync and actively causing data loss/corruption.

### Your phone model

_No response_

### Operating system version

_No response_

### Application version and app store

1.5.32 - F-Droid

### Homeserver

_No response_

### Will you send logs?

No

### Are you willing to provide a PR?

No

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.