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

Stuck on Starting Metals server #6862

Open
DreamLand7707 opened this issue Oct 19, 2024 · 10 comments
Open

Stuck on Starting Metals server #6862

DreamLand7707 opened this issue Oct 19, 2024 · 10 comments
Labels
needs more information Use if we need more information for a specific ticket

Comments

@DreamLand7707
Copy link

Describe the bug

When I want to create a scala project, I press the icon "Metal" and VSCode will stuck on "Starting Metals server"
Just like:
image
image
I set the environment variable:JAVA_HOME correctly: C:\Program Files\Java\jdk-18.0.2.1
image
I can't press the buttons: New scala project and Start Metals.

Expected behavior

Metal should works correctly.

Operating system

Windows

Editor/Extension

VS Code

Version of Metals

v1.3.5

Extra context or search terms

No response

@tgodzik
Copy link
Contributor

tgodzik commented Oct 19, 2024

Thanks for reporting! Do you see something in the metals output? View -> Output -> Select Metals

@tgodzik tgodzik added the needs more information Use if we need more information for a specific ticket label Oct 19, 2024
@DreamLand7707
Copy link
Author

Thanks for reporting! Do you see something in the metals output? View -> Output -> Select Metals

Yes, I'll show to you:
image

@DreamLand7707
Copy link
Author

Thanks for reporting! Do you see something in the metals output? View -> Output -> Select Metals

as you can see, it is stuck.

@tgodzik
Copy link
Contributor

tgodzik commented Oct 19, 2024

Looks like it, though I don't see why. It seems that the MEtal server is not starting, it might be related to another issue that I did a workaround for. You can try updating metals.serverVersion to 1.3.5+180-97cc5572-SNAPSHOT to see if that workaround helped.

Related #6762

@DreamLand7707
Copy link
Author

Looks like it, though I don't see why. It seems that the MEtal server is not starting, it might be related to another issue that I did a workaround for. You can try updating metals.serverVersion to 1.3.5+180-97cc5572-SNAPSHOT to see if that workaround helped.

Related #6762

ok, but before that, could you please tell me how to do that? I have tried
C:\Users\DreamLAND.metals\cs.exe fetch org.scalameta:metals_2.13:1.3.5+180-97cc5572-SNAPSHOT
but this doesn't worked

@tgodzik
Copy link
Contributor

tgodzik commented Oct 19, 2024

You need to change the setting inside metals extension settings, which is in VS Code settings

Or alternatively you can wait until the next release, which should be next week

@DreamLand7707
Copy link
Author

1.3.5+180-97cc5572-SNAPSHOT

I got some error

[Error - 01:35:36] Client Metals: connection to server is erroring. Shutting down server.
[Error - 01:35:36] Stopping server failed
Error: Client is not running and can't be stopped. It's current state is: starting
	at LanguageClient.shutdown (c:\Users\DreamLAND\.vscode\extensions\scalameta.metals-1.39.0\node_modules\vscode-languageclient\lib\common\client.js:914:19)
	at LanguageClient.stop (c:\Users\DreamLAND\.vscode\extensions\scalameta.metals-1.39.0\node_modules\vscode-languageclient\lib\common\client.js:885:21)
	at LanguageClient.stop (c:\Users\DreamLAND\.vscode\extensions\scalameta.metals-1.39.0\node_modules\vscode-languageclient\lib\node\main.js:150:22)
	at LanguageClient.handleConnectionError (c:\Users\DreamLAND\.vscode\extensions\scalameta.metals-1.39.0\node_modules\vscode-languageclient\lib\common\client.js:1146:18)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[Error - 01:35:36] Client Metals: connection to server is erroring. Shutting down server.
[Error - 01:35:36] Stopping server failed
Error: Client is not running and can't be stopped. It's current state is: starting
	at LanguageClient.shutdown (c:\Users\DreamLAND\.vscode\extensions\scalameta.metals-1.39.0\node_modules\vscode-languageclient\lib\common\client.js:914:19)
	at LanguageClient.stop (c:\Users\DreamLAND\.vscode\extensions\scalameta.metals-1.39.0\node_modules\vscode-languageclient\lib\common\client.js:885:21)
	at LanguageClient.stop (c:\Users\DreamLAND\.vscode\extensions\scalameta.metals-1.39.0\node_modules\vscode-languageclient\lib\node\main.js:150:22)
	at LanguageClient.handleConnectionError (c:\Users\DreamLAND\.vscode\extensions\scalameta.metals-1.39.0\node_modules\vscode-languageclient\lib\common\client.js:1146:18)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[Error - 01:35:36] Client Metals: connection to server is erroring. Shutting down server.
[Error - 01:35:36] Stopping server failed
Error: Client is not running and can't be stopped. It's current state is: starting
	at LanguageClient.shutdown (c:\Users\DreamLAND\.vscode\extensions\scalameta.metals-1.39.0\node_modules\vscode-languageclient\lib\common\client.js:914:19)
	at LanguageClient.stop (c:\Users\DreamLAND\.vscode\extensions\scalameta.metals-1.39.0\node_modules\vscode-languageclient\lib\common\client.js:885:21)
	at LanguageClient.stop (c:\Users\DreamLAND\.vscode\extensions\scalameta.metals-1.39.0\node_modules\vscode-languageclient\lib\node\main.js:150:22)
	at LanguageClient.handleConnectionError (c:\Users\DreamLAND\.vscode\extensions\scalameta.metals-1.39.0\node_modules\vscode-languageclient\lib\common\client.js:1146:18)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[Error - 01:35:39] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Info  - 01:35:39] Connection to server got closed. Server will restart.
true
[Error - 01:35:39] Metals client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8

@DreamLand7707
Copy link
Author

You need to change the setting inside metals extension settings, which is in VS Code settings

Or alternatively you can wait until the next release, which should be next week

Ok, I'm really looking forward to your next stable release

@tgodzik
Copy link
Contributor

tgodzik commented Oct 19, 2024

However it looks like it actually started now? Do you see anything in .metals/metals.log, any logs? I am worried that my workaround didn't help and I have no way of reproducing it.

@DreamLand7707
Copy link
Author

1.3.5+180-97cc5572-SNAPSHOT

Yes I got it
metals.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs more information Use if we need more information for a specific ticket
Projects
None yet
Development

No branches or pull requests

2 participants