warden
(Radek Antoniuk)
September 13, 2021, 12:29pm
1
In the scanner logs we can see:
build 13-Sep-2021 11:13:40 INFO: Analyzing 42 files using tsconfig:...
error 13-Sep-2021 11:13:47 ERROR: Browserslist: caniuse-lite is outdated. Please run:
error 13-Sep-2021 11:13:47 ERROR: npx browserslist@latest --update-db
error 13-Sep-2021 11:13:47 ERROR:
error 13-Sep-2021 11:13:47 ERROR: Why you should do it regularly:
error 13-Sep-2021 11:13:47 ERROR: https://github.com/browserslist/browserslist#browsers-data-updating
[here missing further lines for the scanned module]
Scanner version:
4.6.2.2472-linux
That does not impact the scan or build it seems, but still might be good to fix.
1 Like
progs
(Martin Bauer)
September 14, 2021, 6:12am
2
We are seeing the same errors/messages. No impact on scan. We are using the latest LTS Developer docker image without any further modifications or plugins.
1 Like
We are having same exact issue and it’s impacting our ci/cd builds using JavaScript , we have an Enterprise Edition Licence (Version 8.9.1 (build 44547) , we are using SonarScanner.MSBuild.exe wrapped in an custom application. The ERRORS flagged we think that must be flagged as Warnings, cause the Analysis complete successful.Nothing has changed in our side, no versions, no updates, so no idea from where this error is coming … can you give us a hint where to look or how to solve it?
SonarScanner for MSBuild 5.3.1
Using the .NET Framework version of the Scanner for MSBuild
Post-processing started.
…
INFO: SonarScanner 4.6.2.2472
…
ERROR: Browserslist: caniuse-lite is outdated. Please run:
ERROR: npx browserslist@latest --update-db
…
INFO: 3/3 source files have been analyzed
INFO: Sensor JavaScript analysis [javascript] (done) | time=13702ms
INFO: Sensor TypeScript analysis [javascript]
INFO: No input files found for analysis
…
INFO: EXECUTION SUCCESS
INFO: The SonarScanner CLI has finished
1 Like
warden
(Radek Antoniuk)
September 16, 2021, 3:18pm
4
I believe it’s not “impacting” the builds, as your scan completes successfully.
It’s just an error in the logs and probably some other side-effects like not properly analysing all the “current” rules that would come with the new version of the browserslist package.
Still, would be good to have a new patch release with the updated version of the package.
saberduck
(Tibor Blenessy)
September 23, 2021, 4:10pm
5
Hi,
indeed there is this automatic update mechanism in browserlist dependency. I created two tickets to handle this issue
opened 12:19PM - 10 Sep 21 UTC
bug
upstream
Hi!
Running scan with sonar 8.9 on a project containing css files shows the f… ollowing error in log:
```
ERROR: Browserslist: caniuse-lite is outdated. Please run:
ERROR: npx browserslist@latest --update-db
ERROR:
ERROR: Why you should do it regularly:
ERROR: https://github.com/browserslist/browserslist#browsers-data-updating
ERROR: Browserslist: caniuse-lite is outdated. Please run:
ERROR: npx browserslist@latest --update-db
ERROR:
ERROR: Why you should do it regularly:
ERROR: https://github.com/browserslist/browserslist#browsers-data-updating
```
Investigation brought me to the sonar-css plugin, which uses more than 6 months old version of caniuse-lite. Can you please update this dependency?
Also I have to mention that exit code of sonar scanner is 0, when quality gate is green. And it is sonar plugin for bamboo who is trying to do its best and seems to fail if it finds anything on stderr.
Thank you in advance!
opened 04:06PM - 23 Sep 21 UTC
type: bug
feedback
Browserlist is a transitive dependency of @babel-core and has an automatic mecha… nism which reports when it's outdated. Unfortunately it prints into stderr which might cause issues with certain CI services.
We have same issue with sonar-css https://github.com/SonarSource/sonar-css/issues/370 . We don't actually need this dependency for the analysis and we should look into how to remove it from the package.
```
=> Found "caniuse-lite@1.0.30001251"
info Reasons this module exists
- "@babel#core#@babel#helper-compilation-targets#browserslist" depends on it
- Hoisted from "@babel#core#@babel#helper-compilation-targets#browserslist#caniuse-lite"
```
1 Like
saberduck
(Tibor Blenessy)
September 23, 2021, 4:21pm
6
I’ve just found that the message can be suppressed by setting environment variable BROWSERSLIST_IGNORE_OLD_DATA=true
I found this in https://github.com/browserslist/browserslist/issues/361#issuecomment-479221925
It seems to fix the problem for me.Can you test on your setup?
1 Like
Hi Tibor,
Can you please clarify where you set that? /conf/sonar.properties? or somewhere different. thanks!
chicadilly
(Jen Turay)
September 30, 2021, 5:00pm
8
I added it to /conf/sonar.properties and I still see the error in the output.
Joe
(Joe)
September 30, 2021, 5:02pm
9
Hi @tnapplications and @chicadilly ,
You set BROWSERSLIST_IGNORE_OLD_DATA=true
as an environment variable, not within the sonar.properties file.
For example, at your command line or terminal, you set the environment variable, then you run sonar-scanner:
$ export BROWSERSLIST_IGNORE_OLD_DATA=true
$ sonar-scanner.... etc.
1 Like
chicadilly
(Jen Turay)
September 30, 2021, 6:07pm
10
Yay! That worked! I set it as a variable in my build definition. The error has cleared.
Thanks so much for the help!
1 Like
Any idea where to set these environment variables when using ALM Integration? Azure DevOps in particular
https://docs.sonarqube.org/8.9/analysis/azuredevops-integration/
Joe
(Joe)
October 6, 2021, 1:37pm
12
There are many ways to set environment variables in Azure DevOps, please check these articles:
1 Like
rishad-mj
(Rishad Mj)
October 12, 2021, 11:00am
13
HI, Even I’m facing this issue.Could you please explain me where exactly i’ve to set this variable in Pipeline ?
Joe
(Joe)
October 12, 2021, 1:33pm
14
Hi @rishad-mj ,
Are you using Azure DevOps? I believe you can add this to your pipeline yaml:
variables:
- name: BROWSERSLIST_IGNORE_OLD_DATA
value: true
Try that and see if it works.
2 Likes
rishad-mj
(Rishad Mj)
October 13, 2021, 11:25am
15
That worked for me. Thanks @Joe
On a side note the error is not impacting the scan. Even with error scan completed successfully.
1 Like
system
(system)
Closed
October 20, 2021, 11:25am
16
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.