-
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
“Start Metals server” keeps loading forever #1226
Comments
Thanks for reporting! It looks like it fails in the prerelease version, does it work when you use the last stable one? |
Also, there might be some additional logs in other outputs (Extension Host, Window etc.). Though it is very rare that the window would show nothing. One possible workaround could be that you change the java home setting to an invalid one and allow metals to download it itself. That would mean metals is not working with the Java it uses currently (though it should work without issues). Another problem could be an older VS Code version 🤔 but from what I've seen it gets automatically updated on Windows. |
We use a library that will try to find java on the system, so the best way around it is to make Java home invalid and force metals to try and download it. Also, could you change the Metals server version to |
looks like it's not able to download the Java or Metals. Is it possible you have some kind of proxy? |
Yeah,I‘m in China. The connections to github and many other websites are usually blocked , so I have a proxy set via Clash to ensure the connections. But after shutting the proxy, I'm still stuck. And my linux server connected via the same wifi works just fine with metals |
Maybe running via proxy with some additional JVM settings specified? https://scalameta.org/metals/docs/troubleshooting/proxy#proxy-settings The biggest issue here is that it seems to be hanging instead of throwing an exception that we can take a look at. We might need to add some more debug statements to see what is going on. I am out of ideas currently, but if you have time you could try setting up the Metals extension and try adding log statements locally for you. It is not super complicated (install yarn locally, run Of course, that is if you feel like looking into it. I am trying to think of something in the meantime |
@tgodzik I got a very similar issue on MacOS. Environment There are few messages in the Metals output panel: When I killed the Java process with TaskManager, it appears more message: it looks like Metals got stucked at downloading packages, but I can download the jars with browsers very quickly. After checking the doc link about proxy given by the notification, I found the issue comes from Coursier. When I run the coursier command, it produces the same message: $ ~/.vscode/extensions/scalameta.metals-1.22.0/coursier
Waiting for ongoing concurrent download for https://repo1.maven.org/maven2/com/squareup/okio/okio/1.17.2/okio-1.17.2.jar
Waiting for ongoing concurrent download for https://repo1.maven.org/maven2/com/google/collections/google-collections/1.0/google-collections-1.0.jar
How can I continue with the issue of Coursier? |
I wonder if it's an issue with corusier version. You could install coursier locally, add to PATH and switch to prereelase version of Metals. It should use your locally installed coursier version afterwards. |
@tgodzik yes, it worked! Thank you. |
Thanks for confirming! We need to figure out a better way of getting coursier automatically for users. |
It did manage to get Java, so everything should work. You can fallback to normal release version if you are using a prerelease, but first maybe you could check |
not works 2024 |
Describe
I just installed scala and sbt from the official website and also have Metals installed in VSCode. I opened an empty folder, tring to create a new scala project using Metals. However, by clicking whether "New Scala project" or "Start metals", it only kept running the notification status bar and nothing appeared in the left bars. The output of metals only showed the info about jdk and metals‘ version. Please see the screenshots below. So what should I do about it? My jdk, JAVA_HOME are all fine with my java projects and I can run scala and sbt in Windows cmd.
Plus, metals seems to be ok when I use it in my linux server via vscode ssh. Is there something wrong with metals' Windows version?
Environment
OS: Windows 10
VS Code: 1.73.1
Metals extension: 1.20.0
Metals: 0.11.9
Java:11.0.17
Scala: 2.13.10
sbt:1.8.0
$env:JAVA_HOME C:\Program Files\Java\jdk11.0.17
Screenshots
The text was updated successfully, but these errors were encountered: