I have issues binding sonarlint to my project on sonarcloud from Eclipse.
I am unable to successfully locate my project in the “Choose SonarQube/SonarCloud project” dialog. My project is a private project within a organization.
I do not observe exceptions or failures in logs only the “ProjectNotFoundException” when entering the project key manually. It looks like the plugin do not search within my organization. I am able to manually call the search api with the organization parameter and successfully get my project in the search result.
Anybody have experience with something like this?
I have the same problem with Eclipse 4.12 / SonarLint for Eclipse 4.1.0.201901311043
I can connet to SonarCloud, but none of my projets are found for binding (private projects on an organization)
I just tried to reproduce with Eclipse 2019-06 (4.12.0) and the latest SonarLint (4.1.0.201901311043) on Linux and got it to work - and I have to admit that even with a good knowledge of the ecosystem, I did not find it straightforward. And for the record, yes we do have private projects on SonarCloud - eating our own dogfood
I tried to write a step-by-step guide below since I did not find any available online, neither here nor on the official website; at the very least, it should give us a basis for investigation.
If I understand correctly, your private projects don’t appear at step 11 - can you please confirm?
Thanks!
Step-by-step guide below
–
1 - Right click on your project in the Project Explorer, find the “SonarLint > Bind to SonarQube or SonarCloud…” menu
Hi I have the same issue and it is related to Private Projects on sonarcloud.io. With public projects on sonarcloud it works perfect.
When I enter manually the project key I got
Unable to update SonarLint binding data for project ‘XXXX_XXXXXXX’ on ‘sonarcloud’
Project with key ‘XXXX_XXXXXXX’ not found on SonarQube server (was it deleted?)
XXXX_XXXXXXX (had to mask our org and project)
with intellj and sonarlint the same private project works.
Is there a fix planned or already available on a milestone update site?
SonarLint for Eclipse 4.1.0.201901311043 org.sonarlint.eclipse.feature.feature.group SonarSource
Spring Tool Suite 4
Version: 4.2.2.RELEASE
Build Id: 201905232009
We are trying to understand what could explain the difference between the behavior we observe and the one reported in this thread, so I think it is a bit premature to talk about planning/releasing a fix.
One thing that looks suspicious to me is the error message that you mention:
Project with key ‘XXXX_XXXXXXX’ not found on SonarQube server (was it deleted?)
This error message is only used when the provided organization key is null, and this parameter is required when connecting to SonarCloud. You should see the following error message instead:
Project with key ‘XXXX_XXXXXXX’ in organization ‘YYYY’ not found on SonarQube server (was it deleted?)
I am suspecting an issue with the persistence of server-related preferences, could you please check the contents of file: <workspaceDir>/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.sonarlint.eclipse.core.prefs? You should see something like below:
Thanks for answering. In my case after I paste my authentication token the screen “SonarQube Server Organization” is never shown - no matter if I choose connectiontype sonarcloud or sonarqube. So I cannot choose organization. Could this behaviour be related to some setting on sonarcloud that I missed?
Hi, same as Jess here : I do not have the “SonarQube server organization” page.
When modifying config file to indicate the organization (Via .metadata/.plugins/org.eclipse.core.runtime/.settings, I see all my organization’s projects.
The problem seems to be with the configuration interface of the connection to SonarCloud.
Hi, I had the exact same issue, and manage to resolve it by adding manually the line
servers/SonarCloud%2FXXX/org=XXX
in the settings file mentionned by Jean-Baptiste
So for me this is a bug of the SonarLint eclipse plugin, not adding this line.
Note: As Jess, the screen to enter the organisation was not shown, which may be the cause
I think I understand the issue.
To confirm, could you please open the following URL in your web browser (after login in to SonarCloud): https://sonarcloud.io/api/organizations/search?member=true. I expect you will only be a member of one single organization. The screen would appear if you were a member of more than one organization.
I created a ticket: https://jira.sonarsource.com/browse/SLE-315