Closed
Bug 1440231
Opened 8 years ago
Closed 8 years ago
[Shield] Internet Connection Quality (ICQ) shield study ends when a measurement is performed if the user has no internet access
Categories
(Toolkit :: Telemetry, defect)
Toolkit
Telemetry
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: madalin.cotetiu, Assigned: Dexter)
References
Details
Attachments
(1 file)
|
52 bytes,
patch
|
gfritzsche
:
review+
|
Details | Diff | Splinter Review |
[Prerequisites]:
- Have a clean profile
- Have the following prefs set in user.js file
pref("extensions.legacy.enabled", true);
pref("shield.testing.logging.level", 10);
pref("extensions.icqstudyv1.initDelayMs", 1000);
pref("extensions.icqstudyv1.delayBetweenMeasurementsMs", 60000);
pref("extensions.icqstudyv1.idleWindowS", 15);
pref("shield.test.variation", "test");
[Steps to reproduce]:
1. Download the xpi file from: https://bugzilla.mozilla.org/user_profile?user_id=446256
2. Open Firefox release 58.02 and install the add-on
3. Go offline (unplug the internet cable)
4. Wait for Firefox to detect idle mode
[Expected results]:
Firefox is detecting offline mode the download is rescheduled.
[Actual results]:
The download is not rescheduled and the study ends with
"data": {
"study_state": "ended-negative"
},
[Notes]:
The Services.io.offline command run in the browser console is returning "false" when the cable is unplugged or when the network is disabled
This issue was reproduced in Win 7x64 using latest FF Release
Build identifier: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0
| Assignee | ||
Comment 1•8 years ago
|
||
Hi Valentin! I see that you've touched offline/connectivity modes in bug 1134596 a while back. I'm trying to use |Services.io.offline| to detect the lack of internet connectivity. The code for this study lives here [1] and it's basically a copy paste of [2], which lives in tree. Is this the right thing to check for? There seems to be a |Services.io.connectivity| API endpoint as well. However, in my local testing, both APIs are returning the following (on Linux):
> Services.io.offline = false
> Services.io.connectivity = true
As Madalin mentioned, the |Services.io.offline| is not returning the expected status on Windows as well. Any clue?
[1] - https://github.com/Dexterp37/icq-shield-study/blob/8f5f174a0e0bca5a1486ea08913b3d1cbfcfc2c1/addon/lib/Feature.jsm#L363-L382
[2] - https://searchfox.org/mozilla-central/rev/9a8d3f8191b15cdca89a7ce044c7bea2dd0462dc/services/sync/modules/policies.js#121
Flags: needinfo?(valentin.gosu)
Comment 2•8 years ago
|
||
Services.io.offline means if the browser is in "Offline mode" - should be false most of the time
Services.io.connectivity tell if the system has any network adapters that are up (doesn't know if you can reach the internet) - should be true most of the time
navigator.onLine is a combination of the two (!offline && connectivity)
Note that checking these attributes is not enough to ensure the browser has connectivity, it is only a hint. The way to make sure is to use an XHR/fetch and check that it succeeds.
Flags: needinfo?(valentin.gosu)
| Assignee | ||
Comment 3•8 years ago
|
||
(In reply to Valentin Gosu [:valentin] from comment #2)
> Services.io.offline means if the browser is in "Offline mode" - should be
> false most of the time
> Services.io.connectivity tell if the system has any network adapters that
> are up (doesn't know if you can reach the internet) - should be true most of
> the time
> navigator.onLine is a combination of the two (!offline && connectivity)
Thanks! That's what I was looking for!
> Note that checking these attributes is not enough to ensure the browser has
> connectivity, it is only a hint. The way to make sure is to use an XHR/fetch
> and check that it succeeds.
Got it! We're adding this test before an XHR/fetch to get the hint and avoid the request.
Worst case, we go ahead and catch the XHR failure.
| Assignee | ||
Comment 4•8 years ago
|
||
Assignee: nobody → alessio.placitelli
Comment 5•8 years ago
|
||
Comment on attachment 8953021 [details] [diff] [review]
PR
Review of attachment 8953021 [details] [diff] [review]:
-----------------------------------------------------------------
This looks good to me.
Is this a blocker for the rollout of the study?
What does this mean for testing?
Retesting only the specific affected scenario or others too?
Attachment #8953021 -
Attachment is patch: true
Attachment #8953021 -
Attachment mime type: text/x-github-pull-request → text/plain
Attachment #8953021 -
Flags: review+
| Assignee | ||
Comment 6•8 years ago
|
||
(In reply to Georg Fritzsche [:gfritzsche] from comment #5)
> Comment on attachment 8953021 [details] [diff] [review]
> PR
>
> Review of attachment 8953021 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> This looks good to me.
>
> Is this a blocker for the rollout of the study?
No, I don't think this is a blocker for the study rollout. It's a nice to have, but not something we must have.
> What does this mean for testing?
> Retesting only the specific affected scenario or others too?
This means retesting just this scenario.
Comment 7•8 years ago
|
||
(In reply to I'm away: ask gfritzsche/chutten [:Dexter] from comment #6)
> > Is this a blocker for the rollout of the study?
>
> No, I don't think this is a blocker for the study rollout. It's a nice to
> have, but not something we must have.
Ok, let's defer this then given how close the rollout date is.
| Assignee | ||
Comment 8•8 years ago
|
||
I've filed a new issue to keep track of this: https://github.com/Dexterp37/icq-shield-study/issues/6
The PR won't be merged and won't make it to this rollout. Maybe that's a thing for v2 :)
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•