HTTP 500 error when listing issues on SonarCloud

Hi everyone,

It’s my first day on SonarSource Community. :slight_smile:

We face an error in sonarcloud when listing the issues for a certain project. Here’s the URL: Issues - Lakehouse in hzpcgroup SonarCloud, a private project.

The problem started after I wrote a comment in Markdown for a particular issue under its Activity tab. The comment was multiline and contained a citation using the > (greater than) signs. I suspect those cause problems for SonarCloud, because my comment did not want to save by clicking the [ Comment ] button in the “Add a comment” modal window.

Using my brower’s DevTools I found that during page load, or after changing the search filters, a call it made to the search API “https://sonarcloud.io/api/issues/search?…” which fails as “HTTP 500 Internal Server Error” in case the particular issue is part of the search result with response content:

{"errors":[{"msg":"An unexpected error occurred. Please try again later."}]}

Filtering the search to exclude that issue and the listing works fine.

After some fiddling with the search API, I was able to list everything in my terminal (as JSON); I removed query param &additionalFields=_all, I guess it then does not include the comments of the issues. The problematic issue has key ‘AYmMNukYrF9s9xh59dLA’ entitled “Refactor this function to reduce its Cognitive Complexity from 42 to the 15 allowed.”

Does anyone have an idea how to delete or change that issue, so we can continue working? :slight_smile: Perhaps removing the problematic comment by ‘https://sonarcloud.io/api/issues/delete_comment’ (I cannot list the comments, well because issues).

Many thanks!

FWIW:

  • For this project, we use Azure DevOps.
  • Languages include Python, T-SQL, (and PowerShell).

Hey there.

Thanks for the in-depth report. I’ve flagged this for the right team. Thanks for your patience.

1 Like

Hi @hzpc-joostk

Welcome to the community!

I’m investigating the issue. At this point, the problem doesn’t seem to be related to > character usage.
I’ll come back to you as soon as I have more information.

In the meantime, what do you mean by my comment did not want to save by clicking the [ Comment ] button ? How did you save the comment then?

Anita

Hi Anita,

Thank you for your time. I guess I had also put a link to a private Teams channel or private Azure DevOps work item in there. If that is problematic, I can think of the API server trying to validate the link’s target (which it cannot without auth).

About saving the comment. I clicked [ Comment ] without effect a few times after giving up by clicking [ Cancel ], after which I was unable to reload the page. I meant to say; I was not able to save the comment in a flow that I expected: write, [ Comment ], modal closes and stored comment is shown. Instead, the modal did not disappear.

By the way, I get the following notification at bottom left when I try to open that issue of list all issues:
image

Joost

Hi @hzpc-joostk

I managed to reproduce the problem and I found the root cause.
We should be able to provide the fix need week

Anita

1 Like

Hi @hzpc-joostk

The fix just has been deployed.

We also realized that the blockquotes aren’t correctly formatted, we have an internal ticket to fix it in the future.

Hi Anita,

Thank you for your time and support.
I can confirm that we can list all issues again, including the ‘malicious’ one. :smiley:

Best regards,
Joost

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.