castwide / atom-solargraph

An Atom package for Solargraph.
MIT License
39 stars 5 forks source link

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

Closed YuryBogdanov closed 6 years ago

YuryBogdanov commented 6 years ago

Packages searching is blocked unless ruby-solargraph is disabled :(

[Enter steps to reproduce:]

  1. Open Settings / Install
  2. Type any package name in search box, press Enter

Atom: 1.26.0 x64 Electron: 1.7.11 OS: Mac OS X 10.13.4 Thrown From: ruby-solargraph package 0.2.0

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 (/packages/ruby-solargraph/node_modules/request/request.js:186:22)
    at emitTwo (events.js:106:13)
    at Request.emit (events.js:194:7)
    at /packages/ruby-solargraph/node_modules/request/request.js:1163:10)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:191:7)
    at /packages/ruby-solargraph/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:43.4.0 settings-view:open (atom-pane.pane)
  2x -0:32.1.0 core:confirm (input.hidden-input)
     -0:07.7.0 editor:delete-to-beginning-of-line (input.hidden-input)

Non-Core Packages

autocomplete-swift 1.0.3 
busy-signal 1.4.3 
git-blame 1.6.0 
git-history 3.3.0 
Hydrogen 2.4.1 
intentions 1.1.5 
language-swift-3 0.4.0 
linter 2.2.0 
linter-ruby 1.2.6 
linter-ui-default 1.7.1 
pretty-json 2.0.0 
ruby-solargraph 0.2.0 
castwide commented 6 years ago

I'm not sure of the root cause here, but I plan for the next package update to use the language server protocol instead of the legacy web API, which should preclude this issue by not using the request module.

The LSP update is being tracked in #5.

castwide commented 6 years ago

Package version 0.3.0 uses the language server instead of the web server.