Start FreeLog in
SonarQube Cloud | Appendices | Troubleshooting

Troubleshooting

Code repository platform authentication error

An error occurred when trying to communicate with your code repository platform. To resolve this issue, you need to:

  1. Review the authentication settings and the app configuration in your code repository platform (for GitHub and Bitbucket).
  2. Try again; make a change in your repository, commit and push to trigger a new analysis.

Code repository platform error

An error occurred with your code repository platform.

Try again; make a change in your repository, commit, and push to trigger a new analysis.

Missing SonarQube Cloud app on fork

An error occurred when analyzing a pull request from a private forked repository.

Please:

  1. Install the SonarQube Cloud application on the forked repository.
  2. Commit and push in your pull request to trigger a new analysis.

Compute engine timeout

Your analysis took too long and reached our timeout of 30 minutes.

Please refer to the 'Getting Started' guide for your code repository and try to scan your project using another CI tool.

Number of lines exceeds your organization plan

You tried to analyze more lines than are available through your organization plan. You need to upgrade the plan for your organization.

See Managing your subscription.

Organization is suspended

Your organization has been suspended. You need to update the billing information for your organization.

See Updating billing or payment details.

Quality gate condition is ignored

Conditions on Coverage and Duplicated lines are not calculated when there are fewer than 20 lines. 

For example, if you want to release a simple bug fix that requires only a couple of lines, it could be impossible to release because you can't meet your coverage requirement. Another case could be you start working on a new version, and the first few lines of code that are pushed are involved in a duplication; your quality gate will be red until more lines are added.

Users unable to use groups (SAML group number over 150)

You use SAML with Microsoft Entra ID and some users are automatically removed from groups. This may mean that you have reached the SAML group limitation (for these users, the groups claim is replaced by http://schemas.microsoft.com/claims/groups.link). Microsoft Entra ID SAML tokens have a limit regarding the number of groups a user can belong to (see the description of groups in the Claims in SAML Token table).

In such cases, you might need to reduce the number of groups these users are in.

SonarQube Cloud Automatic Analysis

Automatic Analysis Timeout

Your analysis reached our timeout of 45 minutes.

Please refer to the 'Getting Started' guide for your code repository and try to scan your project using another CI tool.

Out of memory

Memory capacity has been exceeded during the analysis of your project.

Please refer to the 'Getting Started' guide for your code repository and try to scan your project using another CI tool.

Configuration issues

Scanner configuration error

Your .sonarcloud.properties file contains a configuration issue that has caused the analysis of your project to fail. 

To fix this configuration issue, either:

  • Ensure that the user-defined source path is not absolute, for example,  sonar.sources=/etc/conf, or; 
  • Ensure that the user-defined source path is not defined to access the outside of the bound, for example,  sonar.sources=../../xyz.

Conflicting file matches pattern

A file extension has been configured for multiple languages.

To fix this configuration issue, either:

  • Edit your sonar-project.properties file and update the *.suffixes patterns, or;
  • At the project level, go to Administration > General Settings, select the Languages tab, and fix the patterns in the languages you previously configured.

Encoding error

Your .sonarcloud.properties file contains an encoding error or can not be read correctly.

Please make sure that the encoding of the .sonarcloud.properties file is UTF-8.

Encoding is invalid

The value provided for sonar.sourceEncoding is invalid.

Please provide a valid value, commit and push to trigger a new analysis.

Invalid ignore issues all file regex

The pattern to ignore all issues (except the ones from the common repository) on files is not correct.

At the project level, go to Administration > General Settings, select the Analysis Scope tab, and fix the regular expression used for Ignore Issues on Files.

Invalid ignore issues block regex

The patterns to ignore all issues (except the ones from the common repository) on specific blocks of code are not correct.

At the project level, go to Administration > General Settings, select the Analysis Scope tab, and fix the regular expressions used for start/end of block used for Ignore Issues in Blocks.

Source and tests files overlap

The patterns for the source and test files are part of the same element creating an unpermitted overlap. Please verify the configuration in your .sonarcloud.properties file:

# Path to sources
#sonar.sources=.
#sonar.exclusions=
#sonar.inclusions=
 
# Path to tests
#sonar.tests=
#sonar.test.exclusions=
#sonar.test.inclusions=

Project is not found

The project was not found due to permission issues. Please verify that:

  • the sonar.projectKey and sonar.organization properties are properly configured in your .sonarcloud.properties file. 
  • your SONAR_TOKEN is available to analysis (by passing it as an environment variable for example) and issued by a user with execute analysis permission on the project.

For example, when using GitHub Actions, make sure that the SONAR_TOKEN environment variable:

  •  is properly configured in GitHub under Your organization > Your repository > Settings > Security > Actions > Repository secrets
  • is used in your GitHub Actions workflow run: 
env:
          SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

Source files are not found

One or more patterns targeting source files lead to a non-existent directory. Please verify this part of the configuration in your .sonarcloud.properties file:

# Path to sources
#sonar.sources=.
#sonar.exclusions=
#sonar.inclusions=

Test files are not found

One or more patterns targeting test files lead to a non-existent directory. Please verify this part of the configuration in your .sonarcloud.properties file:

# Path to tests
#sonar.tests=
#sonar.test.exclusions=
#sonar.test.inclusions=

VPN use

The presence of a VPN client on the machine running the analysis may cause the analysis of your project to fail. If you receive a failure message, disable the VPN on the device and log in to SonarQube Cloud again. 

Error when analyzing files with non-ASCII characters in the name

When analyzing files with non-ASCII characters in the name, if the Malformed input or input contains unmappable characters error is raised then you should make sure that the environment variables LC_ALL and LANG are properly set before running the analysis as shown below.

export LC_ALL="en_US.UTF-8"
export LANG="en_US.UTF-8"

Could not find an answer?

Please join our Community Forum and ask your questions.


Was this page helpful?

© 2008-2024 SonarSource SA. All rights reserved. SONAR, SONARSOURCE, SONARQUBE, and CLEAN AS YOU CODE are trademarks of SonarSource SA.

Creative Commons License