The default bug view has changed. See this FAQ.

"Style sheet could not be loaded" error in Style Editor

RESOLVED FIXED in Firefox 53

Status

()

Firefox
Developer Tools: Style Editor
P1
normal
RESOLVED FIXED
3 months ago
16 days ago

People

(Reporter: el8, Assigned: jdescottes)

Tracking

50 Branch
Firefox 53
x86
Windows Vista
Points:
---

Firefox Tracking Flags

(firefox53 fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Reporter)

Description

3 months ago
User Agent: Mozilla/5.0 (Windows NT 6.0; rv:50.0) Gecko/20100101 Firefox/50.0
Build ID: 20161208153507

Steps to reproduce:

1. Open http://blahtherapy.com/
2. Open Style Editor
3. The "Style sheet could not be loaded. http://blahtherapy.com/wp-content/cache/autoptimize/autoptimize_008433b6df70039fc9ea6308ed79872c.php" error is displayed. The corresponding stylesheet isn't in the style sheet pane, but is in fact applied to the page.
(Reporter)

Updated

3 months ago
Component: Untriaged → Developer Tools: Style Editor
(Reporter)

Updated

3 months ago
OS: Unspecified → Windows Vista
Hardware: Unspecified → x86
Confirmed using the STR provided in comment 0.

The error isn't shown in the browser console, but after investigating for a while, I did track it down.
It happens in \devtools\shared\inspector\css-logic.js, in the prettifyCSS function on this line: http://searchfox.org/mozilla-central/rev/f680e72cc6579f90b992b63ca14d923d2afea612/devtools/shared/inspector/css-logic.js#287

For some reason, the stylesheet http://blahtherapy.com/wp-content/cache/autoptimize/autoptimize_008433b6df70039fc9ea6308ed79872c.php causes this part of the code to have indentLevel be negative. And that fails because we're using the TAB_CHARS.repeat() function which expects its argument to be a positive number.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Inspector bug triage, filter on CLIMBING SHOES.

This bug has clear STRs and should be fixed.
The faulty CSS contains an extra closing } after the "#footer-widget-area div.item-options" selector.

This can be reproduced with the following minimal test stylesheet :

> body{margin: 0}} div{color:red}
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Priority: -- → P1
Comment hidden (mozreview-request)

Comment 4

2 months ago
mozreview-review
Comment on attachment 8825529 [details]
Bug 1323713 - fix prettify CSS error when encountering extra closing brace;

https://reviewboard.mozilla.org/r/103652/#review104314

Thanks.  This looks good.
Attachment #8825529 - Flags: review?(ttromey) → review+
(Assignee)

Comment 5

2 months ago
mozreview-review-reply
Comment on attachment 8825529 [details]
Bug 1323713 - fix prettify CSS error when encountering extra closing brace;

https://reviewboard.mozilla.org/r/103652/#review104314

Thanks! Try https://treeherder.mozilla.org/#/jobs?repo=try&revision=734821d75f30cabf551a581a406e13fc456c67a5 looks ok except for the usual intermittents we have on devtools these days... Landing.

Comment 6

2 months ago
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d76704f625c7
fix prettify CSS error when encountering extra closing brace;r=tromey

Comment 7

2 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/d76704f625c7
Status: ASSIGNED → RESOLVED
Last Resolved: 2 months ago
status-firefox53: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 53

Comment 8

20 days ago
I have reproduced this bug with Nightly 53.0a1(2016-12-15) on Windows 10, 64 bit!

The Bug's fix is verified on Latest Aurora 53.0a2.

Build ID 	20170302004002
User Agent 	Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:53.0) Gecko/20100101 Firefox/53.0

[testday-20170303]

Comment 9

20 days ago
I have reproduced this bug with Nightly 53.0a1 (2016-12-08) (64-bit) on Ubuntu 16.10, 64 bit!

The Bug's fix is verified on Latest Aurora!

Build ID 	20170303084134
User Agent 	Mozilla/5.0 (X11; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0

[testday-20170303]
QA Whiteboard: [good first verify]
You need to log in before you can comment on or make changes to this bug.