valeryan / vscode-phpsab

Php Sniffer and Beautifier for VS Code
https://marketplace.visualstudio.com/items?itemName=ValeryanM.vscode-phpsab
MIT License
58 stars 12 forks source link

Error: spawn EINVAL #128

Closed dobaniashish closed 2 months ago

dobaniashish commented 3 months ago

Recently I had noticed that sniffer had stopper working. Although fixer did work.

I started debugging the extension and found that I am getting this error:

rejected promise not handled within 1 second: Error: spawn EINVAL
extensionHostProcess.js:148
stack trace: Error: spawn EINVAL
    at ChildProcess.spawn (node:internal/child_process:421:11)
    at spawn (node:child_process:799:9)
    at validate2 ({DIR}\out\main.js:6648:55)

So when the sniffer.ts calls spawn the process fails because it seems that something changed in windows OS https://github.com/nodejs/node/issues/52554

The current solution is to add { shell: true } option in the spawn function.

Danil-Klimov commented 3 months ago

Same problem after the latest vscode update.

SuperSambat commented 3 months ago

same here, roll back to VSCode version 1.91, it works fine

jonathanbossenger commented 3 months ago

Thanks, everyone, for reporting; I will be looking into this in the coming week.