Android sync over wireguard dies after a week and my workaround for it

Okay folks. This may be better to post to Bitwarden’s Github Mobile but figured I’d start here and see if better to move.

I am running Bitwarden 2.9.1 (34444) on Android 10 (LineageOS 17.1.20210104). Always On VPN via WireGuard for Android v1.0.20201224 (go userspace back-end v0.0.20201118).

When WireGuard is on, syncing works for up to a week or so, then fails with errors like the below:

Exception message: failed to connect to identity.bitwarden.com/104.18.13.33 (port 443) from / 10.6.0.2 (port 44289 after 86400000ms: isConnected failed: ETIMEDOUT (Connection timed out)

My original fix was to uninstall/reinstall the bitwarden app each time this happened. Very annoying. Then I discovered that disabling wireguard long enough to sync Bitwarden would get me going again. Bitwarden will re-break when the VPN was turned back on.

This is better than having to reinstall the app. But still annoying in the public wifi scenario, but hopefully Bitwarden’s own TLS will be enough at that point.

So I guess I’m posting this workaround today in hopes that it helps others. It was obvious to me in hindsight that trying to sync a mobile app sans VPN could work, but all of my other network traffic has been fine. Just bitwarden sync that fails.