SonarCloud | Appendices | Troubleshooting

Was this page helpful?

On this page

Start FreeLog in

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 SonarCloud app on fork

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

Please:

  1. Install the SonarCloud 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.

Please refer to our Pricing documentation.

Organization is suspended

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

Please refer to our Pricing documentation.

SonarCloud 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 SonarCloud again. 

Could not find an answer?

Please join our Community Forum and ask your questions.

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

Creative Commons License