Azure Devops: FileNotFoundException

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    • Sonarqube: Developer Edition Version 8.3.1
    • Sonarscanner: Version 4.9.0 (Azure Devops Plugin)
  • what are you trying to achieve
    • An Azure Devops Pipeline, which should scan a typescript project
  • what have you tried so far to achieve this
    • These are the tasks:
- task: SonarQubePrepare@4
    inputs:
      SonarQube: 'SonarQube JD Test'
      scannerMode: 'CLI'
      configMode: 'manual'
      cliProjectKey: 'SpaUi'
      cliSources: '$(System.DefaultWorkingDirectory)/SpaUI'
      extraProperties: 'sonar.verbose=true'

- Build everthing
 
- task: SonarQubeAnalyze@4

On other pipelines everthing works fine.
Here is the error output:

##[section]Starting: SonarQubeAnalyze
==============================================================================
Task         : Run Code Analysis
Description  : Run scanner and upload the results to the SonarQube server.
Version      : 4.9.0
Author       : sonarsource
Help         : Version: 4.9.0. This task is not needed for Maven and Gradle projects since the scanner should be run as part of the build.

[More Information](http://redirect.sonarsource.com/doc/install-configure-scanner-tfs-ts.html)
==============================================================================
[command]C:\Windows\system32\cmd.exe /D /S /C "V:\agent\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.9.0\sonar-scanner\bin\sonar-scanner.bat"
INFO: Scanner configuration file: V:\agent\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.9.0\sonar-scanner\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: NONE
11:06:44.870 INFO: SonarQube Scanner 4.2.0.1873
11:06:44.870 INFO: Java 1.8.0_251 Oracle Corporation (64-bit)
11:06:44.870 INFO: Windows 10 10.0 amd64
11:06:44.870 INFO: SONAR_SCANNER_OPTS=-Xmx1024m
11:06:45.136 DEBUG: keyStore is : 
11:06:45.136 DEBUG: keyStore type is : jks
11:06:45.136 DEBUG: keyStore provider is : 
11:06:45.136 DEBUG: init keystore
11:06:45.136 DEBUG: init keymanager of type SunX509
11:06:45.636 DEBUG: Create: C:\Users\BuildAdmin\.sonar\cache
11:06:45.636 INFO: User cache: C:\Users\BuildAdmin\.sonar\cache
11:06:45.636 DEBUG: Create: C:\Users\BuildAdmin\.sonar\cache\_tmp
11:06:45.636 DEBUG: Extract sonar-scanner-api-batch in temp...
11:06:45.636 INFO: ------------------------------------------------------------------------
11:06:45.636 INFO: EXECUTION FAILURE
11:06:45.636 INFO: ------------------------------------------------------------------------
11:06:45.636 INFO: Total time: 0.922s
11:06:45.652 INFO: Final Memory: 5M/241M
##[error]11:06:45.652 ERROR: Error during SonarQube Scanner execution
11:06:45.652 ERROR: Error during SonarQube Scanner execution
11:06:45.652 INFO: ------------------------------------------------------------------------
##[error]org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarQube
	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:85)
	at java.security.AccessController.doPrivileged(Native Method)
	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)
org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarQube
	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:85)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:74)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:70)
##[error]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: Fail to extract sonar-scanner-api-batch.jar
	at org.sonarsource.scanner.api.internal.JarExtractor.extractToTemp(JarExtractor.java:41)

	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: Fail to extract sonar-scanner-api-batch.jar
	at org.sonarsource.scanner.api.internal.JarExtractor.extractToTemp(JarExtractor.java:41)
##[error]at org.sonarsource.scanner.api.internal.JarDownloader.download(JarDownloader.java:52)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:76)
	... 7 more
	at org.sonarsource.scanner.api.internal.JarDownloader.download(JarDownloader.java:52)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:76)
	... 7 more
##[error]Caused by: java.nio.file.NoSuchFileException: C:\TEMP\sonar-scanner-api-batch1572572756071613207.jar
	at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
	at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
	at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
Caused by: java.nio.file.NoSuchFileException: C:\TEMP\sonar-scanner-api-batch1572572756071613207.jar
	at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
	at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
	at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
##[error]at sun.nio.fs.WindowsFileSystemProvider.newByteChannel(Unknown Source)
	at java.nio.file.Files.newByteChannel(Unknown Source)
	at java.nio.file.Files.createFile(Unknown Source)
	at java.nio.file.TempFileHelper.create(Unknown Source)
	at java.nio.file.TempFileHelper.createTempFile(Unknown Source)
	at sun.nio.fs.WindowsFileSystemProvider.newByteChannel(Unknown Source)
	at java.nio.file.Files.newByteChannel(Unknown Source)
	at java.nio.file.Files.createFile(Unknown Source)
	at java.nio.file.TempFileHelper.create(Unknown Source)
##[error]at java.nio.file.Files.createTempFile(Unknown Source)
	at org.sonarsource.scanner.api.internal.JarExtractor.extractToTemp(JarExtractor.java:34)
	... 9 more
11:06:45.667 ERROR: 
11:06:45.667 ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.

	at java.nio.file.Files.createTempFile(Unknown Source)
	at org.sonarsource.scanner.api.internal.JarExtractor.extractToTemp(JarExtractor.java:34)
	... 9 more
11:06:45.667 ERROR: 
11:06:45.667 ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
##[error]The process 'V:\agent\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.9.0\sonar-scanner\bin\sonar-scanner.bat' failed with exit code 1
##[section]Finishing: SonarQubeAnalyze

Need still help for this problem