medium.com doesn’t load in Nightly 41.0a1 (2015-06-28)

RESOLVED FIXED in Firefox 42

Status

()

Core
DOM: Service Workers
RESOLVED FIXED
3 years ago
a year ago

People

(Reporter: Eric A. Meyer, Assigned: bkelly)

Tracking

41 Branch
mozilla42
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox42 fixed)

Details

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:41.0) Gecko/20100101 Firefox/41.0
Build ID: 20150628030215

Steps to reproduce:

Followed a link to medium.com.  Also tried typing `medium.com` into the address bar.


Actual results:

The certificate loaded and showed as valid, but after that, nothing loaded.  Nightly kept trying to load without success.  The timed-out error was NOT triggered.


Expected results:

medium.com should have loaded.
I can confirm this behavior in 42.0a1 (2015-07-01).

One oddity was that after opening the Network tab in the DevTools, the site was able to load successfully.

So far, I have not seen any obvious errors in the Browser Console.  Gijs, maybe you have a guess what's going on here?
Status: UNCONFIRMED → NEW
Component: Untriaged → General
Ever confirmed: true
Flags: needinfo?(gijskruitbosch+bugs)
I can't reproduce on today's (july 1) OSX nightly, on a clean profile. Can you? Are you on a non-clean profile, in which case, can you post about:support info?
Flags: needinfo?(gijskruitbosch+bugs)
Flags: needinfo?(eric)
Flags: needinfo?(bgrinstead)
The page loads for me on OSX 42.0a1 (2015-07-01) with or without e10s, and with or without the netmonitor opened.

UA: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:42.0) Gecko/20100101 Firefox/42.0
Flags: needinfo?(bgrinstead)
The only interesting thing I see is in stdout and where it is dumping the string: 'https://medium.com/service-worker.js'
Also confirmed that the page is loading on Win7 42.0a1 (2015-07-01).  UA: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0
Looking in about:serviceworkers, I did have a service worker registered for medium.com.  After clicking "Unregister" on about:serviceworkers, the site loaded correctly.

So, while it seems hard to reproduce, it appears possibly related to service workers in some way.
Component: General → DOM: Service Workers
Product: Firefox → Core
I wonder if we have contacts at medium at all...
Flags: needinfo?(eric)
(Reporter)

Comment 8

3 years ago
I’ll tweet to see if I can catch anyone’s attention.
(Assignee)

Comment 9

3 years ago
There is a serviceworker script, but its basically empty.  Trying to figure out whats breaking.
Assignee: nobody → bkelly
Blocks: 1059784
Status: NEW → ASSIGNED
(Assignee)

Comment 10

3 years ago
It appears to be failing in nsDocShell at the IsThirdPartyURI() check:

  https://dxr.mozilla.org/mozilla-central/source/docshell/base/nsDocShell.cpp?from=nsDocShell.cpp&case=true#14061
(Assignee)

Comment 11

3 years ago
Ignore comment 10.  This appears to be a problem with either the Cache API or the worker ScriptLoader using the Cache API.  I think clearing the SW registration helps because it wipes out the current Cache as well.
(Assignee)

Comment 12

3 years ago
Created attachment 8628414 [details] [diff] [review]
ServiceWorker scripts should never be intercepted. r=baku

This patch prevents SW script loads from be intercepted.  It seems to fix the problem for me, although getting into the state is a bit intermittent.

I believe what was happening was that the ServiceWorker script load itself was getting intercepted by the current ServiceWorker.  This created a deadlock.

I don't fully understand why we don't always hit this.  I think if the registration process successfully puts the value in the Cache in time, then we avoid the loop patch.  Its unclear to me when that would happen, though.

This may be fallout from bug 1167296, but I'm not sure.

In any case, I think we clearly want to avoid intercepting SW scripts per the spec, so this fix is needed regardless.
Attachment #8628414 - Flags: review?(amarchesini)
Attachment #8628414 - Flags: review?(amarchesini) → review+
(Assignee)

Updated

3 years ago
Duplicate of this bug: 1179706
Duplicate of this bug: 1179706
https://hg.mozilla.org/mozilla-central/rev/9ac36249a38b
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox42: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
checked in Nightly with today's (7/3) master build and medium.com is properly loaded. Thanks!
(Reporter)

Comment 18

3 years ago
I tested with the 7/3 build and can sometimes load medium.com, but not always.  Sometimes I get the infinite hang, and other times pages load up just fine.  Is there something I should try clearing or resetting?
I'm still having trouble with 42.0a1 from 2015-07-05. Anyone else?
(Assignee)

Comment 20

3 years ago
Eric, Dirkjan, please use about:serviceworkers to unregister the ServiceWorker for medium.com and try again.  Its possible the registration database is in a bad state.
Flags: needinfo?(eric)
Flags: needinfo?(dirkjan)
That seems to work for me.
Flags: needinfo?(dirkjan)
(Reporter)

Comment 22

3 years ago
Confirmed that the problem persisted in 42.0a1 (2015-07-05) until unregistering the SW for medium.com.  Once I did that, the site loaded fine.
Flags: needinfo?(eric)
We can continue this in bug 1180765 if you all want.
Depends on: 1180765

Comment 24

a year ago
Have this problem in Firefox 51.0.1 32bit and in last Firefox for Android too. Here is screenshot: http://joxi.ru/82QVPG8fjpXZ1A

Have not SW for medium.com in about:serviceworkers. Chrome on the same PC and smartphone opens medium.com well.
You need to log in before you can comment on or make changes to this bug.