Bash IDE throws a warning pasing the response from Explainshell, but works anyway?
KlfJoat opened this issue · comments
Code editor
VS Codium
Platform
Linux
Version
1.38.0
What steps will reproduce the bug?
Run Explainshell via docker-compose as per the instructions at https://github.com/idank/explainshell
Install and run Bash IDE in VS Codium v1.85.1 on Ubuntu 23.10 with the following configuration settings:
"bashIde.shellcheckPath": "",
"bashIde.explainshellEndpoint": "http://localhost:5000/",
"bashIde.includeAllWorkspaceSymbols": true
How often does it reproduce? Is there a required condition?
If I open a bash script and hover over a common command that Explainshell includes, like find
, sort
, sha1sum
, cut
, etc., I will see the text pop up and give me information on the command.
However, in the output console under "Bash IDE" I see an error message for each command I hover over.
What is the expected behavior?
No errors in the log while performing an explainshell lookup.
What do you see instead?
[Warn - 4:34:23 PM] 22:34:23.185 WARNING ⛔️ getExplainshellDocumentation exception: invalid json response body at http://localhost:5000//api/explain?cmd=find reason: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
Additional information
The URL is correct and I have tried browsing to the URL http://localhost:5000//api/explain?cmd=find
. It returns the following source.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>404 Not Found</title>
<h1>Not Found</h1>
<p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.</p>
Browsing to http://localhost:5000/explain?cmd=find
works as expected.
Explainshell has no API AFIAK. So I'm not sure what JSON output Bash IDE is expecting? And why it's hitting this non-existent /api
endpoint first, then obviously finding the correct data to show me in the hover text.