New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 681492 link

Starred by 14 users

Issue metadata

Status: Fixed
Owner:
Last visit 29 days ago
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Dev tools showing blank styles

Reported by rich...@refinedwiki.com, Jan 16 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36

Steps to reproduce the problem:
1. Access https://refinedtheme.atlassian.net/wiki/
2. Open the Inspector
3. Reload the page

What is the expected behavior?
Styles are showing like when the inspector was first opened

What went wrong?
Styles aren't showing after the reload

Did this work before? Yes 55.0.2883.95

Chrome version: 57.0.2983.0  Channel: canary
OS Version: OS X 10.11.6
Flash Version: Shockwave Flash 24.0 r0

This is similar to this issue https://bugs.chromium.org/p/chromium/issues/detail?id=438266 but that is said to have been resolved. This problem is still around and I get the following stack trace from inspector.js:

TypeError: Cannot read property 'sourceURL' of null TypeError: Cannot read property 'sourceURL' of null
    at SDK.CSSStyleRule.SDK.CSSRule (inspector.js:3772)
    at SDK.CSSStyleRule (inspector.js:3782)
    at new SDK.CSSMatchedStyles (inspector.js:3464)
    at SDK.CSSModel.callback (inspector.js:3652)
    at callback (inspector.js:3111)
    at Protocol.InspectorBackend._AgentPrototype.dispatchResponse (inspector.js:3118)
    at SDK.Target._onMessage (inspector.js:3075)
    at SDK.MainConnection._dispatchMessage (inspector.js:3250)
    at Common.Object.dispatchEventToListeners (inspector.js:395)
    at innerDispatch (inspector.js:918)

It seems to be trying to fetch a styleSheetHeader that isn't available.

This bug does not happen in the stable version of Chrome.
 
before.png
237 KB View Download
after.png
192 KB View Download
Labels: Needs-Triage-M57
Components: -UI Platform>DevTools
 Issue 681759  has been merged into this issue.
The duplicate referenced in #c3 refers to Chrome 57.0.2979.0.
Labels: Needs-Feedback
Unable to reproduce the issue on 57.0.2983.0 and 57.0.2984.0.Could you please review the attached screen cast and let me know if its fine.
681492_Jan_17.mp4
1.0 MB View Download

Comment 6 Deleted

Comment 7 Deleted

I'm afraid I'm still experiencing it on 57.0.2984.0 canary. See my screengrab

Still the same stack trace as well if I inspect the devtools.
error.mp4
5.7 MB View Download

Comment 9 by caseq@chromium.org, Jan 17 2017

Cc: dgozman@chromium.org pfeldman@chromium.org
Labels: -Pri-2 -Needs-Feedback -OS-Mac -Needs-Triage-M57 OS-All Pri-1
Owner: lushnikov@chromium.org
Status: Assigned (was: Unconfirmed)
Reproduces on ToT (444100) for me.

Comment 10 Deleted

Cc: lushnikov@chromium.org
 Issue 675491  has been merged into this issue.
Status: Started (was: Assigned)
Project Member

Comment 13 by bugdroid1@chromium.org, Jan 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e612b6edf5092c860e19014c7aa700ee2ec7bbbe

commit e612b6edf5092c860e19014c7aa700ee2ec7bbbe
Author: lushnikov <lushnikov@chromium.org>
Date: Thu Jan 26 11:48:43 2017

DevTools: simplify CSS agent's setActiveStyleSheets method

First of all: below is a postmortem of the behavior, which happens in the bug.

The exception happens because one of the matched style rules refers
to the stylesheet which has never been reported to the front-end.

Stylesheets are reported by the CSS.setActiveStyleSheets method. Interestingly,
the CSS.setActiveStyleSheets method reports only a subset of stylesheets as "added".
For example, the method doesn't report those style sheets which
have already been "bound". Since getMatchedStylesForNode binds stylesheets while
building a response message, a race condition occurs.

-- END POSTMORTEM --

The whole logic of determining which stylesheets are added and removed was
introduced in https://codereview.chromium.org/14320027. Back in the days,
the bound stylesheets were (incorrectly) used as a source of "reported" stylesheets.
Nowadays, thanks to the m_documentToCSSStyleSheets, we have relevant
information of reported stylesheets.

This patch removes all the tricks around reporting stylesheets to the front-end, since
they are not needed any more.

BUG= 681492 
R=dgozman

