Invalid response to an soft update is difficult to debug |
||||
Issue descriptionRepro steps: - Have a server that sometimes responds to sw.js with a valid worker, other times with content-type: text/html (not javascript) - Register the worker (retry until you get the valid worker) - Navigate to an in-scope. Watch for the soft update request in the Network tab. When the server responded properly, everything works fine. When it gave a bad content-type, you'll see a red request in Network tab, but no clue for debugging since it says "Failed to load response data". Note that the main page console displays "GET http://localhost:8787/sw.js net::ERR_INSECURE_RESPONSE" which is good, but it's hard to debug. When register failed, you'll see the "bad MIME type message", which is also good, but it that happen when the update failed. The only way to see what's going on is to use netlog. I don't know the best solution to this. We maybe could have update errors get logged in the main page console, or in the service workers view UI (the worker is never shown as redundant, probably because it failed to load). It seems desirable for the Network tab to display the response too. Inspired by internal bug b/27994972.
,
Apr 22 2016
I think we should call ServiceWorkerVersion::ReportError() from ServiceWorkerWriteToCacheJob when error happens.
,
Apr 25 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7498e14b76230504cc034eb6ee268eea5d91906d commit 7498e14b76230504cc034eb6ee268eea5d91906d Author: horo <horo@chromium.org> Date: Mon Apr 25 05:52:40 2016 Shows the error message while fetching the SW script in the DevTools console. This cl introduces EmbeddedWorkerMsg_AddMessageToConsole IPC message. The browser process sends this message to the renderer to add message to the devtools console. This behavior is similar to FrameMsg_AddMessageToConsole. BUG= 605817 Review URL: https://codereview.chromium.org/1908313003 Cr-Commit-Position: refs/heads/master@{#389415} [modify] https://crrev.com/7498e14b76230504cc034eb6ee268eea5d91906d/content/browser/service_worker/embedded_worker_instance.cc [modify] https://crrev.com/7498e14b76230504cc034eb6ee268eea5d91906d/content/browser/service_worker/embedded_worker_instance.h [modify] https://crrev.com/7498e14b76230504cc034eb6ee268eea5d91906d/content/browser/service_worker/service_worker_write_to_cache_job.cc [modify] https://crrev.com/7498e14b76230504cc034eb6ee268eea5d91906d/content/common/service_worker/embedded_worker_messages.h [modify] https://crrev.com/7498e14b76230504cc034eb6ee268eea5d91906d/content/renderer/service_worker/embedded_worker_dispatcher.cc [modify] https://crrev.com/7498e14b76230504cc034eb6ee268eea5d91906d/content/renderer/service_worker/embedded_worker_dispatcher.h [modify] https://crrev.com/7498e14b76230504cc034eb6ee268eea5d91906d/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp [modify] https://crrev.com/7498e14b76230504cc034eb6ee268eea5d91906d/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.h [modify] https://crrev.com/7498e14b76230504cc034eb6ee268eea5d91906d/third_party/WebKit/public/web/WebEmbeddedWorker.h
,
Apr 25 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7498e14b76230504cc034eb6ee268eea5d91906d commit 7498e14b76230504cc034eb6ee268eea5d91906d Author: horo <horo@chromium.org> Date: Mon Apr 25 05:52:40 2016 Shows the error message while fetching the SW script in the DevTools console. This cl introduces EmbeddedWorkerMsg_AddMessageToConsole IPC message. The browser process sends this message to the renderer to add message to the devtools console. This behavior is similar to FrameMsg_AddMessageToConsole. BUG= 605817 Review URL: https://codereview.chromium.org/1908313003 Cr-Commit-Position: refs/heads/master@{#389415} [modify] https://crrev.com/7498e14b76230504cc034eb6ee268eea5d91906d/content/browser/service_worker/embedded_worker_instance.cc [modify] https://crrev.com/7498e14b76230504cc034eb6ee268eea5d91906d/content/browser/service_worker/embedded_worker_instance.h [modify] https://crrev.com/7498e14b76230504cc034eb6ee268eea5d91906d/content/browser/service_worker/service_worker_write_to_cache_job.cc [modify] https://crrev.com/7498e14b76230504cc034eb6ee268eea5d91906d/content/common/service_worker/embedded_worker_messages.h [modify] https://crrev.com/7498e14b76230504cc034eb6ee268eea5d91906d/content/renderer/service_worker/embedded_worker_dispatcher.cc [modify] https://crrev.com/7498e14b76230504cc034eb6ee268eea5d91906d/content/renderer/service_worker/embedded_worker_dispatcher.h [modify] https://crrev.com/7498e14b76230504cc034eb6ee268eea5d91906d/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp [modify] https://crrev.com/7498e14b76230504cc034eb6ee268eea5d91906d/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.h [modify] https://crrev.com/7498e14b76230504cc034eb6ee268eea5d91906d/third_party/WebKit/public/web/WebEmbeddedWorker.h
,
Apr 28 2016
|
||||
►
Sign in to add a comment |
||||
Comment 1 by falken@chromium.org
, Apr 22 2016