I am trying to incorporate sonarscan into my github action pipeline but I kept running into this error
15:59:47.531 ERROR: Failed bootstrap index response: <!DOCTYPE html>
I have seen other questions and yes, I have checked my host URL.
here is the log:
INFO: Scanner configuration file: /opt/sonar-scanner/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
15:59:45.959 INFO: SonarScanner 4.8.0.2856
15:59:45.961 INFO: Java 11.0.19 Alpine (64-bit)
15:59:45.961 INFO: Linux 5.15.0-1037-azure amd64
15:59:46.166 DEBUG: keyStore is :
15:59:46.166 DEBUG: keyStore type is : pkcs12
15:59:46.166 DEBUG: keyStore provider is :
15:59:46.166 DEBUG: init keystore
15:59:46.167 DEBUG: init keymanager of type SunX509
15:59:46.358 DEBUG: Create: /opt/sonar-scanner/.sonar/cache
15:59:46.359 INFO: User cache: /opt/sonar-scanner/.sonar/cache
15:59:46.360 DEBUG: Create: /opt/sonar-scanner/.sonar/cache/_tmp
15:59:46.369 DEBUG: Extract sonar-scanner-api-batch in temp...
15:59:46.376 DEBUG: Get bootstrap index...
15:59:46.377 DEBUG: Download: ***/batch/index
15:59:47.529 DEBUG: Get bootstrap completed
15:59:47.531 ERROR: Failed bootstrap index response: <!DOCTYPE html>
<!--[if IE 7]><html lang="en" class="lt-ie10 lt-ie9 lt-ie8"><![endif]-->
<!--[if IE 8]><html lang="en" class="lt-ie10 lt-ie9"> <![endif]-->
<!--[if IE 9]><html lang="en" class="lt-ie10"><![endif]-->
<!--[if gt IE 9]><html lang="en"><![endif]-->
<!--[if !IE]><!--><html lang="en"><!--<![endif]-->
<head>
and here is the github action
sonarqube:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: SonarQube Scan
uses: sonarsource/sonarqube-scan-action@master
with:
projectBaseDir: basedir/
args: >
-Dsonar.cs.coverage.reportPaths=coverage.xml
-Dsonar.verbose=true
-Dsonar.projectKey=sample.project.key
-Dsonar.host.url=${{ secrets.SONAR_HOST_URL }}
-Dsonar.login=${{ secrets.SONAR_TOKEN }}
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
Is there any other solutions to resolve this issue other than changing the URL
ganncamp
(G Ann Campbell)
June 2, 2023, 2:09pm
2
Hi,
Welcome to the community!
The error is telling you that when analysis reached out to the server for the bootstrap bundle, instead of the expected JSON document, it got HTML. That indicates that the wrong URL was called. If there were a problem with permissions, it would show up later in the process.
So, sorry but there is no other answer than correcting the URL (or talking to your network folks to get them to stop blocking the calls).
Ann
Hi Ann,
I recently created the project, integrated SonarQube with GitHub, and followed the recommended steps for adding the token and URL provided by SonarQube. I’m also using GitHub Actions to automate the process
but i am still getting this error why when i places the given code suggestion from SonarQube
Failed bootstrap index response:
07:13:11.153 INFO: ------------------------------------------------------------------------
07:13:11.153 INFO: EXECUTION FAILURE
07:13:11.154 INFO: ------------------------------------------------------------------------
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon-180x180.png">
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<meta name="application-name" content="SonarQube" />
<meta name="msapplication-TileColor" content="#FFFFFF" />
<meta name="msapplication-TileImage" content="/mstile-512x512.png" />
<title>SonarQube</title>
<link rel="stylesheet" href="/js/out3R4RN4OS.css" />
</head>
<body>
<div id="content" data-base-url="" data-server-status="UP" data-instance="SonarQube" data-official="true">
<div class="global-loading">
<i class="global-loading-spinner"></i>
<span aria-live="polite" class="global-loading-text">Loading...</span>
</div>
</div>
<script type="module" src="/js/outKPHMGIVJ.js"></script>
</body>
</html>
07:13:11.155 INFO: Total time: 0.815s
07:13:11.174 INFO: Final Memory: 4M/24M
07:13:11.175 INFO: ------------------------------------------------------------------------
07:13:11.176 ERROR: Error during SonarScanner execution
ganncamp
(G Ann Campbell)
September 9, 2024, 3:04pm
4
Hi @Sri_Yeshwanth_E ,
You’ve resurrected a post that’s well over a year old.
Per the FAQ , please don’t do that. Please create a new thread with all your details.
Thx,
Ann