Duplicate console log messages from worker
Reported by
t...@crowder.org,
Nov 27
|
|||||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36 Steps to reproduce the problem: 1. Open a page launching a worker that makes console.log calls when the browser's devtools are closed 2. Open devtools What is the expected behavior? See one copy of the messages logged, e.g.: 1543334965526 worker loaded 1543334965527 worker started 1543334965528: From worker: 0.7348785894743377 random 0.8185893729517724 What went wrong? I see two copies of the messages logged, but only the ones from the worker: 1543335007794 worker loaded 1543335007794 worker started 1543335007794 worker loaded 1543335007794 worker started 1543335007794: From worker: 0.30979388032047006 random 0.9249988190290734 As far as I can tell, the code only actually runs once, I think this is a console problem. Did this work before? Yes Somewhere in the high 60s, don't know for sure Chrome version: 70.0.3538.110 Channel: stable OS Version: 10 Flash Version: You can also use this plunker to replicate it: https://plnkr.co/edit/QWhoQS8hmw5bdXqJ3v4z?p=preview The key is to have devtools closed when loading the page, *then* open devtools to see the messages.
,
Nov 27
Bisected to r404993 = 63fe38c1e6d9eeefd9036f431456c8a359424fa3 = https://crrev.com/2141673002 by dgozman@chromium.org "[DevTools] Always send a copy of worker message through the page." Landed in 54.0.2795.0
,
Nov 27
,
Nov 28
Able to reproduce the issue on the reported chrome version #70.0.3538.110, latest chrome #72.0.3623.0 using Windows 10, Ubuntu 17.10 and Mac 10.13.6 by following the steps as per comment#0. The behavior is observed from old M-60 builds(#60.0.3112.113). This is a non-regression issue hence marking it as untraiged and requesting someone from the dev team to look into the issue. Thanks.!
,
Nov 28
Apologies for a minor editing error in `worker.js`; doesn't affect replicating the issue, it's just a misleading log statement. Here's the corrected version FWIW.
,
Nov 28
Thanks for the bisect!
,
Nov 29
++ As per comment#4.
,
Dec 4
,
Dec 7
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e41224229e7a61deb59a2a5d7bf5175cc56bf14c commit e41224229e7a61deb59a2a5d7bf5175cc56bf14c Author: Dmitry Gozman <dgozman@chromium.org> Date: Fri Dec 07 04:46:27 2018 [DevTools] Do not report worker console messages twice When the worker is still alive while DevTools is being opened, there is a race between console messages coming from page and worker target creation. Bug: 908863 Change-Id: I9495d4becada0e4f2bd208c0922b2a2a3ea98af9 Reviewed-on: https://chromium-review.googlesource.com/c/1359039 Reviewed-by: Joel Einbinder <einbinder@chromium.org> Commit-Queue: Dmitry Gozman <dgozman@chromium.org> Cr-Commit-Position: refs/heads/master@{#614609} [modify] https://crrev.com/e41224229e7a61deb59a2a5d7bf5175cc56bf14c/third_party/blink/renderer/devtools/front_end/browser_sdk/LogManager.js [modify] https://crrev.com/e41224229e7a61deb59a2a5d7bf5175cc56bf14c/third_party/blink/renderer/devtools/front_end/sdk/ConsoleModel.js
,
Dec 7
,
Dec 10
Able to reproduce the issue on reported chrome version# 70.0.3538.110 using Windows 10, Ubuntu 17.10 and Mac 10.13.6 by following steps as per comment#0. Verified the fix on Mac 10.13.6, Windows 10 and Ubuntu 17.10 as per comment#0 on latest chrome version #73.0.3636.0. Attaching screenshot for reference. Observed that the console message does not repeat twice. Hence, the fix is working as expected. Adding the verified labels. Thanks...!! |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by t...@crowder.org
, Nov 27