Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'Symbol(Symbol.iterator)' of undefined #347

Closed
minj opened this issue Nov 26, 2015 · 5 comments
Closed

Cannot read property 'Symbol(Symbol.iterator)' of undefined #347

minj opened this issue Nov 26, 2015 · 5 comments
Assignees

Comments

@minj
Copy link

minj commented Nov 26, 2015

Split from #217

Add-ons Validator (JS Edition) v0.0.7
npm v3.4.0
node v5.1.0

TypeError: Cannot read property 'Symbol(Symbol.iterator)' of undefined
    at Object.detectBadMozBindingURL (/usr/lib/node_modules/addons-validator/dist/webpack:/src/rules/css/detectBadMozBinding.js:8:50)
    at CSSScanner.processCode (/usr/lib/node_modules/addons-validator/dist/webpack:/src/scanners/css.js:46:28)
    at /usr/lib/node_modules/addons-validator/dist/webpack:/src/scanners/css.js:63:22
    at run (/usr/lib/node_modules/addons-validator/dist/webpack:/~/babel-core/~/core-js/modules/es6.promise.js:104:1)
    at /usr/lib/node_modules/addons-validator/dist/webpack:/~/babel-core/~/core-js/modules/es6.promise.js:115:1
    at flush (/usr/lib/node_modules/addons-validator/dist/webpack:/~/babel-core/~/core-js/modules/$.microtask.js:19:1)
    at doNTCallback0 (node.js:430:9)
    at process._tickCallback (node.js:359:13)

I only get this with foxtrick which is 5MB :/

I do have a few mini add-ons with a similar structure for testing various things but they don't produce this error.

@muffinresearch
Copy link
Contributor

Great - thanks for the report! We'll take a look and see if we can figure out what we're choking on.

@muffinresearch
Copy link
Contributor

Ok the fix has landed. This will be in the next release which I expect should be tomorrow.

@minj
Copy link
Author

minj commented Nov 30, 2015

@muffinresearch I can confirm that the fix prevents the exception. It was probably an exception caused by broken CSS. I've just fixed a couple of such problems thanks to the validator. 👍

Our CSS is not in the best of condition, I confess. Regardless, the CSS parser incorrectly throws CSS_SYNTAX_ERROR on CSS like this:

#box /*.main{float:left;*/{width:auto !important;}

Seems you are looking too deeply into comments ;)

Obviously, this renders fine in browsers

@muffinresearch
Copy link
Contributor

Yep I saw that - it's a separate bug that needs looking at - I think it might be a bug in the parser we're using becuase we already skip comments. I think that's being parsed as one rule for some reason - it might be because the comment is after the selector but before the {. I'll file a separate issue.

@minj
Copy link
Author

minj commented Nov 30, 2015

#box /*.main{float:left;}*/{width:auto !important;}

works fine, the key problem is unmatched braces

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants