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: body.filter is not a function #1052

Closed
ghost opened this issue Mar 18, 2018 · 42 comments
Closed

Uncaught TypeError: body.filter is not a function #1052

ghost opened this issue Mar 18, 2018 · 42 comments
Assignees

Comments

@ghost
Copy link

@ghost ghost commented Mar 18, 2018

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.25.0 x64
Electron: 1.7.11
OS: Unknown Windows version
Thrown From: settings-view package 0.254.1

Stack Trace

Uncaught TypeError: body.filter is not a function

At D:\ProgramDevTools\Atom x64\resources\app\node_modules\settings-view\lib\atom-io-client.js:305

TypeError: body.filter is not a function
    at Request._callback (D:/ProgramDevTools/Atom x64/resources/app/node_modules/settings-view/lib/atom-io-client.js:305:39)
    at Request.self.callback (/app.asar/node_modules/settings-view/node_modules/request/request.js:186:22)
    at emitTwo (events.js:106:13)
    at Request.emit (events.js:194:7)
    at /app.asar/node_modules/settings-view/node_modules/request/request.js:1163:10)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:191:7)
    at /app.asar/node_modules/settings-view/node_modules/request/request.js:1085:12)
    at Object.onceWrapper (events.js:293:19)
    at emitNone (events.js:91:20)
    at Gunzip.emit (events.js:188:7)
    at endReadableNT (_stream_readable.js:975:12)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)

Commands

  2x -4:37.1.0 core:paste (span.syntax--text.syntax--plain.syntax--null-grammar)
     -1:54.7.0 core:backspace (input.hidden-input)
     -0:43.9.0 command-palette:toggle (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
     -0:25.1.0 github:toggle-git-tab (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
     -0:13.1.0 github:toggle-github-tab (div.github-Panel.is-empty)

Non-Core Packages

linter-gcc 0.7.1 
@rsese
Copy link
Member

@rsese rsese commented Mar 19, 2018

Thanks for the report! Can you confirm a few things for us?

  • what were you doing at the time of the error?
  • is the error is reproducible?
  • if reproducible, do you see the error in safe mode (atom --safe)?
@Saidbek
Copy link

@Saidbek Saidbek commented Apr 24, 2018

any progress here? having the same error while trying to install a package Atom 1.26.0, Mac OS HS

@paladinic
Copy link

@paladinic paladinic commented Apr 24, 2018

Same here. Happened after:

  1. Setting to default
  2. Installing "color-picker"
  3. Installing "webbox-color"
  4. Uninstall "webbox-color" (because deprecated)
  5. Now receiving "TypeError" when searching anything in "Install"
@quancore

This comment was marked as spam.

@svalgaard
Copy link

@svalgaard svalgaard commented Apr 24, 2018

Hi
I have the same error on my Mac

[Enter steps to reproduce:]

  1. Go to "install packages"
  2. Search for any package
  3. The error message appars

The error also appears after a restart.
Using /Applications/Atom.app/Contents/MacOS/Atom --safe does not help

Atom: 1.26.0 x64
Electron: 1.7.11
OS: Mac OS X 10.13.4
Thrown From: settings-view package 0.254.2

Stack Trace

Uncaught TypeError: body.filter is not a function

At /Applications/Atom.app/Contents/Resources/app/node_modules/settings-view/lib/atom-io-client.js:305

TypeError: body.filter is not a function
    at Request._callback (/Applications/Atom.app/Contents/Resources/app/node_modules/settings-view/lib/atom-io-client.js:305:39)
    at Request.self.callback (/app.asar/node_modules/settings-view/node_modules/request/request.js:186:22)
    at emitTwo (events.js:106:13)
    at Request.emit (events.js:194:7)
    at /app.asar/node_modules/settings-view/node_modules/request/request.js:1163:10)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:191:7)
    at /app.asar/node_modules/settings-view/node_modules/request/request.js:1085:12)
    at Object.onceWrapper (events.js:293:19)
    at emitNone (events.js:91:20)
    at Gunzip.emit (events.js:188:7)
    at endReadableNT (_stream_readable.js:975:12)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)

Commands

  3x -1:38.3.0 core:backspace (input.hidden-input)
  2x -1:36.1.0 core:confirm (input.hidden-input)

Non-Core Packages


@jjmax75
Copy link

@jjmax75 jjmax75 commented Apr 24, 2018

Happens when I try searching for a package to install

/Applications/Atom.app/Contents/Resources/app/node_modules/settings-view/lib/atom-io-client.js:305
Hide Stack Trace
TypeError: body.filter is not a function
    at Request._callback (/Applications/Atom.app/Contents/Resources/app/node_modules/settings-view/lib/atom-io-client.js:305:39)
    at Request.self.callback (/Users/john/.atom/packages/atom-beautify/node_modules/request/request.js:186:22)
    at emitTwo (events.js:106:13)
    at Request.emit (events.js:194:7)
    at Request.<anonymous> (/Users/john/.atom/packages/atom-beautify/node_modules/request/request.js:1163:10)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:191:7)
    at Gunzip.<anonymous> (/Users/john/.atom/packages/atom-beautify/node_modules/request/request.js:1085:12)
    at Object.onceWrapper (events.js:293:19)
    at emitNone (events.js:91:20)
    at Gunzip.emit (events.js:188:7)
    at endReadableNT (_stream_readable.js:975:12)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)

and

The error was thrown from the atom-beautify package. You can help by creating an issue. Please explain what actions triggered this error.
@Kimer0
Copy link

@Kimer0 Kimer0 commented Apr 24, 2018

Today same problem here :(

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.26.0 x64
Electron: 1.7.11
OS: Mac OS X 10.11.6
Thrown From: settings-view package 0.254.2

Stack Trace

Uncaught TypeError: body.filter is not a function

At /Applications/Atom.app/Contents/Resources/app/node_modules/settings-view/lib/atom-io-client.js:305

TypeError: body.filter is not a function
    at Request._callback (/Applications/Atom.app/Contents/Resources/app/node_modules/settings-view/lib/atom-io-client.js:305:39)
    at Request.self.callback (/app.asar/node_modules/settings-view/node_modules/request/request.js:186:22)
    at emitTwo (events.js:106:13)
    at Request.emit (events.js:194:7)
    at /app.asar/node_modules/settings-view/node_modules/request/request.js:1163:10)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:191:7)
    at /app.asar/node_modules/settings-view/node_modules/request/request.js:1085:12)
    at Object.onceWrapper (events.js:293:19)
    at emitNone (events.js:91:20)
    at Gunzip.emit (events.js:188:7)
    at endReadableNT (_stream_readable.js:975:12)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)

Commands

     -0:27.5.0 core:paste (input.hidden-input)
     -0:26.6.0 core:undo (input.hidden-input)

Non-Core Packages

atom-beautify 0.32.2 
emmet 2.4.3 
file-icons 2.1.18 
minimap 4.29.8 
pigments 0.40.2 
@huangzheng2016
Copy link

@huangzheng2016 huangzheng2016 commented Apr 24, 2018

Error
[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.26.0 x64
Electron: 1.7.11
OS: Unknown Windows version
Thrown From: settings-view package 0.254.2

Stack Trace

Uncaught TypeError: body.filter is not a function

At C:\Users\hz2016\AppData\Local\atom\app-1.26.0\resources\app\node_modules\settings-view\lib\atom-io-client.js:305

TypeError: body.filter is not a function
    at Request._callback (~/AppData/Local/atom/app-1.26.0/resources/app/node_modules/settings-view/lib/atom-io-client.js:305:39)
    at Request.self.callback (/app.asar/node_modules/settings-view/node_modules/request/request.js:186:22)
    at emitTwo (events.js:106:13)
    at Request.emit (events.js:194:7)
    at /app.asar/node_modules/settings-view/node_modules/request/request.js:1163:10)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:191:7)
    at /app.asar/node_modules/settings-view/node_modules/request/request.js:1085:12)
    at Object.onceWrapper (events.js:293:19)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:188:7)
    at endReadableNT (_stream_readable.js:975:12)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)

