Error in SonarLint for IntelliJ with wsl linux windows subsystem

Environment:

  • Java: JetBrains s.r.o. 17.0.4.1
  • OS: Windows 10 amd64
  • IDE: IntelliJ IDEA 2022.2.3
  • SonarLint: 7.4.0.60471
java.lang.IllegalStateException: Unable to create directory: \\wsl$\Ubuntu-20.04\home\ec2-user\examples\clickstream\.idea\sonarlint\issuestore
	at o.ss.sl.core.serverconnection.FileUtils.mkdirs(FileUtils.java:101)
	at o.sl.ij.issue.persistence.IssuePersistence.<init>(IssuePersistence.java:52)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
	at c.ij.serviceContainer.ConstructorInjectionKt.instantiateUsingPicoContainer(constructorInjection.kt:52)
	at c.ij.serviceContainer.ComponentManagerImpl.instantiateClassWithConstructorInjection(ComponentManagerImpl.kt:890)
	at c.ij.serviceContainer.ServiceComponentAdapter.createAndInitialize(ServiceComponentAdapter.kt:51)
	at c.ij.serviceContainer.ServiceComponentAdapter.access$createAndInitialize(ServiceComponentAdapter.kt:12)
	at c.ij.serviceContainer.ServiceComponentAdapter$doCreateInstance$1.compute(ServiceComponentAdapter.kt:45)
	at c.ij.oa.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683)

Hi @andrekukshinov,

Do you have permission to write in this folder? Could you try to chmod recursively the directory clickstream with the needed permission (read + write) and see if that’s still an issue?

Also, your SonarLint version is quite outdated, I suggest you update it to the latest one if possible!

Thanks for using SonarLint!