-
Notifications
You must be signed in to change notification settings - Fork 78
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
Client Metals: connection to server is erroring. Shutting down server. #1491
Comments
The strange thing about this is that I've never seen anything so resistant to restarting, reinstalling, etc. I deleted VS code entirely, remove all the traces of it I could fine, re-cloned a new copy of the repo I'm working on, reinstalled everything, and it just continues to fail. |
Is there any Java process running in the background? I can't figure out why this would be happening. Maybe we are picking up JAVA_OPTS and that is interfering somehow? |
Thank you so much, commenting out my Adding Probably something local to me if no one else runs into it. Really appreciate your suggestion, got me out of a bad place. |
Och, I think I know what happened. Metals reads JAVA_OPTS and adds it to java process, but it needs to have agentlib silent if you add -agentlib option, since it will print some stuff to stdout, which will not be understood by VS Code, it only expects jsons. Would be great to detect that automatically and print to the user 🤔 |
Good call, If I add Here is the process that is working for me now to step through test code AND code under test using ScalaTest. in build.sbt place Then in ./zshrc
Then I'm able to run/debug the tests from the side test panel list (beaker icon) or the Debug play button/green triangle icon with this .vscode/launch.json :
Where is I still don't completely understand when the icons that show up inline next to the tests are expected to appear. It seems to show right when I start VSCode and import or clean and restart, but if I lose it I can't figure out how to get them back. Even after clicking the beaker. Then sometimes they come back when I least expect it Not super worried about it because the above two options are great. FWIW this started around 9-11pm central US time for me yesterday. This all seemed to be working without the |
I'm experiencing this as well. Started now out of the blue. |
Oh, it's because the VS-Code plugin was updated. I downgraded. Works now. |
The only thing that could cause the problem is #1498 the rest added in the plugin are only fallbacks. Do you have any java options settings that could cause metals to stop starting? |
This is what I get when upgrading from
|
Is the same Java used for 1.2.2 version also? What is your server properties? Anything in the environment that could interfere with Metals managing to start the JVM ? |
This is how it look when it's successful under
|
I need to maybe add some debug information. Do you have JVM_OPTS variable, .jvmopts files or specified metals.serverProperties? |
None of these |
Not sure what is wrong, but I think I reverted the offending change. 1.34.0 should have it fixed. Sorry for the trouble! |
I'm sorry to report that 1.34.0 still has the same issue. Would be happy to help anyway I can to provide more information. |
SORRY, MY MISTAKE. 1.34.0 WORKS |
Describe the bug
Things were going awesome as I was step debugging through some tests using the inline test debugging option. Then it started to get slower and slower, until it locked up. Then I restarted the computer, uninstalled/reinstalled the Metals extension, and VSCode as well.
I will say I'm on Scala 2.13.5 but everything was working great fir my needs until this debug session seemed to trip me up and lock me out. Upgrading isn't an immediate option for me so mainly just posting in case others run into it.
I'm also seeing the same behavior as #1488 when this occurs. The buttons are unreactive.
Have "metals.javaHome": "/Users/hunter.leachman/.sdkman/candidates/java/current/bin/java" set in settings.json
I've tried the Pre-release version. I noticed Bloop had a new release a few hours before my issues began? - https://scalacenter.github.io/bloop/setup#sbt -
I'm also getting these messages -
Client Metals: connection to server is erroring. Shutting down server.
write EPIPE
Metals client: couldn't create connection to server.
Restarting server failed
The Metals server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
Everything was going so well, it's like these errors are cached somewhere and won't go away?
The project compiles with sbt
Nothing seems to make the errors go away/
To Reproduce Steps to reproduce the behavior:
Expected behavior
The errors at least go away after restarting computer, the plugin, or uinstalling/reinstalling
Screenshots
Installation:
metals.serverVersion
)Additional context
Everything was working so perfectly until these errors started seemingly out of no where.
Really appreciate y'all and the work you are doing. This has come a long way in the last 2 years since the last time I tried out Metals. I'm thiiiiiiiiis close (finger to thumb) to replacing IntelliJ, almost there.
"Metals client: couldn't create connection to server."
"he Metals server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information."
"Restarting server failed"
The text was updated successfully, but these errors were encountered: