castwide / vscode-solargraph

A Visual Studio Code extension for Solargraph.
Other
425 stars 23 forks source link

Fails to start in VSCode: "[Errno::EBADF] Bad file descriptor - ruby" #245

Closed gbirchmeier closed 2 years ago

gbirchmeier commented 2 years ago

I have done the following

When VSCode starts, Solargraph fails with this:

image

The only error log I can find is in the OUTPUT tab -> "Log (Window)":

[2022-04-06 11:58:21.423] [renderer1] [error] [Errno::EBADF] Bad file descriptor - ruby: Error: [Errno::EBADF] Bad file descriptor - ruby
    at handleResponse (/home/grant.birchmeier/.vscode/extensions/castwide.solargraph-0.23.0/node_modules/vscode-jsonrpc/lib/common/connection.js:477:48)
    at processMessageQueue (/home/grant.birchmeier/.vscode/extensions/castwide.solargraph-0.23.0/node_modules/vscode-jsonrpc/lib/common/connection.js:292:17)
    at Immediate.<anonymous> (/home/grant.birchmeier/.vscode/extensions/castwide.solargraph-0.23.0/node_modules/vscode-jsonrpc/lib/common/connection.js:276:13)
    at processImmediate (node:internal/timers:464:21)
[2022-04-06 11:58:21.436] [renderer1] [error] write after end: Error: write after end
    at new NodeError (node:internal/errors:371:5)
    at _write (node:internal/streams/writable:319:11)
    at Socket.Writable.write (node:internal/streams/writable:334:10)
    at /home/grant.birchmeier/.vscode/extensions/castwide.solargraph-0.23.0/node_modules/vscode-jsonrpc/lib/node/ril.js:90:29
    at new Promise (<anonymous>)
    at WritableStreamWrapper.write (/home/grant.birchmeier/.vscode/extensions/castwide.solargraph-0.23.0/node_modules/vscode-jsonrpc/lib/node/ril.js:80:16)
    at StreamMessageWriter.doWrite (/home/grant.birchmeier/.vscode/extensions/castwide.solargraph-0.23.0/node_modules/vscode-jsonrpc/lib/common/messageWriter.js:100:33)
    at /home/grant.birchmeier/.vscode/extensions/castwide.solargraph-0.23.0/node_modules/vscode-jsonrpc/lib/common/messageWriter.js:91:29

... but I don't really know what this means or what command is being used to get this result.

I ran bundle exec solargraph scan, but didn't see any red flags.

I tried it with a brand-new config created from bundle exec solargraph config to make sure that wasn't the issue. Same result.

gbirchmeier commented 2 years ago

Closing this. I believe my error has something to do with how we have installed Ruby via the asdf tool.