Closed Bug 1218918 Opened 7 years ago Closed 7 years ago

devtools "work offline" does not work after real network interface is disabled and re-enabled

Categories

(DevTools :: General, defect)

defect
Not set
normal

Tracking

(firefox45 fixed)

RESOLVED FIXED
Firefox 45
Tracking Status
firefox45 --- fixed

People

(Reporter: bkelly, Assigned: valentin)

Details

Attachments

(1 file)

Steps:

1) Enable "work offline" in devtools.
2) Note pages no longer can load from network.
3) Disable "work offline" in devtools.
4) Note pages can once again load from network.
5) Disable network interface (ethernet on my wind8.1 desktop machine)
6) Note pages no longer can load from network
7) Enable network interface
8) Note pages can once again load from network
9) Enable "work offline" in devtools

Expected:

After step 9, pages should be blocked from the network again.

Actual:

After step 9 I am able to load pages from the network even though "work offline" is checked.  Some time later, after leaving browser idle it begins blocking network again.
By work offline, are we talking about the setting in the Firefox menu bar, or something inside the DevTools toolbox?
Flags: needinfo?(bkelly)
(In reply to J. Ryan Stinnett [:jryans] (use ni?) from comment #1)
> By work offline, are we talking about the setting in the Firefox menu bar,
> or something inside the DevTools toolbox?

I did Hamburger -> Developer -> Work Offline.
Flags: needinfo?(bkelly)
Ah okay, I did not realize it was shown there!  The DevTools has not done much with feature in the past.  It toggles `Services.io.workOffline`, and the behavior from there is managed by the networking code.

:mayhemer, do you know who could look into something like this?
Flags: needinfo?(honzab.moz)
Patrick, can you please forward to the right person?  Thanks.
Flags: needinfo?(honzab.moz) → needinfo?(mcmanus)
Flags: needinfo?(valentin.gosu)
Flags: needinfo?(mcmanus)
* Flip the network.offline-mirrors-connectivity pref, so that ioservice.offline means the same as devtools work offline
* ioService.manageOfflineStatus shouldn't be changed when going to offline mode.
* Add logging to nsIOService in order to track offline/connectivity issues
Assignee: nobody → valentin.gosu
Status: NEW → ASSIGNED
Comment on attachment 8686597 [details] [diff] [review]
Issues with devtools "work offline" when connectivity changes

This bug occurs for 2 reasons:
1. network.offline-mirrors-connectivity was set to true, in order not to break previous assumptions about ioservice.offline. However, this led to the odd situation in which setting ioservice.offline to true did not always cause it to be true, because the getter also took connectivity into account.
2. when calling toggleOfflineStatus, it would set ioService.manageOfflineStatus to false, which effectively disables our connectivity detection. This should only be changed via the preference, if the user wants to do so.
Flags: needinfo?(valentin.gosu)
Attachment #8686597 - Flags: review?(mcmanus)
Attachment #8686597 - Flags: review?(dao)
Comment on attachment 8686597 [details] [diff] [review]
Issues with devtools "work offline" when connectivity changes

Review of attachment 8686597 [details] [diff] [review]:
-----------------------------------------------------------------

something about this makes me nervous, but I can't figure out what...
Attachment #8686597 - Flags: review?(mcmanus) → review+
Attachment #8686597 - Flags: review?(dao) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/b4d1f42f705eade8e9ac8511942aaab8e071f897
Bug 1218918 - Issues with devtools "work offline" when connectivity changes r=mcmanus,dao
https://hg.mozilla.org/mozilla-central/rev/b4d1f42f705e
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 45
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.