Recently the SonarCloudAnalyze analyze azure dev ops tasks started producing this error message for some of the html files in my project.
INFO: Sensor JavaScript inside HTML analysis [javascript]
INFO: 2 source files to be analyzed
##[error]ERROR: Error: ENOENT: no such file or directory, open 'C:\...\index.html'
ERROR: Error: ENOENT: no such file or directory, open 'C:\...\index.html'
##[error]ERROR: Error: ENOENT: no such file or directory, open 'C:\...\index.html'
We use SonarCloud. We are seeing the same issue on our end. All our .net projects that build on windows Jenkins are failing with html files not found. It’s odd that the scan gets published to SonarCloud(eliminating any credential issue connecting from Jenkins to SonarCloud). I think it is failing the quality gate step, which happens after the analyze.
ERROR: Error: ENOENT: no such file or directory, open
Did something get pushed from SonarCloud that would be causing this or anything we can try to get around this issue because it is affecting many projects?
Same issue here using Azure DevOps with SonarCloud:
INFO: Sensor TypeScript analysis [javascript]
INFO: Found 1 tsconfig.json file(s): [E:\Agents\a1\_work\3\s\myProject\ClientApp\tsconfig.json]
INFO: 252 source files to be analyzed
INFO: Creating TypeScript program
INFO: TypeScript configuration file E:\Agents\a1\_work\3\s\myProject\ClientApp\tsconfig.json
INFO: Creating TypeScript program (done) | time=3466ms
INFO: Starting analysis with current program
INFO: 45/252 files analyzed, current file: E:/Agents/a1/_work/3/s/myProject/ClientApp/src/app/shared/models/Recipes.ts
INFO: Analyzed 252 file(s) with current program
INFO: 252/252 source files have been analyzed
INFO: Hit the cache for 0 out of 252
INFO: Miss the cache for 252 out of 252: ANALYSIS_MODE_INELIGIBLE [252/252]
INFO: Sensor TypeScript analysis [javascript] (done) | time=29570ms
INFO: Sensor JavaScript inside HTML analysis [javascript]
INFO: 148 source files to be analyzed
##[error]ERROR: Error: ENOENT: no such file or directory, open 'E:\Agents\a1\_work\3\myProject\ClientApp\src\app\rt\rt-aspo\rt-aspo.component.html'
ERROR: Error: ENOENT: no such file or directory, open 'E:\Agents\a1\_work\3\myProject\ClientApp\src\app\rt\rt-aspo\rt-aspo.component.html'
The “JavaScript inside HTML analysis” Sensor is using a wrong path:
'E:\Agents\a1_work\3\myProject'
The correct one should be:
'E:\Agents\a1_work\3\s\myProject'
because 's' is the source root folder of the Git repository inside the Azure Pipelines agent.
The sonar cloud analyze and publish tasks are using the default settings.
This error seems to happen when analyzing html files inside a blazor wasm csproj. But I don’t think there is anything blazor specific here seems like it is just choking on raw html files. Let me know if you need any other information.
thanks for reporting this issue. We’ve found the problem and we are preparing a bugfix release. We’ll let you know when it’s deployed in SonarCloud in the coming days.
I am also facing the same issue. Could you please let us know once the fix is deployed and what changes needs to be done from our end too to fix this issue.
INFO: Sensor JavaScript inside HTML analysis [javascript]
INFO: 148 source files to be analyzed
INFO: 148/148 source files have been analyzed
INFO: Hit the cache for 0 out of 148
INFO: Miss the cache for 148 out of 148: ANALYSIS_MODE_INELIGIBLE [148/148]
INFO: Sensor JavaScript inside HTML analysis [javascript] (done) | time=890ms