Push notifications (FCM) stop working while the VPN is connected
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 領域
- mobile, networking
調査の方向性
Start by reading NetworkSettingsPoller.applySettingsToBuilder, the location named in the report, and review the proposed exclusion of Google Play Services from the VPN tunnel. Reproduce the failure with the reported ADB dumpsys command, then verify FCM reconnects after Wi-Fi and mobile network changes while private resources remain reachable.
索引モデルが issue の本文から書いたものです。
説明
Describe the Bug
With the Pangolin VPN connected, Google push notifications (FCM) stop arriving after a while. This affects every app (messaging, Home Assistant, etc.) and happens on Wi-Fi and mobile data alike. As soon as the VPN is disconnected, FCM reconnects within seconds and delivers the queued messages.
I tested with adb:
adb shell dumpsys activity service com.google.android.gms/.gcm.GcmService
With the VPN connected:
not connected:
Next backoff interval per network:
GcmNetwork{215 VPN(17) [WiFi(1)]}, PT4H
...
Connecting using McsConnection{GcmNetwork{215 VPN(17) [WiFi(1)]}, type=1, isVpnConnected=true}
Failed connection err:3
Connecting using McsConnection{GcmNetwork{215 VPN(17) [Cell(0)]}, type=0, isVpnConnected=true}
Failed connection err:3
Every attempt on the VPN network failed usually within 15–50 ms, and the backoff grows to 4 hours. An FCM connection opened before the VPN came up keeps working until it drops, which is why it looks like "after a while".
When the VPN is disconnected, the same dumpsys immediately shows Is client connected: true followed by Successful broadcast to ... for the queued messages.****
Here some pointers:
- dumpsys connectivity shows the VPN as VpnTransportInfo{type=1, sessionId=pangolin, bypassable=false ...} covering all UIDs. FCM uses a bypass for its push channel only on VPNs that allow it (Firebase docs); here it has to connect through the VPN network, and that fails.
- Ordinary sockets through the same VPN work: from adb shell, nc -4 mtalk.google.com 5228 succeeds and DNS resolves normally (the client's DNS proxy forwards to the upstream). So the tunnel itself passes traffic; only the GMS push connection on the VPN network fails.
- Not related to battery: Pangolin is in the user doze whitelist (unrestricted). Not related to the DNS upstream setting. The test networks have no global IPv6, so IPv6 isn't involved.
I did a small patch, by excluding Google Play Services from the tunnel inside NetworkSettingsPoller.applySettingsToBuilder.
Tested on a 0.8.2 debug build (arm64): the VPN stays bypassable=false, its UID ranges skip the GMS UID, FCM connects on the underlying network and reconnects after Wi-Fi off/on and Wi-Fi / mobile switches, and private resources keep working (But, on another note, a "per app" VPN would be even better.).
Environment
- OS Type & Version: Debian 13 (trixie) x86_64,Android 17 (Pixel 9)
- Pangolin Version: 1.25.3
- Edition (Community or Enterprise): Community
- Gerbil Version: 1.5.2
- Traefik Version: v3.7
- Newt Version: 1.16.0
- Client Version: 0.8.2 (Play Store)
To Reproduce
Steps to reproduce
Connect the Pangolin VPN on Android.
Leave the phone idle until the existing FCM connection drops (or toggle Wi-Fi off/on).
Run adb shell dumpsys activity service com.google.android.gms/.gcm.GcmService: you'll see Not connected and repeated Failed connection err:3.
Disconnect the VPN: FCM connects immediately.
AI Disclosure
Ai assisted formatting.
Expected Behavior
With the VPN connected, Google push notifications (FCM) should keep arriving as they do without the VPN.
Google Play Services should be able to reconnect its push channel at any time: after the phone has been idle, after Wi-Fi goes off and on, and when switching between Wi-Fi and mobile data.
A split-tunnel VPN that only carries private resources shouldn't block notifications for every other app on the phone.
- 主要言語
- Kotlin
- スター
- 46
- フォーク
- 15
- 平均マージ
- 1分
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
fosrl/android のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
-
bug needs investigating
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
-
Possible client registration regression on version 0.7.0対応中かも @oschwartz10612 が 26 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
-
Switching organizations breaks Olm hole punching for the same client installation再び着手できるかも @oschwartz10612 が 58 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンneeds investigating
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
似ている issue
-
bug desktop
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
simplex-chat/simplex-chat#8291 ·
メンテナーはふだん 1 日以内に返信
-
help wanted needs investigation priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
LeanBitLab/LeanType#883 ·
メンテナーはふだん 1 日以内に返信
-
Heavy legs 1.12–1.17: compiler corpus goldens not regenerated for #4770対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
intellij-elixir/intellij-elixir#4782 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
komikku-app/komikku#1983 ·
メンテナーはふだん 1 日以内に返信