I am a user, and I already have a solution to a problem I struggled with for a long time. I am writing to seek enlightenment from expert for why the solution works.
I live in China, use an android phone, and use banned apps like Whatsapp. These apps require a VPN to work and they do work. But for a very long time I wouldn’t receive push notifications from these apps, despite having turned on things like autostart and background usage. I also had Play services and required it to go through VPN (split tunneling).
At times, when I turned off WiFi, or when I turned on WiFi, or when I turned off VPN, I would receive suddenly receive old and missed notifications all at once. Which could be a hint. For Signal, by turning VPN off , I would receive a notification that said “downloading new messages”, and when I turn VPN back on I will see those messaged.*
Recently I became very determined to solve it, and upon reading up on FCM, I stumbled upon About FCM messages | Firebase Cloud Messaging which says
“When the VPN is configured to allow us to do so, we bypass the VPN using an encrypted connection (over the base network wifi or LTE) so as to ensure a reliable, battery friendly experience…If the VPN is not configured to be bypassable then Firebase Cloud Messaging will use the VPN network in order to connect to the server.”
To my surprise, my VPN client and many others default to allow for bypassing. So I had this thought: What if I configure my VPN to disallow bypassing? And it works! I now receive push notifications for both VPN-channeled apps like Whatsapp and China domestic apps like WeChat.
But, what happened? With the issue resolved, I really want to know why and how. I can see two possibilities, and I hope the experts here can help satisfy my curiosity:
-
FCM simply could not connect to the internet because it chose to bypass a VPN that allows it to function in China.
-
FCM could connect to the internet, but because the banned apps were channeled through VPN whereas FCM bypassed VPN, some mismatch in communication resulted in push notifications failing.
EDIT 2024/2/6: Added the line labeled *.