Open in IDE doesn't work (Eclipse)

  • ALM used: GitHub
  • CI system used: Jenkins
  • Languages of the repository: Java/JS/TS
  • Eclipse: 2024-06
  • Error observed:
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.
  1. We see an error in the Eclipse mentioned above
  2. 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)
  3. Even issues inside that module cannot be opened in Eclipse, with the same error.

Hi,

Could we get the full log, please?

 
Thx,
Ann

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

Hello @lrozenblyum,

Thank you for your report. I confirm it looks like a regression around this feature.
Here’s the ticket.

Have a good day!

1 Like

Hello @lrozenblyum,

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:

  1. Find any existing issue in SonarQube for Eclipse.
  2. Make sure this code was already pushed and scanned by SonarCloud.
  3. Make sure you see this exact issue on SonarCloud interface.
  4. Corresponding file should not be opened in the Eclipse IDE to validate if Open in IDE fully works.
  5. 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.

Best regards,

Hello @Kirill_Knize!
I’ve started facing OOMs with SonarLint (see "Java heap space error" with SonarLint version 10.11 - #40 by lrozenblyum)

so it’s quesitonable whether I can now reproduce the issue ATM.
I’ll try to install SonarLint again and see if it’s possible to reproduce before OOM…

1 Like

Hello @Kirill_Knize

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.

  1. 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

  2. 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

  1. 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.