Commands

  7x -1:39.3.0 core:backspace (input.hidden-input)
     -0:53.9.0 core:paste (input.hidden-input)
     -0:53.4.0 core:select-all (input.hidden-input)
     -0:51.6.0 core:confirm (input.hidden-input)

Non-Core Packages

gpp-compiler 3.0.7 
intentions 1.1.5 
linter 2.2.0 
linter-gcc 0.7.1 
linter-ui-default 1.7.1 
platformio-ide-terminal 2.8.1 
simplified-chinese-menu 5.3.5 
tokamak-terminal 10.0.1 
@angristan
Copy link

@angristan angristan commented Apr 24, 2018

Just happened to me to 1.26.0, W10, 64 bits. Disabling the extensions I just installed did not fix the issue, nor did restarting Atom

@igotinfected
Copy link

@igotinfected igotinfected commented Apr 24, 2018

Same issue, I have a .md with markdown-preview-plus running.
Steps:

  • load atom, load .md file, load markdown preview
  • 'cmd + ,' to settings page
  • click on install or theme
  • enter text to look for package
  • error popup

running on macOS HS
restart did not fix

@bennettdams
Copy link

@bennettdams bennettdams commented Apr 24, 2018

Same issue when trying to install new packages (Atom 1.26.0).
Atom Beautify (0.32.2) is installed.
Windows 7 64 bit

@ano95
Copy link

@ano95 ano95 commented Apr 24, 2018

Related, #1058

@angristan
Copy link

@angristan angristan commented Apr 24, 2018

Fixed for me

@igotinfected
Copy link

@igotinfected igotinfected commented Apr 24, 2018

For me too.

@jjmax75
Copy link

@jjmax75 jjmax75 commented Apr 24, 2018

can confirm is working on my end too, serverside issue with package installs?

@bennettdams

This comment was marked as off-topic.

@rsese

This comment was marked as off-topic.

@angristan

This comment was marked as off-topic.

@svalgaard
Copy link

@svalgaard svalgaard commented May 1, 2018

Looking at the stack trace in my earlier comment it very much looks like an interim server error.

I would assume that the issue can be reproduced, if you could "mock" a reply from the relevant sever which does not contain the expected answer?

@aletundo
Copy link

@aletundo aletundo commented Jun 24, 2018

The fault was triggered by a bad response from the search API (eg. a 500 error).

@DSamuylov
Copy link

@DSamuylov DSamuylov commented Jun 30, 2018

The same issue on Ubuntu 18.04. After installation it works fine, then I try to find sublime theme in installer and get this message. Very said that I have to stop using it....

@jniewt
Copy link

@jniewt jniewt commented Aug 3, 2018

Happens to me with 1.28.1 and 1.29.0. Seems to correlate with package search returning 500 on https://atom.io/packages.

@jaysaurus
Copy link

@jaysaurus jaysaurus commented Aug 17, 2018

This problem started for me (on .deb install of 1.29.0 on ubuntu 16) after removing either node-debugger/atom-ternjs in quick succession (I forget which order; furthermore, I don't know if it was a coincidence, one of those specific packages or atom itself doing something strange) and then immediately searching install packages thereafter

Solution (?) / Workaround (?)

Ultimately, I found the problem went away performing the following actions. I don't know which action was the "fix", but hopefully this will help someone out:

  1. set local ~/.atom to something like ~/old.atom;
  2. installing atom via the command line as per the documentation here
  3. merge in ~/old.atom via nautilus' folder view (ie. the Gnome Ubuntu standard folder view) into the new ~/.atom that should now have appeared in your home folder but be sure to skip overwrites; use the newly installed modules.
  4. run atom --safe from command line. Immediately close atom command line
  5. run atom.

good luck!

Now, as for cause:

My suspicion is that the install/remove command in atom can sometimes remove dependencies from a node_modules folder that has other dependencies. Given @rsese can't reproduce it, and that it occured while I was adding/removing plugins in quick success, this feels a lot like a race condition (v8 file IO is - in my limited experience - an interesting beasty)...

not knowing exactly where nodeJS' single thread mentality ends and the electron interface with C++/*nix begins that's pure speculation. However, the more I think about it, the more I have this faint recollection of having had a similar problem after removing a bunch of plugins simultanesously a few years ago...

It may be that the file remove/manipulation process is relatively slow; and if the user is too fast, it interrupts whatever execution was still ongoing in the previous instant. Ergo missing dependencies.

@Aerijo
Copy link
Member

@Aerijo Aerijo commented Aug 17, 2018

@jaysaurus Was this very recently? The Atom packages website suffered some issue, and was down for a few minutes. It's back up now, so that may have actually solved the issue.

@jaysaurus
Copy link

@jaysaurus jaysaurus commented Aug 17, 2018

sorry, I posted before I was done. see above :)

