Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An error occurred when viewing the risk analysis chart. #957

Open
lawrence8358 opened this issue Aug 29, 2024 · 4 comments
Open

An error occurred when viewing the risk analysis chart. #957

lawrence8358 opened this issue Aug 29, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@lawrence8358
Copy link

Describe the bug
This is an excellent package, but I’ve encountered some issues.

I’m using version 1.21.0 of the package to analyze code quality across different branches on SonarQube version 10.6. It does correctly display the analysis results for the newfeature branch.

However, I noticed that when I switch to the Measures tab, a 404 error appears, as shown in the screenshot below.

Upon inspecting the HTTP requests made by the API, I found that as long as the Branch parameter in the query is set to a non-default branch, it returns a 404 error (as shown in the screenshot below). How can I resolve this issue?

Thank you for your dedication to sharing this package. I appreciate it!

To Reproduce
Steps to reproduce the behavior:

  1. Navigate to a project with multiple branches.
  2. Switch to a different branch, e.g., newfeature.
  3. Select the Measures tab.
  4. Receive the error message.

Expected behavior
Correctly display the risk chart for that branch

Screenshots
image
image

Software Versions

  • SonarQube Version: [Version v10.6 (92116)]
  • Plugin Version: [1.21.0]

Additional context

  • Ubuntu Version: [24.04]
  • Docker Version: [Docker version 27.1.2, build d01f264]
@lawrence8358 lawrence8358 added the bug Something isn't working label Aug 29, 2024
@brother
Copy link

brother commented Aug 29, 2024

I can not repeat this problem.

@lawrence8358
Copy link
Author

lawrence8358 commented Aug 29, 2024

To add more context, I was able to reproduce the issue. In my project settings, the Project display name and Project Key are set differently (as shown).

Additionally, I’m using Azure DevOps CI for configuration, which may have caused this issue in an unexpected scenario.

image

The following screenshot shows the Azure DevOps settings. I only configured the Project Key, leaving the Project Name field blank.
image

@brother
Copy link

brother commented Aug 29, 2024

I have them both set (in sonar-project.properties, not using devops integration).

@mc1arke
Copy link
Owner

mc1arke commented Nov 17, 2024

I've tried to replicate this but can't do so from the steps provided - I'm not clear on what you're setting in Azure Devops (I don't know which screen you're on in the truncated screenshot), or potentially how to replicate this without the Azure DevOps integration.

Firstly, can you confirm what the content of the HTTP response you're getting contains? It's likely to tell you that a requested key doesn't exist, the branch doesn't exist, or that the target component doesn't exist.

Can you also confirm if the component in the URL matches the key of the project, or if this is a multi-module project with sub components?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants