Uncaught TypeError in CSS Class Code Hint extension #6439

redmunds opened this Issue Jan 9, 2014 · 4 comments


None yet
3 participants

redmunds commented Jan 9, 2014

I have the Brackets CSS Class Code Hint extension installed.
My current project is brackets/src.
Every 20 seconds, I get these messages in console:

Uncaught TypeError: Cannot read property '1' of null StyleRuleCache.js:123
Detect updates: /Users/randyedmunds/github/brackets/src/thirdparty/CodeMirror2/theme/solarized.css CSSCache.js:92
Detect updates: /Users/randyedmunds/github/brackets/src/thirdparty/smart-auto-complete-local/spec/framework/jasmine-1.0.1/jasmine.css CSSCache.js:92
Detect updates: /Users/randyedmunds/github/brackets/src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/themes/base/jquery.ui.menu.css CSSCache.js:92

I have not modified any of these files.
I suspect that this is related to the "file has been modified on disk" issue introduced with File Watchers because this just started happening recently.

I am currently on Mac. I haven't tried it on Windows.


peterflynn commented Jan 9, 2014

That extension doesn't listen for filesystem events. It just uses setInterval to check timestamps manually every 20 seconds. It's reading private fields off the File object (fields which it doesn't seem aware might be null btw) -- seems like asking for trouble.

@redmunds since you have it up and running, do you want to add a log statement or breakpoint in CSSCache where it prints "Detect updates" to see what's going on? I suspect there's just a bug in the extension somewhere...


redmunds commented Jan 9, 2014

I need to review this PreferencesModel code, so I just removed it for now. If you have a link to a document explaining the best practice way for them to listen to files, I'll open a bug on that repo.

redmunds was assigned Jan 13, 2014


dangoor commented Jan 13, 2014

@peterflynn A document on the best practices and how to use file watching in general would be really useful

low priority to @redmunds to just file a bug with the extension author with a link


redmunds commented Apr 15, 2014

I posted this message to the repo of the extension. Closing.

redmunds closed this Apr 15, 2014

redmunds referenced this issue in ucym/Brackets-CSS-Class-Code-hint Apr 15, 2014


Error occurs when Link elements with reference to the external URL #15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment