SonarLint Connected Mode Throws 404 Error - Branch Name Issue

  • Operating system: Mac OS
  • SonarLint plugin version: v3.9.0
  • Programming language you’re coding in: Typescript, Ruby, Python
  • Is connected mode used: Connected to SonarQube Enterprise edition version

I am working on setting up the SonarLint connected mode between our SonarQube Hosted instance and the SonarLint plugin for VsCode. Running into a 404 issue when connected mode is setup and trying to pull down the issues for the connected project.

Caused by: org.sonarsource.sonarlint.core.serverapi.exception.NotFoundException: Error 404 on<projectKey>&branchName=master&languages=apex,c,cpp,web,java,js,php,plsql,py,secrets,ts,xml,yaml

I noticed that the url parameter branchName is referencing master however all our default branches are pointed to main in Github and in our SonarQube instance for all our projects. When I change the branchName to main and make a Get request to the url I am able to see the issues display for the projectKey. However I am not seeing any way to update the branchName as it looks like SonarLint is in charge of deciding what the default branchName is but it not picking up the correct branch to analyze thus throwing the 404. Is there any way to resolve this issue?

1 Like

Hello, thanks for reporting this issue!

This should be fixed in version 3.10 that was released earlier today (see JIRA for the matching ticket).

1 Like