Dear SonarSource Team,
My project has both C# and Javascript, I’d like to have both Javascript and C# code coverage reports appear in Sonar Cloud. Currently only C# coverage report is recognized, Javascript code coverage report is generated at “coverage/lcov.info” but the sonar scanner has issues with it as described below.
I am encountering an issue in my GitHub Actions workflow related to LCOV file path resolution. The error message states:
“Could not resolve file path. Unresolved paths: WebApplication\Scripts\operation.js”
My project includes both C# and JavaScript code. As part of the workflow, I run Jest tests to generate the lcov.info
file before executing the dotnet-sonarscanner.exe begin / end
steps. While C# code coverage is successfully uploaded and visible in SonarCloud, the JavaScript coverage report is not recognized, likely due to the unresolved file path error.
To assist with troubleshooting, I have included:
- The source code link (public repository: GitHub - nguyen365-build/sonarcloud_csharp_javascript).
- **The full GitHub Actions workflow **: below.
- Runner log: windows10pro · nguyen365-build/sonarcloud_csharp_javascript@97b9501 · GitHub
3s
Current runner version: '2.322.0'
Runner name: 'MACMINI64'
Runner group name: 'Default'
Machine name: 'MACMINI64'
GITHUB_TOKEN Permissions
Secret source: Actions
Prepare workflow directory
Prepare all required actions
Getting action download info
Download action repository 'actions/checkout@v4' (SHA:11bd71901bbe5b1630ceea73d27597364c9af683)
Download action repository 'microsoft/setup-msbuild@v2' (SHA:6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce)
Download action repository 'nuget/setup-nuget@v1' (SHA:296fd3ccf8528660c91106efefe2364482f86d6f)
Download action repository 'actions/setup-node@v4' (SHA:1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a)
Complete job name: build
6s
Run actions/checkout@v4
Syncing repository: nguyen365-build/sonarcloud_csharp_javascript
Getting Git version info
Temporarily overriding HOME='C:\actions-runner\_work\_temp\a605e12d-fb6e-41b7-bc89-1c627546f370' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
"C:\Program Files\Git\cmd\git.exe" config --global --add safe.directory C:\actions-runner\_work\sonarcloud_csharp_javascript\sonarcloud_csharp_javascript
"C:\Program Files\Git\cmd\git.exe" config --local --get remote.origin.url
https://github.com/nguyen365-build/sonarcloud_csharp_javascript
Removing previously created refs, to avoid conflicts
"C:\Program Files\Git\cmd\git.exe" submodule status
Cleaning the repository
Disabling automatic garbage collection
Setting up auth
Fetching the repository
Determining the checkout info
"C:\Program Files\Git\cmd\git.exe" sparse-checkout disable
"C:\Program Files\Git\cmd\git.exe" config --local --unset-all extensions.worktreeConfig
Checking out the ref
"C:\Program Files\Git\cmd\git.exe" log -1 --format=%H
97b950165fdb06919fe7e5332baee8dffb010be3
0s
Run microsoft/setup-msbuild@v2
"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -products * -requires Microsoft.Component.MSBuild -property installationPath -latest
C:\Program Files\Microsoft Visual Studio\2022\Enterprise
1s
Run nuget/setup-nuget@v1
Installed nuget.exe version 6.13.2
3s
Run nuget restore SonarCloud.CSharp.JavaScript.sln
MSBuild auto-detection: using msbuild version '17.13.15.12501' from 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin'.
Restoring NuGet package OpenCover.4.7.1221.
Restoring NuGet package MSTest.TestAdapter.2.2.10.
Restoring NuGet package Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1.
Restoring NuGet package MSTest.TestFramework.2.2.10.
Restoring NuGet package ReportGenerator.5.4.4.
Adding package 'MSTest.TestAdapter.2.2.10' to folder 'C:\actions-runner\_work\sonarcloud_csharp_javascript\sonarcloud_csharp_javascript\packages'
Adding package 'MSTest.TestFramework.2.2.10' to folder 'C:\actions-runner\_work\sonarcloud_csharp_javascript\sonarcloud_csharp_javascript\packages'
Adding package 'ReportGenerator.5.4.4' to folder 'C:\actions-runner\_work\sonarcloud_csharp_javascript\sonarcloud_csharp_javascript\packages'
Adding package 'Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1' to folder 'C:\actions-runner\_work\sonarcloud_csharp_javascript\sonarcloud_csharp_javascript\packages'
Adding package 'OpenCover.4.7.1221' to folder 'C:\actions-runner\_work\sonarcloud_csharp_javascript\sonarcloud_csharp_javascript\packages'
Added package 'OpenCover.4.7.1221' to folder 'C:\actions-runner\_work\sonarcloud_csharp_javascript\sonarcloud_csharp_javascript\packages'
Added package 'MSTest.TestFramework.2.2.10' to folder 'C:\actions-runner\_work\sonarcloud_csharp_javascript\sonarcloud_csharp_javascript\packages'
Added package 'MSTest.TestAdapter.2.2.10' to folder 'C:\actions-runner\_work\sonarcloud_csharp_javascript\sonarcloud_csharp_javascript\packages'
Added package 'Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1' to folder 'C:\actions-runner\_work\sonarcloud_csharp_javascript\sonarcloud_csharp_javascript\packages'
Added package 'ReportGenerator.5.4.4' to folder 'C:\actions-runner\_work\sonarcloud_csharp_javascript\sonarcloud_csharp_javascript\packages'
GET https://api.nuget.org/v3/vulnerabilities/index.json
OK https://api.nuget.org/v3/vulnerabilities/index.json 32ms
GET https://api.nuget.org/v3-vulnerabilities/2025.03.01.05.29.01/vulnerability.base.json
GET https://api.nuget.org/v3-vulnerabilities/2025.03.01.05.29.01/2025.03.01.05.29.01/vulnerability.update.json
OK https://api.nuget.org/v3-vulnerabilities/2025.03.01.05.29.01/vulnerability.base.json 58ms
OK https://api.nuget.org/v3-vulnerabilities/2025.03.01.05.29.01/2025.03.01.05.29.01/vulnerability.update.json 139ms
NuGet Config files used:
C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\NuGet\NuGet.Config
C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.FallbackLocation.config
C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.Offline.config
Feeds used:
C:\Windows\ServiceProfiles\NetworkService\.nuget\packages\
https://api.nuget.org/v3/index.json
C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\
Installed:
5 package(s) to packages.config projects
0s
Run actions/setup-node@v4
Found in cache @ C:\actions-runner\_work\_tool\node\18.20.7\x64
Environment details
5s
Run npm install
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
added 266 packages, and audited 267 packages in 4s
32 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
12s
Run npm test
> test
> jest --coverage
PASS WebApplication/Tests/operation.test.js
√ adds 1 + 2 to equal 3 (2 ms)
√ 3 - 2 to equal 1 (1 ms)
--------------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
--------------|---------|----------|---------|---------|-------------------
All files | 100 | 100 | 100 | 100 |
operation.js | 100 | 100 | 100 | 100 |
--------------|---------|----------|---------|---------|-------------------
Test Suites: 1 passed, 1 total
Tests: 2 passed, 2 total
Snapshots: 0 total
Time: 2.626 s
Ran all test suites.
0s
Run if (!(Test-Path "coverage\lcov.info")) {
JavaScript coverage file found at: coverage\lcov.info
1m 6s
Run $sonarScannerPath = (Get-ChildItem -Path C:\ -Recurse -Filter "dotnet-sonarscanner.exe" -ErrorAction SilentlyContinue -File | Select-Object -First 1).FullName
sonarScannerPath found at:
lcovInfoPath found at: C:\actions-runner\_work\sonarcloud_csharp_javascript\sonarcloud_csharp_javascript\coverage\lcov.info
Directory: C:\actions-runner\_work\sonarcloud_csharp_javascript\sonarcloud_csharp_javascript\.sonar
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 3/1/2025 2:49 PM scanner
You can invoke the tool using the following command: dotnet-sonarscanner
Tool 'dotnet-sonarscanner' (version '9.2.1') was successfully installed.
SonarScanner for MSBuild 9.2.1
Using the .NET Core version of the Scanner for MSBuild
Default properties file was found at C:\actions-runner\_work\sonarcloud_csharp_javascript\sonarcloud_csharp_javascript\.sonar\scanner\.store\dotnet-sonarscanner\9.2.1\dotnet-sonarscanner\9.2.1\tools\netcoreapp3.1\any\SonarQube.Analysis.xml
Loading analysis properties from C:\actions-runner\_work\sonarcloud_csharp_javascript\sonarcloud_csharp_javascript\.sonar\scanner\.store\dotnet-sonarscanner\9.2.1\dotnet-sonarscanner\9.2.1\tools\netcoreapp3.1\any\SonarQube.Analysis.xml
sonar.verbose=true was specified - setting the log verbosity to 'Debug'
Pre-processing started.
Preparing working directories...
Using environment variables to determine the download directory...
14:49:19.852 Loading analysis properties from C:\actions-runner\_work\sonarcloud_csharp_javascript\sonarcloud_csharp_javascript\.sonar\scanner\.store\dotnet-sonarscanner\9.2.1\dotnet-sonarscanner\9.2.1\tools\netcoreapp3.1\any\SonarQube.Analysis.xml
14:49:19.863 Server Url: https://sonarcloud.io
14:49:19.863 Api Url: https://api.sonarcloud.io
14:49:19.863 Is SonarCloud: True
14:49:19.865 WARNING: The sonar.sources and sonar.tests properties are not supported by the Scanner for .NET and are ignored. They are automatically computed based on your repository. You can fine-tune the analysis and exclude some files by using the sonar.exclusions, sonar.inclusions, sonar.test.exclusions, and sonar.test.inclusions properties.
14:49:19.868 No truststore provided; attempting to use the default location.
14:49:19.868 No truststore found at the default location; proceeding without a truststore.
14:49:19.87 sonar.verbose=true was specified - setting the log verbosity to 'Debug'
14:49:19.872 Updating build integration targets...
14:49:19.875 The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Microsoft\MSBuild\4.0\Microsoft.Common.targets\ImportBefore
14:49:19.875 The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Microsoft\MSBuild\10.0\Microsoft.Common.targets\ImportBefore
14:49:19.876 The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Microsoft\MSBuild\11.0\Microsoft.Common.targets\ImportBefore
14:49:19.876 The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Microsoft\MSBuild\12.0\Microsoft.Common.targets\ImportBefore
14:49:19.876 The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Microsoft\MSBuild\14.0\Microsoft.Common.targets\ImportBefore
14:49:19.876 The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Microsoft\MSBuild\15.0\Microsoft.Common.targets\ImportBefore
14:49:19.876 The file SonarQube.Integration.ImportBefore.targets is up to date at C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Microsoft\MSBuild\Current\Microsoft.Common.targets\ImportBefore
14:49:19.878 Installed SonarQube.Integration.targets to C:\actions-runner\_work\sonarcloud_csharp_javascript\sonarcloud_csharp_javascript\.sonarqube\bin\targets
14:49:19.878 Creating config and output folders...
14:49:19.879 Creating directory: C:\actions-runner\_work\sonarcloud_csharp_javascript\sonarcloud_csharp_javascript\.sonarqube\conf
14:49:19.879 Creating directory: C:\actions-runner\_work\sonarcloud_csharp_javascript\sonarcloud_csharp_javascript\.sonarqube\out
14:49:19.892 Downloading from https://sonarcloud.io/api/settings/values?component=unknown...
14:49:20.229 Response received from https://sonarcloud.io/api/settings/values?component=unknown...
14:49:20.23 Fetching server version...
14:49:20.231 Downloading from https://api.sonarcloud.io/analysis/version...
14:49:20.786 Response received from https://api.sonarcloud.io/analysis/version...
14:49:20.787 Downloading from https://api.sonarcloud.io/analysis/version failed. Http status code is Forbidden.
14:49:20.788 Downloading from https://sonarcloud.io/api/server/version...
14:49:21.08 Response received from https://sonarcloud.io/api/server/version...
14:49:21.081 Using SonarCloud.
14:49:21.082 SonarCloud detected, skipping server version check.
14:49:21.082 SonarCloud detected, skipping license check.
14:49:21.083 JreResolver: Resolving JRE path.
14:49:21.085 Downloading from https://api.sonarcloud.io/analysis/jres?os=windows&arch=x64...
14:49:21.37 Response received from https://api.sonarcloud.io/analysis/jres?os=windows&arch=x64...
14:49:21.429 JreResolver: Cache hit 'C:\Windows\ServiceProfiles\NetworkService\.sonar\cache\4bafe2e94439c8193fc8c68247cb0dbaf4e80265b903288f63f128304f129bbe\OpenJDK17U-jre_x64_windows_hotspot_17.0.11_9.zip_extracted\jdk-17.0.11+9-jre/bin/java.exe'.
14:49:21.431 Fetching analysis configuration settings...
14:49:21.432 Fetching properties for project 'nguyen365-build_sonarcloud_csharp_javascript'...
14:49:21.433 Downloading from https://sonarcloud.io/api/settings/values?component=nguyen365-build_sonarcloud_csharp_javascript...
14:49:21.824 Response received from https://sonarcloud.io/api/settings/values?component=nguyen365-build_sonarcloud_csharp_javascript...
14:49:21.869 Downloading from https://sonarcloud.io/api/languages/list...
14:49:21.99 Response received from https://sonarcloud.io/api/languages/list...
14:49:21.998 Fetching quality profile for project 'nguyen365-build_sonarcloud_csharp_javascript'...
14:49:21.998 Downloading from https://sonarcloud.io/api/qualityprofiles/search?project=nguyen365-build_sonarcloud_csharp_javascript&organization=365nguyen...
14:49:22.226 Response received from https://sonarcloud.io/api/qualityprofiles/search?project=nguyen365-build_sonarcloud_csharp_javascript&organization=365nguyen...
14:49:22.23 Fetching rules for quality profile 'AZBVg0aROQs_ZFLwarSl'...
14:49:22.23 Downloading from https://sonarcloud.io/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params,actives&ps=500&qprofile=AZBVg0aROQs_ZFLwarSl&p=1...
14:49:22.847 Response received from https://sonarcloud.io/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params,actives&ps=500&qprofile=AZBVg0aROQs_ZFLwarSl&p=1...
14:49:22.906 Local analyzer cache: C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp\.sonarqube\resources
14:49:22.907 Writing Roslyn generated ruleset to C:\actions-runner\_work\sonarcloud_csharp_javascript\sonarcloud_csharp_javascript\.sonarqube\conf\Sonar-cs.ruleset...
14:49:22.915 Writing Roslyn generated ruleset to C:\actions-runner\_work\sonarcloud_csharp_javascript\sonarcloud_csharp_javascript\.sonarqube\conf\Sonar-cs-none.ruleset...
14:49:22.918 Provisioning analyzer assemblies for cs...
14:49:22.918 Installing required Roslyn analyzers...
14:49:22.919 Processing plugin: securitycsharpfrontend version 10.11.0.34915
14:49:22.923 Cache hit: using plugin files from C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp\.sonarqube\resources\0
14:49:22.923 Processing plugin: csharpenterprise version 10.7.0.110445
14:49:22.923 Cache hit: using plugin files from C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp\.sonarqube\resources\1
3s
14s
45s
14:50:19.763 DEBUG: Skipping the file (ID '1448', path '/_/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyExecutionManagerWithDataCollection.cs', NO INDEXED PATH), line '146', visitCount '0' because file is not indexed or does not have the supported language. Verify sonar.sources in .sonarqube\out\sonar-project.properties.
14:50:19.764 DEBUG: Skipping the file (ID '1448', path '/_/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyExecutionManagerWithDataCollection.cs', NO INDEXED PATH), line '148', visitCount '0' because file is not indexed or does not have the supported language. Verify sonar.sources in .sonarqube\out\sonar-project.properties.
14:50:19.764 DEBUG: Skipping the file (ID '1448', path '/_/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyExecutionManagerWithDataCollection.cs', NO INDEXED PATH), line '148', visitCount '0' because file is not indexed or does not have the supported language. Verify sonar.sources in .sonarqube\out\sonar-project.properties.
14:50:19.764 DEBUG: Skipping the file (ID '1448', path '/_/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyExecutionManagerWithDataCollection.cs', NO INDEXED PATH), line '150', visitCount '0' because file is not indexed or does not have the supported language. Verify sonar.sources in .sonarqube\out\sonar-project.properties.
14:50:19.764 DEBUG: Skipping the file (ID '1448', path '/_/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyExecutionManagerWithDataCollection.cs', NO INDEXED PATH), line '148', visitCount '0' because file is not indexed or does not have the supported language. Verify sonar.sources in .sonarqube\out\sonar-project.properties.
14:50:19.764 DEBUG: Skipping the file (ID '1448', path '/_/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyExecutionManagerWithDataCollection.cs', NO INDEXED PATH), line '153', visitCount '0' because file is not indexed or does not have the supported language. Verify sonar.sources in .sonarqube\out\sonar-project.properties.
14:50:19.764 DEBUG: Skipping the file (ID '1448', path '/_/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyExecutionManagerWithDataCollection.cs', NO INDEXED PATH), line '156', visitCount '0' because file is not indexed or does not have the supported language. Verify sonar.sources in .sonarqube\out\sonar-project.properties.
14:50:19.764 DEBUG: OpenCover parser: Skipping branch hits for file (ID '1448', path '/_/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyExecutionManagerWithDataCollection.cs', NO INDEXED PATH), line '129', offset '8', visitCount '0' because file is not indexed or does not have the supported language. Verify sonar.sources in .sonarqube\out\sonar-project.properties.
14:50:19.764 DEBUG: OpenCover parser: Skipping branch hits for file (ID '1448', path '/_/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyExecutionManagerWithDataCollection.cs', NO INDEXED PATH), line '129', offset '8', visitCount '0' because file is not indexed or does not have the supported language. Verify sonar.sources in .sonarqube\out\sonar-project.properties.
14:50:19.764 DEBUG: OpenCover parser: Skipping branch hits for file (ID '1448', path '/_/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyExecutionManagerWithDataCollection.cs', NO INDEXED PATH), line '135', offset '51', visitCount '0' because file is not indexed or does not have the supported language. Verify sonar.sources in .sonarqube\out\sonar-project.properties.
14:50:19.764 DEBUG: OpenCover parser: Skipping branch hits for file (ID '1448', path '/_/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyExecutionManagerWithDataCollection.cs', NO INDEXED PATH), line '135', offset '51', visitCount '0' because file is not indexed or does not have the supported language. Verify sonar.sources in .sonarqube\out\sonar-project.properties.
14:50:19.764 DEBUG: OpenCover parser: Skipping branch hits for file (ID '1448', path '/_/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyExecutionManagerWithDataCollection.cs', NO INDEXED PATH), line '146', offset '156', visitCount '0' because file is not indexed or does not have the supported language. Verify sonar.sources in .sonarqube\out\sonar-project.properties.
14:50:19.764 DEBUG: OpenCover parser: Skipping branch hits for file (ID '1448', path '/_/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyExecutionManagerWithDataCollection.cs', NO INDEXED PATH), line '146', offset '156', visitCount '0' because file is not indexed or does not have the supported language. Verify sonar.sources in .sonarqube\out\sonar-project.properties.
14:50:19.764 DEBUG: Skipping the file (ID '1448', path '/_/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyExecutionManagerWithDataCollection.cs', NO INDEXED PATH), line '161', visitCount '0' because file is not indexed or does not have the supported language. Verify sonar.sources in .sonarqube\out\sonar-project.properties.
14:50:19.764 DEBUG: Skipping the file (ID '1448', path '/_/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyExecutionManagerWithDataCollection.cs', NO INDEXED PATH), line '163'
This step has been truncated due to its large size. Download the full logs from the menu once the workflow run has completed.
0s
Post job cleanup.
1s
Post job cleanup.
"C:\Program Files\Git\cmd\git.exe" version
git version 2.47.1.windows.1
Temporarily overriding HOME='C:\actions-runner\_work\_temp\00e78af5-2e13-4f4a-a705-3d62e9c67571' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
"C:\Program Files\Git\cmd\git.exe" config --global --add safe.directory C:\actions-runner\_work\sonarcloud_csharp_javascript\sonarcloud_csharp_javascript
"C:\Program Files\Git\cmd\git.exe" config --local --name-only --get-regexp core\.sshCommand
"C:\Program Files\Git\cmd\git.exe" submodule foreach --recursive "sh -c \"git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :\""
"C:\Program Files\Git\cmd\git.exe" config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
http.https://github.com/.extraheader
"C:\Program Files\Git\cmd\git.exe" config --local --unset-all http.https://github.com/.extraheader
"C:\Program Files\Git\cmd\git.exe" submodule foreach --recursive "sh -c \"git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :\""
0s
Cleaning up orphan processes
Terminate orphan process: pid (33668) (VBCSCompiler)
Terminate orphan process: pid (3660) (conhost)
I would greatly appreciate any guidance on resolving this issue. Thank you for your time and support.
Template for a good new topic, formatted with Markdown:
-
ALM used: GitHub
-
CI system used: GitHub Action
-
Scanner command used when applicable (private details masked)
-
Languages of the repository: C#, JavaScript
-
Only if the SonarCloud project is public, the URL: GitHub - nguyen365-build/sonarcloud_csharp_javascript
-
Error observed (wrap logs/code around with triple quotes ``` for proper formatting)
14:50:11.907 INFO: Sensor CSS Rules [javascript] (done) | time=1ms
14:50:11.907 INFO: Sensor JavaScript/TypeScript Coverage [javascript]
14:50:11.907 DEBUG: Property sonar.javascript.lcov.reportPaths is used.
14:50:11.907 DEBUG: Using 'C:\actions-runner\_work\sonarcloud_csharp_javascript\sonarcloud_csharp_javascript\coverage\lcov.info' to resolve LCOV files
14:50:11.907 INFO: Analysing [C:\actions-runner\_work\sonarcloud_csharp_javascript\sonarcloud_csharp_javascript\coverage\lcov.info]
14:50:11.912 WARN: Could not resolve 1 file paths in [C:\actions-runner\_work\sonarcloud_csharp_javascript\sonarcloud_csharp_javascript\coverage\lcov.info]
14:50:11.912 DEBUG: Unresolved paths:
WebApplication\Scripts\operation.js
14:50:11.912 INFO: Sensor JavaScript/TypeScript Coverage [javascript] (done) | time=5ms
- Full Github Action workdflow file
name: Build Pipeline
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: windows10pro
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
- name: Setup NuGet
uses: nuget/setup-nuget@v1
with:
nuget-version: 'latest'
- name: Restore NuGet packages
run: nuget restore SonarCloud.CSharp.JavaScript.sln
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install JavaScript dependencies
run: npm install
working-directory: WebApplication/Scripts
# Run Jest Tests & Generate Coverage Report (Outputs: ./coverage/lcov.info)
- name: Run Jest tests
run: npm test
working-directory: WebApplication/Scripts
- name: Verify Jest Coverage Report
shell: pwsh
run: |
if (!(Test-Path "coverage\lcov.info")) {
Write-Host "JavaScript coverage file NOT found!"
exit 1
} else {
Write-Host "JavaScript coverage file found at: coverage\lcov.info"
}
- name: Start SonarCloud Analysis
run: |
$sonarScannerPath = (Get-ChildItem -Path C:\ -Recurse -Filter "dotnet-sonarscanner.exe" -ErrorAction SilentlyContinue -File | Select-Object -First 1).FullName
$lcovInfoPath = (Get-ChildItem -Path . -Recurse -Filter "lcov.info" -ErrorAction SilentlyContinue -File | Select-Object -First 1).FullName
$sourcePath = Split-Path -Path (Split-Path -Path $lcovInfoPath -Parent) -Parent
Write-Host "sonarScannerPath found at: $sonarScannerPath"
Write-Host "lcovInfoPath found at: $lcovInfoPath"
New-Item -Path .\.sonar\scanner -ItemType Directory
dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner
# & $sonarScannerPath begin `
.\.sonar\scanner\dotnet-sonarscanner begin `
/k:"nguyen365-build_sonarcloud_csharp_javascript" `
/o:"365nguyen" `
/d:sonar.host.url="https://sonarcloud.io" `
/d:sonar.token="${{ secrets.SONAR_TOKEN }}" `
-d:sonar.exclusions="node_modules/**, **/*.config.js" `
-d:sonar.sources="$sourcePath" `
/d:sonar.cs.opencover.reportsPaths="coverage.opencover.xml" `
/d:sonar.javascript.lcov.reportPaths="$lcovInfoPath" `
/d:sonar.scanner.scanAll=true `
-d:sonar.verbose=true
- name: Build Solution
run: msbuild SonarCloud.CSharp.JavaScript.sln /p:Configuration=Release
- name: Run Tests & Collect Coverage
shell: powershell
run: |
$currentDirectory = Get-Location
Write-Host "Current Directory: $currentDirectory"
# Find OpenCover and ReportGenerator
$openCoverPath = (Get-ChildItem -Path . -Recurse -Filter "OpenCover.Console.exe" -File | Select-Object -First 1).FullName
$reportGeneratorPath = (Get-ChildItem -Path . -Recurse -Filter "ReportGenerator.exe" -File | Where-Object { $_.FullName -match '\\net47\\' } | Select-Object -First 1).FullName
$vstestPath = (Get-ChildItem -Path C:\ -Recurse -Filter "vstest.console.exe" -ErrorAction SilentlyContinue -File | Select-Object -First 1).FullName
if (-not $openCoverPath) { Write-Host "OpenCover not found!"; exit 1 }
if (-not $reportGeneratorPath) { Write-Host "ReportGenerator not found!"; exit 1 }
if (-not $vstestPath) { Write-Host "vstest.console.exe not found! Install Visual Studio Test Platform."; exit 1 }
Write-Host "OpenCover found at: $openCoverPath"
Write-Host "ReportGenerator found at: $reportGeneratorPath"
Write-Host "vstest.console.exe found at: $vstestPath"
# Run OpenCover
& $openCoverPath -target:$vstestPath -targetargs:"WebApplication.Test\bin\Release\WebApplication.Test.dll" -register:user -excludebyattribute:*.ExcludeFromCodeCoverage* -output:coverage.opencover.xml
# Convert coverage report with ReportGenerator
& $reportGeneratorPath "-reports:coverage.opencover.xml" "-targetdir:TestResults" -reporttypes:Cobertura
- name: End SonarCloud Analysis
run: |
$sonarScannerPath = (Get-ChildItem -Path C:\ -Recurse -Filter "dotnet-sonarscanner.exe" -ErrorAction SilentlyContinue -File | Select-Object -First 1).FullName
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"