Skip to content
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

Couldn't start client ERDiagram Language Server #67

Open
AkaiKenshi opened this issue Aug 19, 2024 · 7 comments
Open

Couldn't start client ERDiagram Language Server #67

AkaiKenshi opened this issue Aug 19, 2024 · 7 comments
Labels
bug Problems related to bugs

Comments

@AkaiKenshi
Copy link

Description

can't use the tool due to this error

output:

[Error - 2:51:50 AM] Starting client failed
Error: spawn EINVAL
	at ChildProcess.spawn (node:internal/child_process:421:11)
	at Object.spawn (node:child_process:799:9)
	at c:\Users\nacho\.vscode\extensions\bigmodelingtools.erdiagram-0.5.0\pack\main.js:13639:40

Current Behavior

No response

Expected Behavior

No response

Steps to Reproduce

  1. on Startup

Environment

-OS: Windows
-JAVA: openjdk 11.0.16.1 2022-08-12 LTS
-VSCode: 1.92.2

Additional Information

No response

@AkaiKenshi AkaiKenshi added the bug Problems related to bugs label Aug 19, 2024
@PedroBlanco
Copy link

Description

Same error: plugin not loading.

Current Behavior

  1. Error dialogs:
    imagen
  2. Output:
    [Error - 1:26:11 PM] Starting client failed Error: spawn EINVAL at ChildProcess.spawn (node:internal/child_process:421:11) at Object.spawn (node:child_process:799:9) at c:\Usuarios\pedro\.vscode\extensions\bigmodelingtools.erdiagram-0.5.0\pack\main.js:13639:40

Expected Behavior

  1. Dialog saying that it has been correctly loaded.

Steps to Reproduce

  1. On opening an .erd file

Environment

Same machine with:

  • OS: Windows 11
  • JAVA:
    • openjdk 22.0.2
    • Liberica Standard JDK 21.0.4+9 x86 64 for Windows
    • Liberica Standard JRE 22.0.2+11 x86 64 for Windows
    • Microsoft JDK 21.0.4 x64
  • VSCode: 1.92.2

@GOKU900
Copy link

GOKU900 commented Sep 14, 2024

I was having the same issue. I was on VS code August 2024 (version 1.93). I reverted to VS code June 2024 (version 1.91)
and did not see the error under this version and "bigER Modeling Tool v0.5.0".

@giuliano-marinelli
Copy link

Any solution for this problem with new VS Code versions?

@rajabhathor
Copy link

I have the same issue - trying to use for a Pharma Client

@borkdominik
Copy link
Owner

I cannot reproduce this with the current version of VS Code and Java 21 on Mac.
We will look into this, might be a Windows issue @plglaser

@AdamBanham
Copy link

AdamBanham commented Nov 20, 2024

I can also confirm the issue is occurring on Windows, with a fresh install from the extensions tab in vscode.
image

Reproduced using lastest head

I managed to run the extension locally using the lastest head, after building the extension the following events can be seen in extension host output:

2024-11-20 15:20:14.899 [info] Extension host with pid 12820 started
2024-11-20 15:20:14.899 [info] Skipping acquiring lock for c:\Users\Adam_\AppData\Roaming\Code\User\workspaceStorage\a49d96fb834005eb16f5b5e4cd85c3be.
2024-11-20 15:20:14.933 [info] ExtensionService#_doActivateExtension vscode.emmet, startup: false, activationEvent: 'onLanguage'
2024-11-20 15:20:14.977 [info] ExtensionService#_doActivateExtension BIGModelingTools.erdiagram, startup: false, activationEvent: 'onLanguage:erdiagram'
2024-11-20 15:20:15.138 [info] ExtensionService#_doActivateExtension vscode.git-base, startup: true, activationEvent: '*', root cause: vscode.git
2024-11-20 15:20:15.187 [info] ExtensionService#_doActivateExtension vscode.git, startup: true, activationEvent: '*'
2024-11-20 15:20:15.349 [info] ExtensionService#_doActivateExtension vscode.github, startup: true, activationEvent: '*'
2024-11-20 15:20:15.552 [warning] [vscode.git] Accessing a resource scoped configuration without providing a resource is not expected. To get the effective value for 'git.openRepositoryInParentFolders', provide the URI of a resource or 'null' for any resource.
2024-11-20 15:20:15.552 [warning] [vscode.git] Accessing a resource scoped configuration without providing a resource is not expected. To get the effective value for 'git.showProgress', provide the URI of a resource or 'null' for any resource.
2024-11-20 15:20:15.580 [info] Eager extensions activated
2024-11-20 15:20:15.612 [info] ExtensionService#_doActivateExtension vscode.debug-auto-launch, startup: false, activationEvent: 'onStartupFinished'
2024-11-20 15:20:15.620 [info] ExtensionService#_doActivateExtension vscode.merge-conflict, startup: false, activationEvent: 'onStartupFinished'
2024-11-20 15:20:16.143 [error] Error: spawn EINVAL
	at ChildProcess.spawn (node:internal/child_process:421:11)
	at Object.spawn (node:child_process:796:9)
	at c:\git projects\bigER\extension\pack\main.js:13639:40

Expected Behavior

Dialog saying that it has been correctly loaded.

Steps to Reproduce

On opening an .erd file

Environment

OS: Windows 11 Pro 10.0.26100
JAVA:
openjdk 21.0.4 2024-07-16 LTS
OpenJDK Runtime Environment (Red_Hat-21.0.4.0+7-1) (build 21.0.4+7-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-21.0.4.0+7-1) (build 21.0.4+7-LTS, mixed mode, sharing)
VSCode: 1.95.3

Possible Issue

I think the issue is likely connected to a recent CVE which then triggered a breaking change for nodejs, which vscode has since moved to from v1.92.
A rundown of the breaking changes can be seen in the following issues:

The previous issue outlines the changes required to adjust and resolve the issue in the immediate future (gitkraken/vscode-gitlens#3387) as outlined below:

Node.js has added a section on batch file spawning to their documentation. To fix any issues:

  • Find locations where you call child_process.spawn to execute a batch file on Windows
  • Add shell: true or shell: process.platform === 'win32' to the options object
    • If the batch script path may contain spaces, you will also need to wrap the path in quotation marks.

I have not tested the suggested changes, but do have some time if you would like me to test the possible resolution with a PR.

@Zhengwei5360
Copy link

@AdamBanham , Hi Adam, I just met this kind of issue , and is there any workaround to solve it ? thanks ~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Problems related to bugs
Projects
None yet
Development

No branches or pull requests

8 participants