Good day,
I am running SonarQube in azure environment for analyze C++ project and I got the error. Would you please help and explain how to fix it.
Starting: SonarQubeAnalyze
==============================================================================
Task : Run Code Analysis
Description : Run scanner and upload the results to the SonarQube server.
Version : 5.20.0
Author : sonarsource
Help : Version: 5.20.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)
==============================================================================
openssl config failed: error:25078067:DSO support routines:win32_load:could not load the shared library
C:\Windows\system32\cmd.exe /D /S /C "C:\agent\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\5.20.0\sonar-scanner\bin\sonar-scanner.bat"
##[error]NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED
NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED
INFO: Scanner configuration file: C:\agent\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\5.20.0\sonar-scanner\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: C:\agent\_work\4\s\sonar-project.properties
INFO: SonarScanner 4.8.1.3023
INFO: Java 17.0.10 Microsoft (64-bit)
at jdk.proxy1/jdk.proxy1.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
at org.sonarsource.scanner.cli.Main.execute(Main.java:126)
at org.sonarsource.scanner.cli.Main.execute(Main.java:81)
at org.sonarsource.scanner.cli.Main.main(Main.java:62)
##[error]Caused by: java.nio.file.NoSuchFileException: C:\agent\_work\4\s\bw_output\build-wrapper-dump.json
at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
at java.base/sun.nio.fs.WindowsFileSystemProvider.newByteChannel(WindowsFileSystemProvider.java:236)
at java.base/java.nio.file.Files.newByteChannel(Files.java:380)
at java.base/java.nio.file.Files.newByteChannel(Files.java:432)
at java.base/java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:422)
at java.base/java.nio.file.Files.newInputStream(Files.java:160)
at java.base/java.nio.file.Files.newBufferedReader(Files.java:2922)
at java.base/java.nio.file.Files.newBufferedReader(Files.java:2955)
at com.sonar.cpp.plugin.BuildWrapperJsonReader.getReader(BuildWrapperJsonReader.java:95)
at com.sonar.cpp.plugin.BuildWrapperJsonReader.readCaptures(BuildWrapperJsonReader.java:56)
... 34 more
ERROR:
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
Caused by: java.nio.file.NoSuchFileException: C:\agent\_work\4\s\bw_output\build-wrapper-dump.json
at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
at java.base/sun.nio.fs.WindowsFileSystemProvider.newByteChannel(WindowsFileSystemProvider.java:236)
at java.base/java.nio.file.Files.newByteChannel(Files.java:380)
at java.base/java.nio.file.Files.newByteChannel(Files.java:432)
at java.base/java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:422)
at java.base/java.nio.file.Files.newInputStream(Files.java:160)
at java.base/java.nio.file.Files.newBufferedReader(Files.java:2922)
at java.base/java.nio.file.Files.newBufferedReader(Files.java:2955)
at com.sonar.cpp.plugin.BuildWrapperJsonReader.getReader(BuildWrapperJsonReader.java:95)
at com.sonar.cpp.plugin.BuildWrapperJsonReader.readCaptures(BuildWrapperJsonReader.java:56)
... 34 more
ERROR:
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
##[error]The process 'C:\agent\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\5.20.0\sonar-scanner\bin\sonar-scanner.bat' failed with exit code 1
Finishing: SonarQubeAnalyze
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at jdk.proxy1/jdk.proxy1.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
at org.sonarsource.scanner.cli.Main.execute(Main.java:126)
at org.sonarsource.scanner.cli.Main.execute(Main.java:81)
at org.sonarsource.scanner.cli.Main.main(Main.java:62)
Caused by: java.nio.file.NoSuchFileException: C:\agent\_work\15\s\bw_output\build-wrapper-dump.json
##[error]at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
at java.base/sun.nio.fs.WindowsFileSystemProvider.newByteChannel(WindowsFileSystemProvider.java:236)
at java.base/java.nio.file.Files.newByteChannel(Files.java:380)
at java.base/java.nio.file.Files.newByteChannel(Files.java:432)
at java.base/java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:422)
at java.base/java.nio.file.Files.newInputStream(Files.java:160)
at java.base/java.nio.file.Files.newBufferedReader(Files.java:2922)
at java.base/java.nio.file.Files.newBufferedReader(Files.java:2955)
at com.sonar.cpp.plugin.BuildWrapperJsonReader.getReader(BuildWrapperJsonReader.java:95)
at com.sonar.cpp.plugin.BuildWrapperJsonReader.readCaptures(BuildWrapperJsonReader.java:56)
... 34 more
ERROR:
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
at java.base/sun.nio.fs.WindowsFileSystemProvider.newByteChannel(WindowsFileSystemProvider.java:236)
at java.base/java.nio.file.Files.newByteChannel(Files.java:380)
at java.base/java.nio.file.Files.newByteChannel(Files.java:432)
at java.base/java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:422)
at java.base/java.nio.file.Files.newInputStream(Files.java:160)
at java.base/java.nio.file.Files.newBufferedReader(Files.java:2922)
at java.base/java.nio.file.Files.newBufferedReader(Files.java:2955)
at com.sonar.cpp.plugin.BuildWrapperJsonReader.getReader(BuildWrapperJsonReader.java:95)
at com.sonar.cpp.plugin.BuildWrapperJsonReader.readCaptures(BuildWrapperJsonReader.java:56)
... 34 more
ERROR:
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
##[error]The process 'C:\agent\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\5.20.0\sonar-scanner\bin\sonar-scanner.bat' failed with exit code 1
Finishing: SonarQubeAnalyze
Are you actually running the build wrapper in your pipeline?
not yet because I would like to make pipeline works first and add build wrapper after this.
I did try to add build wrapper and I saw it is using unzip and curl, windows 10 doesn’t have unzip, let me know please must I install cygwin ?
Can you share your Azure Pipelines YML file?
Yes, I would like to send it by PM or email.