SonarQube analysis is failing for Android/Windows build using Azure DevOps

  1. SonarQube version - Developer Edition Version 8.3.1 (build 34397)
  2. Using MSBuild to run the analysis
  3. Build tasks - Cordova Build Windows & Cordova Build Android
  4. Azure pipelines agent version - Agent.Version 2.163.1 (Java, typescript is already installed)
  5. Run code analysis error logs -
    ##[error]18:08:32.289 ERROR: Error during SonarScanner execution
    ##[debug]Processed: ##vso[task.logissue type=error;]18:08:32.289 ERROR: Error during SonarScanner execution
    18:08:32.289 ERROR: Error during SonarScanner execution
    ##[error]org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarScanner analysis
    ##[debug]Processed: ##vso[task.logissue type=error;]org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarScanner analysis
    org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarScanner analysis
    ##[error]at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:85)
    ##[debug]Processed: ##vso[task.logissue type=error;]at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:85)
    at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:85)
    ##[error]at java.security.AccessController.doPrivileged(Native Method)
    ##[debug]Processed: ##vso[task.logissue type=error;]at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessController.doPrivileged(Native Method)
    ##[error]at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:74)
    at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:70)
    at org.sonarsource.scanner.api.EmbeddedScanner.doStart(EmbeddedScanner.java:185)
    at org.sonarsource.scanner.api.EmbeddedScanner.start(EmbeddedScanner.java:123)
    at org.sonarsource.scanner.cli.Main.execute(Main.java:73)
    at org.sonarsource.scanner.cli.Main.main(Main.java:61)
    Caused by: java.lang.IllegalStateException: INVALID HASH: File C:\Users\buildguru.sonar\cache_tmp\fileCache6904577873295027160.tmp was expected to have hash 984811763dbb846f90643a5859098dbc but was downloaded with hash a87e538e232ab74d01985d3616eebac8
    ##[debug]Processed: ##vso[task.logissue type=error;]at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:74)%0D%0A at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:70)%0D%0A at org.sonarsource.scanner.api.EmbeddedScanner.doStart(EmbeddedScanner.java:185)%0D%0A at org.sonarsource.scanner.api.EmbeddedScanner.start(EmbeddedScanner.java:123)%0D%0A at org.sonarsource.scanner.cli.Main.execute(Main.java:73)%0D%0A at org.sonarsource.scanner.cli.Main.main(Main.java:61)%0D%0ACaused by: java.lang.IllegalStateException: INVALID HASH: File C:\Users\buildguru.sonar\cache_tmp\fileCache6904577873295027160.tmp was expected to have hash 984811763dbb846f90643a5859098dbc but was downloaded with hash a87e538e232ab74d01985d3616eebac8
    at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:74)
    at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:70)
    at org.sonarsource.scanner.api.EmbeddedScanner.doStart(EmbeddedScanner.java:185)
    at org.sonarsource.scanner.api.EmbeddedScanner.start(EmbeddedScanner.java:123)
    at org.sonarsource.scanner.cli.Main.execute(Main.java:73)
    at org.sonarsource.scanner.cli.Main.main(Main.java:61)
    Caused by: java.lang.IllegalStateException: INVALID HASH: File C:\Users\buildguru.sonar\cache_tmp\fileCache6904577873295027160.tmp was expected to have hash 984811763dbb846f90643a5859098dbc but was downloaded with hash a87e538e232ab74d01985d3616eebac8
    ##[error]at org.sonarsource.scanner.api.internal.cache.FileCache.get(FileCache.java:87)
    ##[debug]Processed: ##vso[task.logissue type=error;]at org.sonarsource.scanner.api.internal.cache.FileCache.get(FileCache.java:87)
    at org.sonarsource.scanner.api.internal.cache.FileCache.get(FileCache.java:87)
    ##[error]at org.sonarsource.scanner.api.internal.JarDownloader.lambda$getScannerEngineFiles$0(JarDownloader.java:60)
    ##[debug]Processed: ##vso[task.logissue type=error;]at org.sonarsource.scanner.api.internal.JarDownloader.lambda$getScannerEngineFiles$0(JarDownloader.java:60)
    at org.sonarsource.scanner.api.internal.JarDownloader.lambda$getScannerEngineFiles$0(JarDownloader.java:60)
    ##[error]at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
    ##[debug]Processed: ##vso[task.logissue type=error;]at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
    at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
    ##[error]at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
    ##[debug]Processed: ##vso[task.logissue type=error;]at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
    at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
    ##[error]at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
    ##[debug]Processed: ##vso[task.logissue type=error;]at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
    ##[error]at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
    at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
    ##[debug]Processed: ##vso[task.logissue type=error;]at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)%0D%0A at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
    at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
    ##[error]at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    ##[debug]Processed: ##vso[task.logissue type=error;]at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    ##[error]at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
    ##[debug]Processed: ##vso[task.logissue type=error;]at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
    at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
    ##[error]at org.sonarsource.scanner.api.internal.JarDownloader.getScannerEngineFiles(JarDownloader.java:61)
    ##[debug]Processed: ##vso[task.logissue type=error;]at org.sonarsource.scanner.api.internal.JarDownloader.getScannerEngineFiles(JarDownloader.java:61)
    at org.sonarsource.scanner.api.internal.JarDownloader.getScannerEngineFiles(JarDownloader.java:61)
    ##[error]at org.sonarsource.scanner.api.internal.JarDownloader.download(JarDownloader.java:53)
    ##[debug]Processed: ##vso[task.logissue type=error;]at org.sonarsource.scanner.api.internal.JarDownloader.download(JarDownloader.java:53)
    at org.sonarsource.scanner.api.internal.JarDownloader.download(JarDownloader.java:53)
    ##[error]at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:76)
    … 7 more
    ##[debug]Processed: ##vso[task.logissue type=error;]at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:76)%0D%0A … 7 more
    at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:76)
    … 7 more
    Process returned exit code 1
    ##[error]The SonarScanner did not complete successfully
    ##[debug]Processed: ##vso[task.logissue type=error;]The SonarScanner did not complete successfully
    The SonarScanner did not complete successfully
    ##[error]18:08:32.476 Post-processing failed. Exit code: 1
    ##[debug]Processed: ##vso[task.logissue type=error;]18:08:32.476 Post-processing failed. Exit code: 1
    18:08:32.476 Post-processing failed. Exit code: 1
    ##[debug]Exit code 1 received from tool ‘D:\Builds_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.17.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe’
    ##[debug]STDIO streams have closed for tool ‘D:\Builds_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.17.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe’
    ##[debug]task result: Failed
    ##[error]The process ‘D:\Builds_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.17.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe’ failed with exit code 1
    ##[debug]Processed: ##vso[task.issue type=error;]The process ‘D:\Builds_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.17.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe’ failed with exit code 1
    ##[debug]Processed: ##vso[task.complete result=Failed;]The process ‘D:\Builds_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.17.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe’ failed with exit code 1
    Finishing: Run Code Analysis