Closed Bug 1210609 Opened 9 years ago Closed 9 years ago

Content corrupted (sometimes) when using service workers

Categories

(Core :: DOM: Service Workers, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID
Tracking Status
firefox44 --- affected

People

(Reporter: marcosc, Unassigned)

References

Details

Attachments

(2 files)

On occasion, content being served out of the service worker becomes corrupted and the attached is shown. Only limited information is displayed in the browser's error console. 

Ehsan made me file this bug, even tho I don't have a test case.
(the XHTML part of the screenshot attached is a joke, btw... but the top part is not)
My guess is the app code is passing a rejected promise to FetchEvent.respondWith().  We probably just need to add a new error code and log message for this case:

  https://dxr.mozilla.org/mozilla-central/source/dom/workers/ServiceWorkerEvents.cpp#398
Oh, yes, of course.  That makes sense.
Marcos, can you please apply this patch to Firefox to see if the error message changes to complain about remote XUL?  If the answer is yes, this confirms Ben's theory.
Attachment #8669086 - Attachment is patch: true
Attachment #8669086 - Attachment mime type: text/x-patch → text/plain
Ehsan, I think Marcos already told me over twitter he's getting that error message.  The problem is that error code can also get triggered if an unexpected internal error occurs.  The rejected promise should really have a separate error code.
(In reply to Ben Kelly [:bkelly] from comment #5)
> Ehsan, I think Marcos already told me over twitter he's getting that error
> message.  The problem is that error code can also get triggered if an
> unexpected internal error occurs.  The rejected promise should really have a
> separate error code.

... and a nice message to go with it? :)
(In reply to Marcos Caceres [:marcosc] from comment #6)
> (In reply to Ben Kelly [:bkelly] from comment #5)
> > Ehsan, I think Marcos already told me over twitter he's getting that error
> > message.  The problem is that error code can also get triggered if an
> > unexpected internal error occurs.  The rejected promise should really have a
> > separate error code.
> 
> ... and a nice message to go with it? :)

Done in bug 1212636.
Depends on: 1212636
Our suspicion was right, this is indeed caused by a rejected promise being passed to respondWith.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: