The required file cannot be found in the project '<module-name>'. Maybe it was already changed locally!
Steps to reproduce
Open any issue in SonarCloud.
Press ‘Open in IDE’ button.
We see an error in the Eclipse mentioned above
The error always mentions a single module from our multi-Module Maven project (have no idea how it was selected, yet it’s incorrect for all modules except 1)
Even issues inside that module cannot be opened in Eclipse, with the same error.
Elect best matching branch for project '<module name which has NO relation to the module of the file with the issue in SonarCloud>' among: develop
Best matching branch is: develop
GET 200 https://sonarcloud.io/api/issues/search.protobuf?issues=AZUYNk2ZaGX_KSaVoESZ&componentKeys=<project key>&ps=1&p=1&branch=develop | response time=227ms
GET 200 https://sonarcloud.io/api/sources/raw?key=<project key>%3A<path to Java file>&branch=develop | response time=126ms
The mistake is already on the first line - the module name has no relation to the actual module of the multi-module project of the Java class with the issue that I clicked
I’m investigating this issue and I’d like to clarify couple moments:
If you manually open the file in Eclipse, do you see that exact issue you are trying to open from the SonarCloud?
If no, can you please try to find any issue you have both on SonarQube for Eclipse and SonarCloud and try to Open it in IDE from SounarCloud?
Just to make sure about actions sequence, I’m sorry if it’s redundant:
Find any existing issue in SonarQube for Eclipse.
Make sure this code was already pushed and scanned by SonarCloud.
Make sure you see this exact issue on SonarCloud interface.
Corresponding file should not be opened in the Eclipse IDE to validate if Open in IDE fully works.
Try to open issue in IDE. Validate if file was opened in IDE and you see issue there.
After some testing it looks to me that it works for the case described above. And errors you see are sort of valid, but they don’t explain the situation very well. Let’s first confirm we are on the same page and then proceed.
Step by step I executed the actions you proposed and I see the same behavior as before.
Please let me know if I can provide some additional information.
develop is our main branch. it has been analyzed in SonarQube Cloud.
I opened the develop branch in Eclipse just to be consistent during execution of the steps you suggested. No luck
SonarQube console is already wrong in its first statement
Elect best matching branch for project '<random module name>' among: develop
The module mentioned here has nothing to do with the file which issue I clicked
We have a multi-module Maven project with the following structure
Parent/pom.xml
Module1/pom.xml
SomeFolder/Module2/pom.xml
(etc, >100 modules on different levels)
I guess there is something wrong in detection of the module to which the file with the issue belongs.