SonarLint for Eclipse (v:4.0.0.2018.10170711) fails to bind to local SonarQube

sonarlint

(Paul Wagland) #1

Template for a good bug report, formatted with Markdown:

  • Versions used:
  • SonarLint: 4.0.0.2018.10170711
  • SonarQube: 7.1
  • error observed:
    After binding: you get the following error popup:
'Update SonarLint binding data for project <project> on <server>' has encountered a problem.

Unable to update SonarLint binding data for project '<project>' on '<server>'

Details:
Unable to update SonarLint binding data for project '<project>' on '<server>'
Fail to request https://<server>/api/components/tree.protobuf?qualifiers=FIL&component=<project>&ps=500&p=1

And later, we get the error:

'Check for updates of binding data on SonarQube/SonarCloud' has encountered a problem.

An internal error occurred during: "Check for updates of binding data on SonarQube/SonarCloud".

Details:
An internal error occurred during: "Check for updates of binding data on SonarQube/SonarCloud".
No data stored for project '<project>' or invalid format. Please update the binding.

Sonarlint console output:

Starting SonarLint for Eclipse 4.0.0.201810170711
Trigger: STARTUP
Error during execution of SonarLint analysis
org.sonarsource.sonarlint.core.client.api.exceptions.StorageException: Failed to read file: /Users/<user>/work/src/main-workspace/.sonarlint/storage/<server>/projects/<project>/configuration.pb
	at org.sonarsource.sonarlint.core.container.storage.ProtobufUtil.readFile(ProtobufUtil.java:46)
	at org.sonarsource.sonarlint.core.container.storage.StorageReader.readProjectConfig(StorageReader.java:98)
	at org.sonarsource.sonarlint.core.container.storage.StorageFileExclusions.getExcludedFiles(StorageFileExclusions.java:47)
	at org.sonarsource.sonarlint.core.container.storage.StorageContainerHandler.getExcludedFiles(StorageContainerHandler.java:110)
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.lambda$getExcludedFiles$12(ConnectedSonarLintEngineImpl.java:231)
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.withReadLock(ConnectedSonarLintEngineImpl.java:344)
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.withReadLock(ConnectedSonarLintEngineImpl.java:334)
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.getExcludedFiles(ConnectedSonarLintEngineImpl.java:231)
	at org.sonarlint.eclipse.core.internal.server.Server.getServerFileExclusions(Server.java:526)
	at org.sonarlint.eclipse.core.internal.utils.FileExclusionsChecker.lambda$2(FileExclusionsChecker.java:72)
	at java.base/java.util.Optional.ifPresent(Optional.java:183)
	at org.sonarlint.eclipse.core.internal.utils.FileExclusionsChecker.filterExcludedFiles(FileExclusionsChecker.java:70)
	at org.sonarlint.eclipse.core.internal.utils.FileExclusionsChecker.isExcluded(FileExclusionsChecker.java:84)
	at org.sonarlint.eclipse.core.internal.jobs.AbstractAnalyzeProjectJob.lambda$0(AbstractAnalyzeProjectJob.java:132)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
	at org.sonarlint.eclipse.core.internal.jobs.AbstractAnalyzeProjectJob.doRun(AbstractAnalyzeProjectJob.java:131)
	at org.sonarlint.eclipse.core.internal.jobs.AbstractSonarProjectJob.runInWorkspace(AbstractSonarProjectJob.java:44)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:42)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.nio.file.NoSuchFileException: /Users/<user>/work/src/main-workspace/.sonarlint/storage/<server>/projects/<project>/configuration.pb
	at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
	at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:215)
	at java.base/java.nio.file.Files.newByteChannel(Files.java:370)
	at java.base/java.nio.file.Files.newByteChannel(Files.java:421)
	at java.base/java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:420)
	at java.base/java.nio.file.Files.newInputStream(Files.java:155)
	at org.sonarsource.sonarlint.core.container.storage.ProtobufUtil.readFile(ProtobufUtil.java:43)
	... 18 more

Check for updates from server 'sonarqube.dev.rwd.lan'
Check for binding data updates on 'sonarqube.dev.rwd.lan' for project 'Cronacle'
Trigger: EDITOR_OPEN
Error during execution of SonarLint analysis
org.sonarsource.sonarlint.core.client.api.exceptions.StorageException: Failed to read file: /Users/<user>/work/src/main-workspace/.sonarlint/storage/<server>/projects/<project>/configuration.pb
	at org.sonarsource.sonarlint.core.container.storage.ProtobufUtil.readFile(ProtobufUtil.java:46)
	at org.sonarsource.sonarlint.core.container.storage.StorageReader.readProjectConfig(StorageReader.java:98)
	at org.sonarsource.sonarlint.core.container.storage.StorageFileExclusions.getExcludedFiles(StorageFileExclusions.java:47)
	at org.sonarsource.sonarlint.core.container.storage.StorageContainerHandler.getExcludedFiles(StorageContainerHandler.java:110)
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.lambda$getExcludedFiles$12(ConnectedSonarLintEngineImpl.java:231)
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.withReadLock(ConnectedSonarLintEngineImpl.java:344)
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.withReadLock(ConnectedSonarLintEngineImpl.java:334)
	at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.getExcludedFiles(ConnectedSonarLintEngineImpl.java:231)
	at org.sonarlint.eclipse.core.internal.server.Server.getServerFileExclusions(Server.java:526)
	at org.sonarlint.eclipse.core.internal.utils.FileExclusionsChecker.lambda$2(FileExclusionsChecker.java:72)
	at java.base/java.util.Optional.ifPresent(Optional.java:183)
	at org.sonarlint.eclipse.core.internal.utils.FileExclusionsChecker.filterExcludedFiles(FileExclusionsChecker.java:70)
	at org.sonarlint.eclipse.core.internal.utils.FileExclusionsChecker.isExcluded(FileExclusionsChecker.java:84)
	at org.sonarlint.eclipse.core.internal.jobs.AbstractAnalyzeProjectJob.lambda$0(AbstractAnalyzeProjectJob.java:132)
	at java.base/java.util.Arrays$ArrayList.forEach(Arrays.java:4390)
	at org.sonarlint.eclipse.core.internal.jobs.AbstractAnalyzeProjectJob.doRun(AbstractAnalyzeProjectJob.java:131)
	at org.sonarlint.eclipse.core.internal.jobs.AbstractSonarProjectJob.runInWorkspace(AbstractSonarProjectJob.java:44)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:42)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.nio.file.NoSuchFileException: /Users/<user>/work/src/main-workspace/.sonarlint/storage/<server>/projects/<project>/configuration.pb
	at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
	at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:215)
	at java.base/java.nio.file.Files.newByteChannel(Files.java:370)
	at java.base/java.nio.file.Files.newByteChannel(Files.java:421)
	at java.base/java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:420)
	at java.base/java.nio.file.Files.newInputStream(Files.java:155)
	at org.sonarsource.sonarlint.core.container.storage.ProtobufUtil.readFile(ProtobufUtil.java:43)
	... 18 more
  • Reproduction: Bind a project
  • No known workaround

Version 3.6.0.201806071228 of SonarLint works fine.


(Paul Wagland) #2

We upgraded to SonarQube 7.4 in the hope that this would fix the issue, however we still have exactly the same problem.

Is there any additional information that we can give to help find a resolution for this issue? I have tried both token and username/password, and they both fail in exactly the same way.