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

Uncaught TypeError: styleSheet.cssRules[Symbol.iterator] is not a function #618

Closed
Gorgulho opened this issue Jun 20, 2017 · 14 comments
Closed
Labels
bug Confirmed defect in package logic, deprecation notices, and PRs which fix them.

Comments

@Gorgulho
Copy link

I have update the package yesterday, and always I open the atom this error apears:

captura de ecra de 2017-06-20 14-31-03

what can I do?

@Alhadis
Copy link
Member

Alhadis commented Jun 20, 2017

What version of Atom are you running, and what operating system are you using?

@Alhadis
Copy link
Member

Alhadis commented Jun 20, 2017

Also, are you SURE you're using the latest version of file-icons? It should be 2.1.7.

@Gorgulho
Copy link
Author

Gorgulho commented Jun 20, 2017

atom version: 0.181.0
captura de ecra de 2017-06-20 14-35-28

@Alhadis
Copy link
Member

Alhadis commented Jun 20, 2017

Do you mean Atom v1.18 ...? An Atom version of 0.181.0 is impossible.

You also haven't told us your operating system...

@Gorgulho
Copy link
Author

the atom version I have seen wrong, is the version 1.11.2, I will update right now

@Gorgulho
Copy link
Author

And my operating system is Fedora 22

@Alhadis
Copy link
Member

Alhadis commented Jun 20, 2017

Do you have automatic updates turned off? You should really be keeping them enabled, because your Atom version hasn't been updated in 8 months...

Another user reported the same issue in March, and they were running an even older version of Atom. I'm wondering if I shouldn't just crank the minimum required Atom version to something more recent...

@Gorgulho
Copy link
Author

This atom is from pc from my office, I don't know if the updates are turn on or off, but I don't find nothing like that on atom. do you know where is that option?

@Alhadis
Copy link
Member

Alhadis commented Jun 20, 2017

In the main settings panel, you should see a preference called Automatically update:

Figure 1

@Gorgulho
Copy link
Author

That option are already selected, but the atom never show the updates

captura de ecra de 2017-06-20 14-59-29

@Alhadis
Copy link
Member

Alhadis commented Jun 20, 2017

Are you still seeing this error after installing Atom v1.18?

@Gorgulho
Copy link
Author

I can't update the atom, I don't know why

@Alhadis
Copy link
Member

Alhadis commented Jun 20, 2017

Try doing a fresh install using the latest version from atom.io. If you're trying to update from inside Atom, it's probably going to fail for the same reasons why its automatic updates are failing.

@Alhadis Alhadis added not-enough-info Reporter was asked to provide more detail. Issues without response are subject to closing. unconfirmed-bug Unreproducible error observed by user, or an unclear bug requiring further investigation. inconclusive Issue closed due to unresponsive reporter, insufficient information, or flaky "phantom" issues. labels Oct 15, 2018
@Alhadis
Copy link
Member

Alhadis commented Oct 15, 2018

Finally got to the bottom of this. Gonna post my research here for posterity's sake...

After installing Atom v1.11.2 on a virtual machine, I inspected document.styleSheets[0].cssRules in the devtools, and noticed Symbol.iterator was missing from its prototype.

Now, that particular version of Atom ran Chrome 49, and iterator support in DOM interfaces didn't land until Chrome 51. Meaning that array-like DOM objects (e.g., NodeList, CSSRuleList, etc) couldn't be iterated over like an ordinary array. I'd forgotten this when I was writing the CSSOM manipulation code.

for(let i of document.styleSheets[0].cssRules); // <= Chrome 50: Breaks
for(let i of document.styleSheets[0].cssRules); // >= Chrome 51: Works

@Alhadis Alhadis added bug Confirmed defect in package logic, deprecation notices, and PRs which fix them. and removed inconclusive Issue closed due to unresponsive reporter, insufficient information, or flaky "phantom" issues. not-enough-info Reporter was asked to provide more detail. Issues without response are subject to closing. unconfirmed-bug Unreproducible error observed by user, or an unclear bug requiring further investigation. labels Oct 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed defect in package logic, deprecation notices, and PRs which fix them.
Projects
None yet
Development

No branches or pull requests

2 participants