Settings-view: Uncaught TypeError: packages[Symbol.iterator] is not a function

Created on 23 Jun 2017  路  10Comments  路  Source: atom/settings-view

[Enter steps to reproduce:]

  1. Open Settings tab
  2. Click Install tab

Atom: 1.18.0 x64
Electron: 1.3.15
OS: Mac OS X 10.12.5
Thrown From: settings-view package 0.249.4

Stack Trace

Uncaught TypeError: packages[Symbol.iterator] is not a function

At /Applications/Atom.app/Contents/Resources/app/node_modules/settings-view/lib/install-panel.js:390

TypeError: packages[Symbol.iterator] is not a function
    at InstallPanel.addPackageViews (/Applications/Atom.app/Contents/Resources/app/node_modules/settings-view/lib/install-panel.js:390:30)
    at /Applications/Atom.app/Contents/Resources/app/node_modules/settings-view/lib/install-panel.js:461:26
    at /Applications/Atom.app/Contents/Resources/app/node_modules/settings-view/lib/atom-io-client.js:68:26
    at AtomIoClient.module.exports.AtomIoClient.fetchFromCache (/Applications/Atom.app/Contents/Resources/app/node_modules/settings-view/lib/atom-io-client.js:160:22)
    at AtomIoClient.module.exports.AtomIoClient.featuredPackages (/Applications/Atom.app/Contents/Resources/app/node_modules/settings-view/lib/atom-io-client.js:65:25)
    at InstallPanel.loadFeaturedPackages (/Applications/Atom.app/Contents/Resources/app/node_modules/settings-view/lib/install-panel.js:455:27)
    at new InstallPanel (/Applications/Atom.app/Contents/Resources/app/node_modules/settings-view/lib/install-panel.js:128:16)
    at /Applications/Atom.app/Contents/Resources/app/node_modules/settings-view/lib/settings-view.js:237:22
    at SettingsView.getOrCreatePanel (/Applications/Atom.app/Contents/Resources/app/node_modules/settings-view/lib/settings-view.js:361:25)
    at SettingsView.showPanel (/Applications/Atom.app/Contents/Resources/app/node_modules/settings-view/lib/settings-view.js:419:30)
    at HTMLDivElement.clickHandler (/Applications/Atom.app/Contents/Resources/app/node_modules/settings-view/lib/settings-view.js:186:24)

Commands

     -1:19.9.0 editor:consolidate-selections (input.hidden-input)
     -1:19.9.0 core:cancel (input.hidden-input)
     -0:46.8.0 core:backspace (input.hidden-input)
     -0:45.9.0 fuzzy-finder:toggle-file-finder (input.hidden-input)
     -0:41 editor:delete-to-beginning-of-line (input.hidden-input)
     -0:39.2.0 editor:consolidate-selections (input.hidden-input)
     -0:39.2.0 core:cancel (input.hidden-input)
  3x -0:38.8.0 key-binding-resolver:toggle (input.hidden-input)
     -0:26.2.0 settings-view:open (input.hidden-input)

Non-Core Packages


bug uncaught-exception triaged d 猬囷笍 i 猬囷笍 v 猬囷笍

Most helpful comment

It happend when I installed Atom under Ubuntu on Windows Subsystem for Linux (WSL). Actually, the ~/.atom/package is empty, no files there.
I removed it once and reinstalled it, then it occurred again.

All 10 comments

Same here

[Enter steps to reproduce:]

  1. Open Settings tab
  2. Click Install tab

Atom: 1.18.0 x64
Electron: 1.3.15
OS: KDE neon
Thrown From: settings-view package 0.249.4

Stack Trace

Uncaught TypeError: packages[Symbol.iterator] is not a function

At /usr/share/atom/resources/app/node_modules/settings-view/lib/install-panel.js:390

