Open in IDE don't work

Hi, i have a java, specifically SAP CC (hybris), project on Intellij 2024.2.3 Community, and a local server for sonarQube connected with SonarLint 10.12.0.79769

I’m trying to use the Open in IDE feature on file with issues but it does not work, in the sonarqube page it just say “Success. Switch to your IDE to see the issue.” but on the IDE the file won’t open.

Hello @Alessandro_Palladino, thank you for reaching out to us about this!

When you press the Open in IDE button, do you receive any notification or feedback in your IDE?

Usually, it should create a connection (if not done) and bind the project to your SonarQube instance. Then, it will open the file and trigger an analysis to find the corresponding issue. If no issue is found, it will try to manually locate where the issue is, match the code, and open the corresponding issue description.

Does it fail at any of the steps I mentioned above?

It would also help if you could share the SonarLint logs with us and you try the feature, thanks!

1 Like

Hello,
i receive this notification in the IDE
(i will hide some info with xxx)

Unable to open finding. Cannot find the file: custom\xxxxfacades\src\com\xxxxx\xxxxx\facades\order\xxxxxxCartFacade.java

and the console logs this:

 [2024-11-11T15:49:42.279] [Show Issue or Hotspot Request Handler] DEBUG sonarlint - Assist connection and binding if needed for project xxxxx and server http://localhost:9000
 [2024-11-11T15:49:42.416] [Show Issue or Hotspot Request Handler] DEBUG sonarlint - GET 200 http://localhost:9000/api/issues/search.protobuf?issues=bf613ba1-3b84-44df-8c68-4b3fe2294e61&componentKeys=xxxxxx&ps=1&p=1&branch=develop | response time=137ms
 [2024-11-11T15:49:42.527] [Show Issue or Hotspot Request Handler] DEBUG sonarlint - GET 200 http://localhost:9000/api/sources/raw?key=xxxxxx%3Acustom%2Fxxxxxfacades%2Fsrc%2Fcom%2Fxxxxxx%2Fxxxxxx*%2Ffacades%2Forder%2FxxxxxxCartFacade.java&branch=develop | response time=110ms

Do you know if this file actually exists and matches the path? To be sure, you can close all your projects and keep the relevant ones open. Also, make sure you are on the right branch.

this is the absolute path of the file, as you can see from \custom they match
C:\dev\xxxxx\sap-cc-xxxxx\core-customize\hybris\bin\custom\xxxxxfacades\src\com\xxxxxx\xxxxxxx\facades\order\xxxxxCartFacade.java

and yes this one is the only open project and i’m on the same branch of the last scan

Hi @Alessandro_Palladino, which SQ version are you using?

Hi, SonarQube Community 10.7.0.96327

Could you delete the project on SQ, delete all the connections in the IDE, run SQ analysis and trigger Open in IDE again, and let me know if it works this way?

Unfortunately not, it doesn’t work

Hi, I see you have shared some logs. Are they the full logs? If not could you share the full logs
Are there any special characters where it was replaced with “xxx” ?
Could you go to developer tools on the browser, clear the console and share what is there when open in ide is triggered?

Thank you

yes they’re the full logs that appear when i click open in ide, if i clean the console that’s what show up
no special character where i replaced with xxx
this is the console in the browser when i click open in ide, it throws some errors

and the last two have this error:

is necessary to run SonarQube on a devOps Platform to use this feature?

Hi @Alessandro_Palladino ,

I don’t think it is the root cause here. Could you create a simple project called open-ide, analyze it locally, and try this again? I would like to know if it is a project-specific issue or a general one in your environment