Closed Bug 2042362 Opened 15 days ago Closed 8 days ago

VPN toggle/buttons remain unresponsive after network restoration until hard app close

Categories

(Firefox for Android :: Privacy, defect)

Firefox 153
All
Android
defect

Tracking

()

VERIFIED FIXED
153 Branch
Tracking Status
firefox153 --- verified

People

(Reporter: alemartin, Assigned: sstreich)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [fxdroid][fx-vpn])

Attachments

(3 files)

Prerequisites

  • Firefox account signed in to VPN;
  • Device network connectivity is completely disabled (Airplane Mode ON);

Steps to reproduce

  1. Open the site protection identity dialog, the existing tab menu or any other VPN menu access point.
  2. Try to turn the VPN ON.
  3. Disable Airplane Mode to fully restore device internet connectivity.
  4. Attempt to tap the VPN toggle switch again once back online.

Expected behavior

The VPN toggle/buttons are functional and allows a successful connection as soon as internet access is restored.

Actual behavior

The VPN toggle remains completely frozen and unresponsive to touch inputs even after the internet connection returns. The functional block persists indefinitely, and the user cannot turn on the VPN unless they force-stop/hard close and restart the application.

Device information

  • Firefox version: Fx Nightly 153.0a1 (Build #2016163143)
  • Android device model: Google Pixel 7a
  • Android OS version: Android 16

Any additional information?

  • See attached media.
  • The "Couldn't connect to VPN. Try again in a few minutes." error is also not displayed in this scenario;
Summary: VPN toggle/buttons remains unresponsive after network restoration until hard app close → VPN toggle/buttons remain unresponsive after network restoration until hard app close

We haven't plumbed errors up to the UI (if any) so that would need to be added first before we can tell if there is a bug in the IPProtection engine.

Basti, based on the video, do you know of any obvious reason why we can't enable the VPN after the network is restored? GeckoView notifies Gecko when network changes occur, so we should be able to observe when is the right time to reconnect.

Flags: needinfo?(sstreich)

We have a queue making sure we don't spam guardian, i am wondering if that is the problem here that the request is "stuck" i'll have a look this very much sounds like a toolkit issue

Assignee: nobody → sstreich
Status: NEW → ASSIGNED
Flags: needinfo?(sstreich)
Whiteboard: [fxdroid] → [fxdroid][fx-vpn]

So done some digging, activate airplane mode, press start:
-> ProxyManager sends the error upwards with "network error", IPProtectionController.java bubbles up the Error.
now it seems we're in the "stuck state".
On the 2nd time and i press on the button there is no event sent to the GeckoViewBridge, so maybe something is awaiting something?
If i disable airplane mode and using the js devtools manually trigger an activation of the vpn (which suceeds) the whole thing get's unstuck.

I'm wondering if something is simply blocking the button until we have reached "active"

On a failed activation i.e due to beeing offline in airplane mode.

The IPProxyManager moves from Activating -> Ready, the original activaiton GeckoResult gets rejected with the net error.

It seems the Observe toggle did drop the nulls before the dedupe, so true,null(due to aborting the activation),true would not re-trigger the handler.activate().

Pushed by sstreich@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/cb5eef7b9015 https://hg.mozilla.org/integration/autoland/rev/c76f58a36621 Clear pending activate on Reaching a Settled State r=jonalmeida,android-reviewers
Status: ASSIGNED → RESOLVED
Closed: 8 days ago
Resolution: --- → FIXED
Target Milestone: --- → 153 Branch
Attached video video6.mp4

Fix verified in Fx Nightly 153.0a1 (Build #2016164946) with Google Pixel 7a (Android 16). The VPN toggle/buttons are now functional and allows a successful connection as soon as internet access is restored.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: