Can't authenticate with a SonarCloud token on PyCharm 2023.2

Side Note: Can authenticate, with a totally different UX, via VS Code.

Details:

* Operating system: MacOS V14.0 Beta
* SonarLint Version: 8.5.0.75082
* PyCharm Professional Edition: 2023.2

Logs:

GET 200 https://sonarcloud.io/api/system/status | response time=642ms
Downloaded server infos in 624ms
GET 200 https://sonarcloud.io/api/authentication/validate?format=json | response time=540ms
Error getting credentials for connection pycharm
java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Unknown connection: pycharm
	at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2096)
	at org.sonarsource.sonarlint.core.http.ConnectionAwareHttpClientProvider.getHttpClient(ConnectionAwareHttpClientProvider.java:48)
	at org.sonarsource.sonarlint.core.SonarLintBackendImpl.getHttpClient(SonarLintBackendImpl.java:138)
	at org.sonarlint.intellij.core.BackendService.getHttpClient(BackendService.kt:144)
	at org.sonarlint.intellij.config.global.ServerConnection.api(ServerConnection.java:178)
	at org.sonarlint.intellij.tasks.GetOrganizationsTask.run(GetOrganizationsTask.java:53)
	at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:428)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:115)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressSynchronously$9(CoreProgressManager.java:512)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$new$0(ProgressRunner.java:87)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:251)
	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:71)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:186)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:61)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:173)
	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:71)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$5(ProgressRunner.java:251)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$launchTask$18(ProgressRunner.java:465)
	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.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.IllegalArgumentException: Unknown connection: pycharm
	at org.sonarlint.intellij.SonarLintIntelliJClient.getCredentials(SonarLintIntelliJClient.kt:343)
	... 28 more

GET 401 https://sonarcloud.io/api/organizations/search.protobuf?member=true&ps=500&p=1 | response time=526ms

Hi @rijnhardtkotze, thank you for your report.

We effectively identified an issue when adding or editing a new connection to SonarCloud with version 8.5 of SonarLint, as explained in this thread. We will work on providing a patch as soon as possible.

In the meantime, and if that’s a blocker, we invite you to downgrade to the previous 8.4 version by following the steps to directly install the plugin from disk while we work on resolving the issues.