Quality Gate page fails with "The component cannot be loaded"

Details:

- URL: https://sonarcloud.io/organizations/MYORG/quality_gates/show/MYID

- Browser: (Edge/Chrome)

- Repro: open Organization, click Quality Gates

Observed:

- Page appears to load but then replaced with error in red: “The component cannot be loaded”

- No API calls appear in Network tab

Expected:

- Quality Gate details should load

Notes:

- Happens consistently

- Restarted browser(s), cleared cache, tried Edge/Chrome (latest versions), logged out and in

Please DM me for specifics on our org or my username.

It’s to do with our Custom quality gate. We set it as default, so it is selected when the page loads. If I very quickly quick another gate before it tries to load our Custom gate, the page loads. So I think there’s something in our Custom gate that is causing your page to crash.

Hey @AndrewSharpe, thanks for reporting this and for sharing details over personal messages. I’ve checked with the devs and they believe that you have updated the “Dependency risk severity“ condition in the quality gate to be 0, which crashes the UI. A fix is underway!

You can use GET https://api.sonarcloud.io/quality-gates/conditions?qualityGateId=<id>to confirm this (spot which metric ID has a threshold=0). Then, as a workaround, use PATCH https://api.sonarcloud.io/quality-gates/conditions/<id> to update it to a correct value (for example: 4). After doing this, it should be again accessible via UI, where you can update it further.