Skip to content

Battery drain caused by Element not being able to detect loss of connectivity due to using VPN #9047

@RunWang123

Description

@RunWang123

Steps to reproduce

Hi,

I’ve enabled background sync and I’m using a VPN for internet access. It seems that when the VPN blocks Element’s internet connection, the app still continues to perform sync attempts in the background.

Although I noticed that you’ve already implemented some backoff mechanisms for retries, the app still performs multiple continuous retries, which can lead to unnecessary battery drain.

Would it be possible to implement a customized, app-specific server reachability check before attempting synchronization? This could help prevent redundant sync attempts when the app is not actually able to reach the server through the VPN.

Some approaches can be found here:

StackOverflow: Checking server reachability

How DAVx⁵ handles server reachability with VPN

Thank you!

Outcome

What did you expect?

Lower battery drain when misconfigure the firewall or VPN, also server end issue could also cause this type of continuous retry.

What happened instead?

Your phone model

Pixel 6

Operating system version

Android 15

Application version and app store

Element 1.6.34 from F-droid

Homeserver

matrix.org

Will you send logs?

No

Are you willing to provide a PR?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-DefectSomething isn't working: bugs, crashes, hangs and other reported problems

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions