kwerle / ide-ruby

Atom package used to integrate https://github.com/kwerle/ruby_language_server with Atom. Development happens on the develop branch. Production is master.
23 stars 6 forks source link

Uncaught SyntaxError: Unexpected end of JSON input #30

Closed TheMindlessDev closed 4 years ago

TheMindlessDev commented 4 years ago

[Enter steps to reproduce:]

have package installed and start atom, no changes to preferences or settings. This error just all of a sudden started firing this morning.

Atom: 1.45.0 x64 Electron: 4.2.7 OS: Mac OS X 10.15.4 Thrown From: ide-ruby package 0.5.0

Stack Trace

Uncaught SyntaxError: Unexpected end of JSON input

At file:///Applications/Atom.app/Contents/Resources/app.asar/static/index.html:1

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at StreamMessageReader.onData (/packages/ide-ruby/node_modules/vscode-jsonrpc/lib/messageReader.js:182:29)
    at Socket.readable.on (/packages/ide-ruby/node_modules/vscode-jsonrpc/lib/messageReader.js:148:18)
    at Socket.emit (events.js:182:13)
    at addChunk (_stream_readable.js:283:12)
    at readableAddChunk (_stream_readable.js:264:11)
    at Socket.Readable.push (_stream_readable.js:219:10)
    at Pipe.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)

Commands

     -0:25.3.0 snippets:expand (input.hidden-input)
     -0:25.3.0 editor:indent (input.hidden-input)
     -0:25.1.0 snippets:next-tab-stop (input.hidden-input)
     -0:25.1.0 snippets:expand (input.hidden-input)
     -0:25.1.0 editor:indent (input.hidden-input)
     -0:25 snippets:next-tab-stop (input.hidden-input)
     -0:25 snippets:expand (input.hidden-input)
     -0:25 editor:indent (input.hidden-input)
     -0:24.8.0 snippets:next-tab-stop (input.hidden-input)
     -0:24.8.0 snippets:expand (input.hidden-input)
     -0:24.8.0 editor:indent (input.hidden-input)
     -0:24.7.0 snippets:next-tab-stop (input.hidden-input)
     -0:24.7.0 snippets:expand (input.hidden-input)
     -0:24.7.0 editor:indent (input.hidden-input)
 13x -0:20.9.0 core:backspace (input.hidden-input)
     -0:16.8.0 core:save (input.hidden-input)

Non-Core Packages

atom-ide-ui 0.13.0 
atom-material-syntax 1.0.8 
atom-material-ui 2.1.3 
atom-visual-studio-code-ui 2.1.0 
autoclose-tags 0.2.4 
autocomplete-rails-partial 0.2.0 
autocomplete-ruby 0.2.8 
busy-signal 2.0.1 
color-indent 1.1.0 
erb-helper 1.1.0 
ide-html 0.6.0 
ide-ruby 0.5.0 
intentions 1.1.5 
linter 2.3.1 
linter-rubocop 2.5.7 
linter-ui-default 1.8.1 
pigments 0.40.2 
rails-open 0.4.3 
rails-snippets 2.26.0 
ruby-block 0.3.6 
ruby-snippets 0.2.1 
ruby-solargraph 0.6.1 
ruby-syntax-replacer 0.5.1 
Sublime-Style-Column-Selection 1.7.5 
kwerle commented 4 years ago

I've seen this happen a bunch of times. And by that I mean like once a month during daily use. Never figured out how to reproduce it, and never seen it while using vscode (which I switched to a few months ago). My notion is that it happens because the communication gets out of sync - maybe because of some spurious stdio from some library or other. But I'm really not sure. My guess at a solution is to change from using STDIO as a communication method to sockets - but I've never been ready to bite that off (mostly because it'd mean a bunch more JS coding).

I'll leave this open for a while, but I have no real intention of doing anything about it. If you look at some of the closed tickets I'm sure you'll find at least one duplicate of this.

TheMindlessDev commented 4 years ago

@kwerle Not a problem at all, just figured id throw it up, i mainly use VSCode but i bounce back and forth as i find Atom has better packaged for autoclosing tags ect.. lol.. the lazy in my gets the better sometimes haha..

Ill close this up then so its not a nagging issue.

Thanks for the reply!