TypeError: packages[Symbol.iterator] is not a function
    at InstallPanel.addPackageViews (/usr/share/atom/resources/app/node_modules/settings-view/lib/install-panel.js:390:30)
    at /usr/share/atom/resources/app/node_modules/settings-view/lib/install-panel.js:451:26
    at /usr/share/atom/resources/app/node_modules/settings-view/lib/atom-io-client.js:80:26
    at AtomIoClient.module.exports.AtomIoClient.fetchFromCache (/usr/share/atom/resources/app/node_modules/settings-view/lib/atom-io-client.js:160:22)
    at AtomIoClient.module.exports.AtomIoClient.featuredThemes (/usr/share/atom/resources/app/node_modules/settings-view/lib/atom-io-client.js:77:25)
    at InstallPanel.loadFeaturedPackages (/usr/share/atom/resources/app/node_modules/settings-view/lib/install-panel.js:445:27)
    at InstallPanel.setSearchType (/usr/share/atom/resources/app/node_modules/settings-view/lib/install-panel.js:240:20)
    at InstallPanel.didClickSearchThemesButton (/usr/share/atom/resources/app/node_modules/settings-view/lib/install-panel.js:485:20)

Commands

     -2:07.8.0 settings-view:open (input.hidden-input)
  2x -0:50 core:move-up (input.hidden-input)
     -0:49.4.0 editor:move-to-end-of-screen-line (input.hidden-input)
     -0:47.6.0 editor:newline (input.hidden-input)
     -0:37.1.0 core:backspace (input.hidden-input)
     -0:35.5.0 intentions:highlight (input.hidden-input)
     -0:35.4.0 core:save (input.hidden-input)
     -0:33.4.0 editor:newline (input.hidden-input)
     -0:31.8.0 core:move-up (input.hidden-input)
  2x -0:31.4.0 core:move-left (input.hidden-input)
     -0:30.6.0 core:move-down (input.hidden-input)
     -0:30.4.0 core:move-right (input.hidden-input)
     -0:29.7.0 core:move-up (input.hidden-input)
     -0:29.4.0 editor:move-to-end-of-screen-line (input.hidden-input)
     -0:29 editor:newline (input.hidden-input)
  3x -0:26.7.0 core:backspace (input.hidden-input)

Non-Core Packages

atom-beautify 0.30.3 
atom-clock 0.1.12 
atom-jade 0.3.0 
atom-live-server 2.1.2 
atom-ternjs 0.18.3 
busy-signal 1.4.3 
color-picker 2.2.5 
emmet 2.4.3 
file-icons 2.1.8 
firacode 0.3.0 
intentions 1.1.2 
jade-autocompile 0.8.5 
linter 2.2.0 
linter-jshint 3.1.5 
linter-ui-default 1.6.2 
minimap 4.28.2 
pigments 0.39.1 
platformio-ide-terminal 2.5.1 
sass-autocompile 0.13.3 
split-diff 1.4.3 

Well, I've figured out what causes this error to occur, but I don't know how/why it's occurring.

If packages is an empty object {} here this error will be thrown.

I haven't been able to reproduce this within Atom though, just by fiddling around with the dev tools trying to get the error message to be the same.

It happend when I installed Atom under Ubuntu on Windows Subsystem for Linux (WSL). Actually, the ~/.atom/package is empty, no files there.
I removed it once and reinstalled it, then it occurred again.

Here I mean, Atom was installed on WSL (i.e. Linux) side, not on Windows side.

+1 on repro when installing Atom inside Bash on Windows (WSL)

Reproduced.

  1. Open dev tools
  2. Navigate to the Network tab
  3. Enable the "Offline" option
  4. Navigate to the Application tab
  5. Under Local Storage -> file:// (left-hand side), find and delete the settings-view:packages/featured key (the list may take a while to populate)
  6. Trigger the settings-view:install-packages-and-themes command

Expected: Settings View to display a warning stating that featured packages could not be fetched
Actual: See above error

This is due to https://github.com/atom/settings-view/blob/f39fe4477b84b6550191731108803de1e4d73efd/lib/atom-io-client.coffee#L109-L112

The comment is very ironic as passing null instead would avoid this exception. I believe that line is there because normal packages expect objects, but the featured packages/themes expects an _array_ of objects.

I am able to reproduce this bug

Uncaught TypeError: t is not iterable
C:UsersAdamAppDataLocalatomapp-1.34.0resourcesappstatic:14
Show Stack Trace
This is likely a bug in Atom. This issue has already been reported.Uncaught TypeError: t is not iterable
C:UsersAdamAppDataLocalatomapp-1.34.0resourcesappstatic:14
Show Stack Trace
This is likely a bug in Atom. This issue has already been reported.

why does this error comes?

Was this page helpful?
0 / 5 - 0 ratings