@jaysaurus
Copy link

@jaysaurus jaysaurus commented Aug 17, 2018

ah, ok, maybe it was the package website then! oh well :P

@jaysaurus
Copy link

@jaysaurus jaysaurus commented Aug 17, 2018

Could we propose, therefore, that atom return a more generic 500 handler when the install packages module has issues talking to the Atom package website? @rsese would you like me to raise that as a new issue?

@rsese
Copy link
Member

@rsese rsese commented Aug 17, 2018

@jaysaurus - #1065 has been opened to resolve this particular error, do you think that's enough? Though it does seem like in general returning an informative error code/message would be useful in general if that's not the case now.

@jaysaurus
Copy link

@jaysaurus jaysaurus commented Aug 17, 2018

I think a good clean message like "The atom package repository is temporarily unavailable" would save a lot of headaches because sticklers like me will spend more time than they should looking at error messages and going "Ooooh, I wonder if I can diagnose that" haha!

@h-b
Copy link

@h-b h-b commented Sep 10, 2018

Same here, happened after searching for "lua". If this means that the package repository is unavailable, why isn't this exception catched to show a message telling the user what's going on? What's the intention of not doing that?

@deepio
Copy link

@deepio deepio commented Jan 9, 2019

This issue still occurs in 1.34.0.

Uninstalling all themes (except those that come with atom) and reinstalling them fixed it for me.

@50Wliu
Copy link
Member

@50Wliu 50Wliu commented Jan 9, 2019

@deepio can you please open a new issue?

@BenSower
Copy link

@BenSower BenSower commented Jan 21, 2019

I also encountered this today in 1.34.0 on Linux. Did @deepio already create a new ticket for it?

@BenSower
Copy link

@BenSower BenSower commented Jan 21, 2019

Based on deepios comment, installed a new theme + syntax highlighting and the problem disappeared.

@noopurphalak
Copy link

@noopurphalak noopurphalak commented Apr 14, 2020

Still Happening for me. Atom version 1.45.0, Mac OS 10.15.3

Screenshot 2020-04-14 at 1 16 18 PM

@emr-dev
Copy link

@emr-dev emr-dev commented Jul 9, 2020

Как решить проблему ?)

@altran-fabian
Copy link

@altran-fabian altran-fabian commented Jul 30, 2020

any Solution for this?
i tried completely removing atom and reinstalling it without any luck. atom is not working any more ... what can i do to solve this error?

OSX catalina 10.15.4

i.filter is not a function
[object Object]

image

@altran-fabian
Copy link

@altran-fabian altran-fabian commented Jul 30, 2020

Has it maybe to do with the search not working on atom.io/packages as well?
image
image

@elliott-impression
Copy link

@elliott-impression elliott-impression commented Jul 30, 2020

I am getting the same issue when searching for a Theme or Package:

i.filter is not a function
[object Object]
@Git-Forked
Copy link

@Git-Forked Git-Forked commented Aug 7, 2020

This error is still active when searching for a package.

@Luk313
Copy link

@Luk313 Luk313 commented Aug 7, 2020

The following error is still active after a fresh new install (for the first time) on Manjaro Linux.
body.filter is not a function
[object Object]
Wanted to test Atom vs VSCodium... :(

@Vinlock
Copy link

@Vinlock Vinlock commented Sep 5, 2020

I just fresh installed and am getting this issue when searching for a package.

i.filter is not a function
[object Object]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.