WSL2 not ready for prime time?!
Answered
I am currently having a go at WSL2 with IDEA again.
It seems it is still not really mature, there are a lot of strange, intermittent bugs. I would report all the bugs, but most of the time I cannot really reproduce them myself. Also, often I am unsure if IDEA is to blame.
Is it just me and my setup or something in my applications? Is IDEA with WSL2 working for everybody else?
Random problems I encountered:
- When starting a Spring Boot app: "An operation is not implemented: Not yet implemented"
Next attempt to start most often works fine. - Running a gradle application works fine, trying to debug using the same run config hangs for a minute, then gives something along the lines of "JDWP: No transport initialized". This I cannot reproduce anymore at all.
- Application starts halfsway through, but then just hangs.
- A gradle run config that uses a JDK in WSL2 seems to automatically start in the WSL2 environment. Yet, the IDEA Run Config still has a "Run on" configuration, where I could additionally configure a gradle installation in WSL2. This is confusing. It works in WSL2 even if I leave "Run on" set to "Local machine". Also, I can only configure a fixed gradle installation in WSL2, not say "Use gradle wrapper".
- Not IDEA related: VPN did not work together with WSL2 (fixed by using Cisco Annyconnect from the MIcrosoft Store instead of using the Cisco Download).
- gerrit plugin does not work with WSL2 at all (fixed by us having migrated to bitbucket anyway - which was the push I needed to try WSL2 again)
- npm install also sometimes has problems reaching our internal repository (artifactory) - again most of the times it works fine
Please sign in to leave a comment.
Thank you for the feedback.
>When starting a Spring Boot app: "An operation is not implemented: Not yet implemented" Next attempt to start most often works fine.
It would be interesting to see a full stack trace if any and the idea.log after it happens. It would be much appreciated if you reported it directly at https://youtrack.jetbrains.com/issues/IDEA Also please check it is not a third party plugin issue (e.g. by disabling the 3rd plugins). Thanks.
>Running a gradle application works fine, trying to debug using the same run config hangs for a minute, then gives something along the lines of "JDWP: No transport initialized". This I cannot reproduce anymore at all.
>Application starts halfsway through, but then just hangs.
Sounds like https://youtrack.jetbrains.com/issue/IDEA-265364 https://youtrack.jetbrains.com/issue/IDEA-265792
Please check it is not caused by the firewall: https://www.jetbrains.com/help/idea/how-to-use-wsl-development-environment-in-product.html#local_project. Try also if this action helps.
>A gradle run config that uses a JDK in WSL2 seems to automatically start in the WSL2 environment. Yet, the IDEA Run Config still has a "Run on" configuration, where I could additionally configure a gradle installation in WSL2. This is confusing. It works in WSL2 even if I leave "Run on" set to "Local machine". Also, I can only configure a fixed gradle installation in WSL2, not say "Use gradle wrapper".
If the project (and so Gradle and JDK) is located on WSL, the Local option should be used to the runs - as with this option IDE will run the code directly from the WSL project. It is not required to connect via the SSH.
Gradle as well as JDK for the WSL project is configured in the same place as with all other projects:
Settings | Build, Execution, Deployment | Build Tools | Gradle | Gradle JVM
File | Project Structure | SDK.
Including the gradle-wrapper.properties file option - if specified - IDE will download on WSL machine and will use the Gradle, which is specified in gradle-wrapper.properties file.
Forgot to say thanks for the answer! Feedback is always welcome.
The first issue mentioned has been reported here:
(already has two duplicates)
In the mean time, I was fighting a problem were indexing always got stuck (thankfully fixed in latest EAP), but these issues are also giving me trouble:
These are just the problems I encoutered myself. There are lots of open issues in YouTrack.
Oh, one more remark, I think WSL2 will become even more important.