Skip to content

VS Code axe Accessibility Linter fails to start #3475

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

Open
ChipElavon opened this issue May 23, 2022 · 20 comments
Open

VS Code axe Accessibility Linter fails to start #3475

ChipElavon opened this issue May 23, 2022 · 20 comments
Labels
linting Axe-linter issues

Comments

@ChipElavon
Copy link

Product: axe Linter

Expectation: Linter extension starts

Actual:

  • On first run errors popups "Unable to start axe-linter" and "Unable to download local-server" appear.
  • After restarting VSCode the error popups change to "Unable to start axe-linter" and "Unable to start local-server".
  • If I chmod +x ~/.vscode/extensions/deque-systems.vscode-axe-linter-4.4.0/bin/axe-linter-server-4.4.0-macos and restart VSCode I get a popup "axe Linter setup: Starting local-server" that never progresses/finishes
    • running ./axe-linter-server-4.4.0-macos directly in the terminal prints no output and gives an exit code 0
    • investigating further ~/.vscode/extensions/deque-systems.vscode-axe-linter-4.4.0/bin/axe-linter-server-4.4.0-macos is 0 bytes in size so that explains why nothing is happening

axe-linter version: 4.4.0
vscode about output:
  Version: 1.67.2 (Universal)
  Commit: c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5
  Date: 2022-05-17T18:20:57.384Z (6 days ago)
  Electron: 17.4.1
  Chromium: 98.0.4758.141
  Node.js: 16.13.0
  V8: 9.8.177.13-electron.0
  OS: Darwin x64 21.3.0

For Tooling issues:
- Platform:  macOS 12.2.1

I'm on a machine with corporate controls installed and behind a restrictive firewall and one of those facts is probably interfering with the extension working, but I'm not finding much information to go on to figure out what exactly is going wrong with the extension starting up or what local-server it's trying and failing to download.

Looking for some help to get this extension working so we can fix a11y issues earlier in the development cycle.

Screenshot of what I see right after I install the linter extension:
Screen Shot 2022-05-23 at 2 13 00 PM

@straker straker added the linting Axe-linter issues label May 23, 2022
@straker
Copy link
Contributor

straker commented May 23, 2022

Thanks for the issue. We've been working on some major improvements to the linter that should fix some of the download issues. We're hoping to have it released in the next quarter or two.

@straker
Copy link
Contributor

straker commented Jul 26, 2022

@ChipElavon We recently released a new version of axe linter (v4.4.1) that should address this issue. Would you be willing to give it another go and let us know if you run into any more issues?

@dstorfer-cn
Copy link

@ChipElavon We recently released a new version of axe linter (v4.4.1) that should address this issue. Would you be willing to give it another go and let us know if you run into any more issues?

I'm running into an issue with the new version 4.4.1. I get a popup saying "Couldn't start client axe Linter" and here is my OUTPUT window contents:

[Error - 3:42:43 PM] Starting client failed
Error: spawn UNKNOWN
	at ChildProcess.spawn (node:internal/child_process:412:11)
	at Object.spawn (node:child_process:718:9)
	at c:\Users\CN123456\.vscode\extensions\deque-systems.vscode-axe-linter-4.4.1\dist\src\extension.js:2:226632

This doesn't seem like a download issue like the firewall one that I had before. I managed to solve the download issue by figuring out how to trick the firewall, manually download the files, and put them where they needed to be. But this error looks more internal to either node or the plugin.

@ChipElavon
Copy link
Author

ChipElavon commented Aug 15, 2022

@ChipElavon We recently released a new version of axe linter (v4.4.1) that should address this issue. Would you be willing to give it another go and let us know if you run into any more issues?

I tried today and got the following error message after installing the extension and restarting VSCode:

[Error - 1:27:24 PM] Starting client failed
Error: spawn Unknown system error -8
    at ChildProcess.spawn (node:internal/child_process:412:11)
    at Object.spawn (node:child_process:718:9)
    at /Users/m183/.vscode/extensions/deque-systems.vscode-axe-linter-4.4.1/dist/src/extension.js:2:226632

@cms365
Copy link

cms365 commented Aug 29, 2022

@ChipElavon We recently released a new version of axe linter (v4.4.1) that should address this issue. Would you be willing to give it another go and let us know if you run into any more issues?

I tried today and got the following error message after installing the extension and restarting VSCode:

[Error - 1:27:24 PM] Starting client failed
Error: spawn Unknown system error -8
    at ChildProcess.spawn (node:internal/child_process:412:11)
    at Object.spawn (node:child_process:718:9)
    at /Users/m183/.vscode/extensions/deque-systems.vscode-axe-linter-4.4.1/dist/src/extension.js:2:226632

Seeing this exact issue as well. Following.

@gps03
Copy link

gps03 commented Aug 30, 2023

Seeing the same error:

[Error - 2:23:17 PM] Starting client failed
Error: spawn Unknown system error -8
at ChildProcess.spawn (node:internal/child_process:441:11)
at Object.spawn (node:child_process:752:9)
at /Users/gps03/.vscode/extensions/deque-systems.vscode-axe-linter-4.7.2/dist/src/extension.js:1:250750
at processTicksAndRejections (node:internal/process/task_queues:96:5)

But also seeing a popup error "unable to get issuer certificate"

image

@mamankhan99
Copy link

mamankhan99 commented Nov 18, 2023

Screenshot 2023-11-18 at 1 16 38 PM

+1

on Node 20.9.0 and axe accessibility linter 4.8.0

@jsdev
Copy link

jsdev commented Dec 11, 2023

there is a strong chance you need to do the following 3 things:
in .vscode/settings.json add:
"telemetry.telemetryLevel": "off"
chmod +x ~/.vscode/extensions/deque-systems.vscode-axe-lineter-[version.num.ber]

3rd step might be providing an alternative to axe-linter-server-binary-prod-[resion].s3.amazonaws.com

@jeremy-w
Copy link

jeremy-w commented Jul 9, 2024

I believe this is caused by not supporting a tunneling HTTPS proxy when making the requests. Making the same requests using curl in a properly configured shell environment works fine.

Recommended Fix

The fix I'd recommend making to axe-core is to pull in the package proxy-agent and then to turn off Axios's own, limited proxy support in favor of using that package's agent as the httpsAgent:

const agent = new ProxyAgent();
axios = axios.create({proxy: false, httpAgent: agent, httpsAgent: agent});

(See https://stackoverflow.com/a/62277342.)

Node unfortunately does not support tunneling proxies out of the box. See the discussion in nodejs/node issue #15620 http: deal with the lack of http proxy support in node.js core.

Workaround

Assuming you have the extension installed already, and you're running under macOS, this should work:

# Find the version of the binary we need, and move into that extension folder
cd "$(ls -d ~/.vscode/extensions/deque-systems.vscode-axe-linter-* | sort -rn | head -1)"
VERSION="$(basename "$(pwd)" | awk -F- '{print $NF}')"

# Download that binary and make it executable
cd dist/bin/
curl https://axe-linter-server-binary-prod-us-east-1.s3.amazonaws.com/$VERSION/lsp-server-macos -o LSP-server-$VERSION
chmod 775 LSP-server-*

# Create a file that axe-core expects to find, so it doesn't try to re-download the binary and zero it out again on you
binSize=$(curl -sI https://axe-linter-server-binary-prod-us-east-1.s3.amazonaws.com/$VERSION/lsp-server-macos | grep Content-Length | awk '{print $2}')
echo '{"binSize": '$binSize', "downloaded": true}' > ../lsp-bin-information

But you'll need to re-run this snippet whenever the extension version updates, because it'll try to grab the new version and fail.

@ChipElavon
Copy link
Author

Thanks @jeremy-w that workaround fixes the issue for me. I'll leave this open until the fix is in the plugin itself and a workaround is no longer needed, but at least I can use the plugin now.

@Lanie-Carmelo
Copy link

I'm on Windows and experiencing this issue:
[Error - 9:33:57 AM] Starting client failed
Error: spawn UNKNOWN
at ChildProcess.spawn (node:internal/child_process:421:11)
at Object.spawn (node:child_process:796:9)
at c:\Users\lgcar.vscode\extensions\deque-systems.vscode-axe-linter-4.10.1\dist\src\extension.js:2:264354
Axe isn't vital for me yet since I'm just learning to code, but I do like to have it to help me catch accessibility issues. How can I fix this?

@WilcoFiers
Copy link
Contributor

WilcoFiers commented Nov 25, 2024

@Lanie-Carmelo thanks for reporting. I'll get someone to investigate. The error isn't too informative, so we may have further questions. Did you have axe linter installed before, or was this a new install you did?

@drmenzelit
Copy link

Having the same problem here since a couple of days. Windows 11, Visual Studio Code 1.95.3, axe Linter 4.10.1. It was working previously without problems.

[Error - 12:56:46] Starting client failed Error: spawn UNKNOWN at ChildProcess.spawn (node:internal/child_process:421:11) at Object.spawn (node:child_process:796:9) at c:\Users\xxxx\.vscode\extensions\deque-systems.vscode-axe-linter-4.10.1\dist\src\extension.js:2:264354

@WilcoFiers
Copy link
Contributor

We think we've identified the issue, but so close to US holidays we didn't want to chance it. We've reverted to axe linter 4.10.0 and have re-released it axe 4.10.2. Please upgrade to 4.10.2 to solve this issue. That should solve any issues. We'll work on getting the changes promised in 4.10.1 released next week and will get these out as soon as possible. We'll also be sure to tighten up the release process so that this can never happen again. Our apologies for any inconvenience.

If anyone does still have issues with the latest install (can't think why, but who knows), please let us know in the thread.

@Lanie-Carmelo
Copy link

Just got a chance to test things since I'm working on another project, and I'm seeing this:
[Error - 12:09:46 AM] Starting client failed
Error: spawn EBUSY
at ChildProcess.spawn (node:internal/child_process:421:11)
at Object.spawn (node:child_process:796:9)
at c:\Users\lgcar.vscode\extensions\deque-systems.vscode-axe-linter-4.10.2\dist\src\extension.js:2:264354

@WilcoFiers
Copy link
Contributor

@Lanie-Carmelo thanks for reporting, we're investigating.

@thomasvanlankveld
Copy link

thomasvanlankveld commented Dec 13, 2024

Fresh install of the axe Accessibility linter v4.10.2 gives me a toast with "Couldn't start client axe Linter", and the following output:

[Error - 11:29:31] Starting client failed
Error: spawn Unknown system error -86
	at ChildProcess.spawn (node:internal/child_process:421:11)
	at Object.spawn (node:child_process:776:9)
	at /Users/<path>/.cursor/extensions/deque-systems.vscode-axe-linter-4.10.2/dist/src/extension.js:2:264354

@WilcoFiers
Copy link
Contributor

@thomasvanlankveld Thank you for reporting. If you restart, does the issue persist? If not, can you try uninstalling axe linter and reinstalling?

@robinloeffel
Copy link

I'm getting the same error, but on macOS.

[Error - 17:16:02] Starting client failed
Error: spawn Unknown system error -86
	at ChildProcess.spawn (node:internal/child_process:420:11)
	at Object.spawn (node:child_process:796:9)
	at /Users/robin/.vscode/extensions/deque-systems.vscode-axe-linter-4.10.2/dist/src/extension.js:2:264354

It persists after restarting the extensions manually, and also after reinstalling Axe Linter.

@michael-siek
Copy link
Member

Hey @robinloeffel do you mind checking this path to see what the size of the binary is? It might be an issue with getting the binary from aws if you have a strict firewall policy

~/.vscode/extensions/deque-systems.vscode-axe-linter-4.10.2/dist/bin/LSP-server-4.10.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linting Axe-linter issues
Projects
None yet
Development

No branches or pull requests