Open Bug 1585591 Opened 5 years ago Updated 4 years ago

Empty Service Worker error message in webconsole

Categories

(Core :: DOM: Service Workers, defect, P3)

defect

Tracking

()

People

(Reporter: nchevobbe, Unassigned)

References

(Blocks 1 open bug)

Details

Steps to reproduce

  1. Navigate to https://nifty-horesradish.glitch.me/
  2. Open webconsole

results

There are 2 error messages displayed:

  • TypeError: ServiceWorker script at https://nifty-horesradish.glitch.me/sw.js for scope https://nifty-horesradish.glitch.me/ encountered an error during installation.

and an empty error message


I investigated if there was anything wrong in the console codebase, but I think this empty message is coming from ServiceWorker code.

In ServiceWorkerPrivateImpl::ErrorReceived, we call ServiceWorkerManager::HandleError with an empty string for aMessage: dom/serviceworkers/ServiceWorkerPrivateImpl.cpp#1011-1014

This empty message is then passed to various functions (dom/serviceworkers/ServiceWorkerManager.cpp#1453-1456 ), and in the end, is rendered in the webconsole.

We should ensure that messages we put in the console are helpful for the developers, which isn't really the case here, and makes the console look broken somehow.

Perry could you have a look please? I think you wrote this class. Thanks!

Flags: needinfo?(perry)
Priority: -- → P3
Assignee: nobody → perry
Flags: needinfo?(perry)
Assignee: perry → nobody

Nicolas, seems like the glitch went down. Can you still reproduce this?

Flags: needinfo?(nchevobbe)
Summary: Empty error message in webconsole → Empty Service Worker error message in webconsole

arf, can't access it neither, and I can't remember what was done in this example ...

Flags: needinfo?(nchevobbe)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.