Connectivity detection issues under VPN and network loss

Open
#14,528 8 comments 16 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
android, kotlin
Domain
mobile, networking

Research direction

Start by locating the Android ConnectivityManager.NetworkCallback handling and compare it with the AOSP patterns and Signal's changes in #14462. Validate behavior across API levels, always-on VPN with kill switch, and network loss; done means consistent Internet-availability reporting with the required adaptation and testing.

Written by the indexing model from the issue text.

Description

acknowledged
Guidelines
  • I have searched searched open and closed issues for duplicates
  • I am submitting a bug report for existing functionality that does not work as intended
  • This isn't a feature request or a discussion topic
Bug description

While working on the Molly and UnifiedPush projects, we've identified several inconsistencies in how Android's ConnectivityManager.NetworkCallback reports Internet availability across API levels and configurations. Especially for users with always-on VPNs and kill switch enabled, but also seen it in other cases.

In practice, this can lead to delayed notifications, missed calls, or battery drain. Signal has found similar issues, with recent commits reintroducing deprecated APIs to mitigate them (#14462). We haven't tested this directly in Signal, but it may be related to issues such as #14415, #7733, #8692, #14116.

We think we have a reliable solution using only the NetworkCallback API, following patterns from AOSP and avoiding deprecated APIs. Normally we'd just submit a PR, but there are some differences between Molly and Signal (e.g. proxy handling and minSdk 23 vs 27), so it would need some adaptation and extra testing.

Before doing that work, we wanted to check whether such a PR would be welcome. If so, we're happy to prepare it. We can also share logs and concrete repro steps if that helps.

Screenshots

No response

Device

No response

Android version

No response

Signal version

No response

Link to debug log

No response

Dominant language
Kotlin
Stars
29.4k
Forks
6.9k
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from signalapp/Signal-Android

All issues in signalapp/Signal-Android

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.