Review-Url: https://codereview.chromium.org/2653643005
Cr-Commit-Position: refs/heads/master@{#446303}

[modify] https://crrev.com/e612b6edf5092c860e19014c7aa700ee2ec7bbbe/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
[modify] https://crrev.com/e612b6edf5092c860e19014c7aa700ee2ec7bbbe/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.h

Status: Fixed (was: Started)
Cc: l...@chromium.org brajkumar@chromium.org
 Issue 691950  has been merged into this issue.
Labels: Merge-Request-57
Status: Started (was: Fixed)
This has to be merged to 57
Project Member

Comment 17 by sheriffbot@chromium.org, Feb 16 2017

Labels: -Merge-Request-57 Hotlist-Merge-Approved Merge-Approved-57
Your change meets the bar and is auto-approved for M57. Please go ahead and merge the CL to branch 2987 manually. Please contact milestone owner if you have questions.
Owners: amineer@(clank), cmasso@(bling), ketakid@(cros), govind@(desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Please merge your change to M57 branch 2987 before 5:00 PM PT Friday (02/17), so we can pick it up for next week Beta release. Thank you.
Project Member

Comment 19 by bugdroid1@chromium.org, Feb 16 2017

Labels: -merge-approved-57 merge-merged-2987
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5a5252aba63f3f5a26e2261ede9fa5dc252a6a8f

commit 5a5252aba63f3f5a26e2261ede9fa5dc252a6a8f
Author: Andrey Lushnikov <lushnikov@chromium.org>
Date: Thu Feb 16 22:56:22 2017

DevTools: simplify CSS agent's setActiveStyleSheets method

First of all: below is a postmortem of the behavior, which happens in the bug.

The exception happens because one of the matched style rules refers
to the stylesheet which has never been reported to the front-end.

Stylesheets are reported by the CSS.setActiveStyleSheets method. Interestingly,
the CSS.setActiveStyleSheets method reports only a subset of stylesheets as "added".
For example, the method doesn't report those style sheets which
have already been "bound". Since getMatchedStylesForNode binds stylesheets while
building a response message, a race condition occurs.

-- END POSTMORTEM --

The whole logic of determining which stylesheets are added and removed was
introduced in https://codereview.chromium.org/14320027. Back in the days,
the bound stylesheets were (incorrectly) used as a source of "reported" stylesheets.
Nowadays, thanks to the m_documentToCSSStyleSheets, we have relevant
information of reported stylesheets.

This patch removes all the tricks around reporting stylesheets to the front-end, since
they are not needed any more.

BUG= 681492 
R=dgozman

Review-Url: https://codereview.chromium.org/2653643005
Cr-Commit-Position: refs/heads/master@{#446303}
(cherry picked from commit e612b6edf5092c860e19014c7aa700ee2ec7bbbe)

Review-Url: https://codereview.chromium.org/2703473004 .
Cr-Commit-Position: refs/branch-heads/2987@{#565}
Cr-Branched-From: ad51088c0e8776e8dcd963dbe752c4035ba6dab6-refs/heads/master@{#444943}

[modify] https://crrev.com/5a5252aba63f3f5a26e2261ede9fa5dc252a6a8f/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
[modify] https://crrev.com/5a5252aba63f3f5a26e2261ede9fa5dc252a6a8f/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.h

Project Member

Comment 20 by bugdroid1@chromium.org, Feb 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5ac15460e9aab7b68f858f911b2e4ced8e0aadaa

commit 5ac15460e9aab7b68f858f911b2e4ced8e0aadaa
Author: lushnikov <lushnikov@chromium.org>
Date: Sat Feb 18 04:10:30 2017

DevTools: run user callback inside promise for promisified domains

This patch runs userCallback inside a promise. This results in errors
not being swallowed, and the promise to always resolve/reject but never
to get stuck.

As a result, the StylesSidebarPane will not die permanently
once an error happens during handling the protocol response.

BUG= 681492 
R=pfeldman

Review-Url: https://codereview.chromium.org/2701763002
Cr-Commit-Position: refs/heads/master@{#451416}

[modify] https://crrev.com/5ac15460e9aab7b68f858f911b2e4ced8e0aadaa/third_party/WebKit/LayoutTests/inspector/inspector-backend-commands-expected.txt
[modify] https://crrev.com/5ac15460e9aab7b68f858f911b2e4ced8e0aadaa/third_party/WebKit/Source/devtools/front_end/protocol/InspectorBackend.js

Status: Fixed (was: Started)
 Issue 690715  has been merged into this issue.
Labels: TE-Verified-57.0.2983.0 TE-Verified-M57
Verified this issue on Ubuntu 14.04, Windows-10 and Mac OS 10.12 using chrome latest Beta M57-57.0.2983.0 by following steps mentioned in the original comment. Observed the styles content are displayed as expected while reloading the page "https://refinedtheme.atlassian.net/wiki/" as expected. Hence adding TE-Verified label.

Thanks!
681492.jpg
291 KB View Download
 Issue 696452  has been merged into this issue.
 Issue 695147  has been merged into this issue.

Sign in to add a comment