Resolving "Could not complete symbolic execution" error on Bitbucket Pipeline for Sonarqube builds
Platform Notice: Cloud Only - This article only applies to Atlassian apps on the cloud platform.
Summary
Upon integrating Sonarqube with Bitbucket Cloud for code scanning, during the builds, you observe that although all the tests are passed, sonarqube still throws an error.
09:00:15.815 DEBUG: Could not complete symbolic execution: reached limit of 16000 steps for method addressWithAddressHeading#1693 in class AddressParsing
09:00:16.037 DEBUG: Could not complete symbolic execution: reached limit of 16000 steps for method address1#811 in class AddressParsing
09:00:16.335 DEBUG: Could not complete symbolic execution: reached limit of 16000 steps for method addressGetWtihHeadingAddressFromTaggedValues#2140 in class AddressParsingCause
The Java analyzer could have caused the error, which detects new bugs and eventually fails even after actual tests are completed. A similar issue is tracked in the sonar community,
Source:
Solution
As a solution, please turn off the internal analyzer by adding '-Dsonar.internal.analysis.dbd=false' to mvn sonar command or EXTRA_ARGS in the pipe.
Example:
Using mvn command
mvn -X -q sonar:sonar -Dsonar.projectKey="$SONAR_PROJECT_KEY" -Dsonar.organization="$SONAR_ORGANIZATION" -Dsonar.branch.name="$BITBUCKET_BRANCH" -Dsonar.host.url="$SONAR_HOST_URL" -Dsonar.login="$SONAR_LOGIN" -Dsonar.internal.analysis.dbd=falseIn the case of pipe
- pipe: sonarsource/sonarqube-scan:2.0.1
variables:
SONAR_HOST_URL: ${SONAR_HOST_URL} # Get the value from the repository/workspace variable.
SONAR_TOKEN: ${SONAR_TOKEN} # Get the value from the repository/workspace variable. You shouldn't set secret in clear text here.
EXTRA_ARGS: '-Dsonar.internal.analysis.dbd=false'
# SONAR_SCANNER_OPTS: '<string>' # Optional
# DEBUG: '<boolean>' # OptionalIf the issue persists, kindly verify the pipe version you are using. We recommend you use the latest pipe version by visiting the below page.
Reference: https://bitbucket.org/sonarsource/sonarqube-scan/src/master/
If you are encountering issues following this documentation - please raise a support ticket or a community support ticket for further assistance.
Was this helpful?