Closed Bug 1823831 Opened 2 years ago Closed 2 years ago

A VPN interferes with weather suggestions

Categories

(Firefox :: Address Bar, task, P1)

task

Tracking

()

RESOLVED FIXED
113 Branch
Tracking Status
firefox113 --- fixed

People

(Reporter: adw, Assigned: adw)

References

Details

Attachments

(1 file)

When the user is on a VPN, the weather suggestion will show information for the VPN's endpoint instead of the user's actual location, and when the VPN is disconnected, a new suggestion fetch isn't immediately triggered.

This detects when the user is on a VPN and treats it the same as when the user
is offline: If a fetch is triggered, QuickSuggest.weather.suggestion is set to
null, and when the VPN is disconnected, a new fetch is triggered.

That means if a successful fetch happens before the user connects to the VPN,
Firefox will continue to show that accurate suggestion for the full fetch period
(30 min), even after the user connects to the VPN. The first time a fetch is
attempted while the VPN is active, the suggestion will be set to null, and
Firefox will stop showing it. Once the user turns off the VPN, a new fetch will
be triggered and the new accurate suggestion will be shown.

Unfortunately Firefox's VPN detection only works on Windows.

If you need to test weather suggestions using a VPN, you can run the following
JS in the browser console first. It will disable VPN detection.

QuickSuggest._test_linkService = {};
Pushed by dwillcoxon@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3b3c6a7f414c When a VPN is active, don't fetch the weather suggestion, and re-fetch when it's disconnected. r=daisuke
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch

The JS in comment 1 isn't right. The correct JS is:

(async function() {
let { QuickSuggest } = ChromeUtils.importESModule(
  "resource:///modules/QuickSuggest.sys.mjs"
);
QuickSuggest.weather._test_linkService = {};
await QuickSuggest.weather._test_fetch();
console.log(`ok`);
})();

That will disable the VPN check and force a fetch. If you need to debug anything further, you can also set browser.urlbar.loglevel to Debug to get some extra logging.

Blocks: 1831689
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: