Error in SonarLint for IntelliJ: NullPointerException: Parameter specified as non-null

Environment:

  • Java: JetBrains s.r.o. 17.0.10
  • OS: Windows 10 amd64
  • IDE: IntelliJ IDEA 2023.3.4
  • SonarLint: 10.4.0.77904

Internal error: java.lang.NullPointerException: Parameter specified as non-null is null: method org.sonarlint.intellij.SonarLintIntelliJClient.getProxyPasswordAuthentication, parameter prompt

java.util.concurrent.CompletionException: java.lang.NullPointerException: Parameter specified as non-null is null: method o.sl.ij.SonarLintIntelliJClient.getProxyPasswordAuthentication, parameter prompt
	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:649)
	at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.lang.NullPointerException: Parameter specified as non-null is null: method o.sl.ij.SonarLintIntelliJClient.getProxyPasswordAuthentication, parameter prompt
	at o.sl.ij.SonarLintIntelliJClient.getProxyPasswordAuthentication(SonarLintIntelliJClient.kt)
	at o.ss.sl.core.rpc.client.SonarLintRpcClientImpl.lambda$getProxyPasswordAuthentication$21(SonarLintRpcClientImpl.java:237)
	at o.ss.sl.core.rpc.client.SonarLintRpcClientImpl.lambda$requestAsync$1(SonarLintRpcClientImpl.java:103)

Hello @kreake,

Thanks for reporting this, I created this ticket to make a fix. Could you share a bit more details about the problem: how often does it happen? Is this preventing you from using SonarLint?

Hi,

sorry for the late reply.
The problem started by a little bugfix update. IDEA stayed the same 2023.3.4.

The problem occures on every startup and it does not matter if you change the proxy settings via IDE.

It does not prevent me from using the plugin but it feels like everything is slowed down.

Environment:

  • Java: JetBrains s.r.o. 17.0.10
  • OS: Windows 10 amd64
  • IDE: IntelliJ IDEA 2023.3.4
  • SonarLint: 10.4.0.77904

Internal error: java.lang.NullPointerException: Parameter specified as non-null is null: method org.sonarlint.intellij.SonarLintIntelliJClient.getProxyPasswordAuthentication, parameter prompt

java.util.concurrent.CompletionException: java.lang.NullPointerException: Parameter specified as non-null is null: method o.sl.ij.SonarLintIntelliJClient.getProxyPasswordAuthentication, parameter prompt
	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:649)
	at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.lang.NullPointerException: Parameter specified as non-null is null: method o.sl.ij.SonarLintIntelliJClient.getProxyPasswordAuthentication, parameter prompt
	at o.sl.ij.SonarLintIntelliJClient.getProxyPasswordAuthentication(SonarLintIntelliJClient.kt)
	at o.ss.sl.core.rpc.client.SonarLintRpcClientImpl.lambda$getProxyPasswordAuthentication$21(SonarLintRpcClientImpl.java:237)
	at o.ss.sl.core.rpc.client.SonarLintRpcClientImpl.lambda$requestAsync$1(SonarLintRpcClientImpl.java:103)

Environment:

  • Java: JetBrains s.r.o. 17.0.10
  • OS: Windows 10 amd64
  • IDE: IntelliJ IDEA 2023.3.4
  • SonarLint: 10.4.0.77904

Internal error: java.lang.NullPointerException: Parameter specified as non-null is null: method org.sonarlint.intellij.SonarLintIntelliJClient.getProxyPasswordAuthentication, parameter prompt

java.util.concurrent.CompletionException: java.lang.NullPointerException: Parameter specified as non-null is null: method o.sl.ij.SonarLintIntelliJClient.getProxyPasswordAuthentication, parameter prompt
	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:649)
	at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.lang.NullPointerException: Parameter specified as non-null is null: method o.sl.ij.SonarLintIntelliJClient.getProxyPasswordAuthentication, parameter prompt
	at o.sl.ij.SonarLintIntelliJClient.getProxyPasswordAuthentication(SonarLintIntelliJClient.kt)
	at o.ss.sl.core.rpc.client.SonarLintRpcClientImpl.lambda$getProxyPasswordAuthentication$21(SonarLintRpcClientImpl.java:237)
	at o.ss.sl.core.rpc.client.SonarLintRpcClientImpl.lambda$requestAsync$1(SonarLintRpcClientImpl.java:103)

Hello,

We recently released a new version containing a fix for this problem, could you update the plugin and give it a try?