ERROR Error during SonarScanner CLI execution
java.lang.IllegalStateException: Failed to get server version'
'Caused by: java.lang.IllegalArgumentException: Expected URL scheme 'http' or 'https' but no scheme was found for /api/s...
at okhttp3.HttpUrl$Builder.parse$okhttp(HttpUrl.kt:1261)
at okhttp3.HttpUrl$Companion.get(HttpUrl.kt:1634)
at okhttp3.Request$Builder.url(Request.kt:184)
at org.sonarsource.scanner.lib.internal.http.ScannerHttpClient.callUrl(ScannerHttpClient.java:142)
at org.sonarsource.scanner.lib.internal.http.ScannerHttpClient.callApi(ScannerHttpClient.java:126)
at org.sonarsource.scanner.lib.internal.http.ScannerHttpClient.callWebApi(ScannerHttpClient.java:112)
at org.sonarsource.scanner.lib.ScannerEngineBootstrapper.getServerVersion(ScannerEngineBootstrapper.java:192)
... 3 common frames omitted'
Steps to reproduce - GutHub actions attempted to run sonarsource/sonarcloud-github-action@master
Potential workaround - For now we can just reduce the version to v3.0.0
Code is stored in GitHub. We are using GitHub actions to build an npm library that we use for our application. As you can see when we try to run the new version of sonarsource/sonarcloud-github-action@master we get the issue above. Code is open source, so you should be able to see the workflow file here: ccd-case-ui-toolkit/.github/workflows/npmpublish.yml at master · hmcts/ccd-case-ui-toolkit · GitHub
We changed the default value of the host to sonarcloud.io, unifying the way for configuring the host URL as the source of truth. If not set, we default to sonarcloud.io, so no further host configuration is required on your end unless you want to interact with a different host or sonarqube for some testing purposes.
Also it is an option to set specifically to https://sonarcloud.io if you wish to enforce the property.
Previous behavior was limiting this ability and always overriding the user input via CLI/Env variables, but that is not in line with sonar.scanner configuration.