We use the Sonar Scanner (version 4.8.0.2856-linux) to analyze our code (Ruby on Rails + EmberJS) and it pushes the results to SonarCloud.
We run the scanner in the Heroku CI, just after the test execution to collect the coverage information.
It’s been working for several months without problems.
Since yesterday, we have this error when the analysis is launched :
.08:05:42.075 ERROR: Failure when reading cache entry
java.io.IOException: The cache stream is too big (>26143) for file /app/.scannerwork/ucfg2/js/_Users_reminuyts_workspace_prospectio_front_app_index_html.ucfgs
at org.sonar.plugins.javascript.eslint.cache.SequenceSerialization.writeFile(SequenceSerialization.java:91)
at org.sonar.plugins.javascript.eslint.cache.SequenceSerialization.readFromCache(SequenceSerialization.java:139)
at org.sonar.plugins.javascript.eslint.cache.UCFGFilesSerialization.readFromCache(UCFGFilesSerialization.java:60)
at org.sonar.plugins.javascript.eslint.cache.CacheAnalysisSerialization.readFromCache(CacheAnalysisSerialization.java:58)
at org.sonar.plugins.javascript.eslint.cache.CacheStrategies.readFromCache(CacheStrategies.java:124)
at org.sonar.plugins.javascript.eslint.cache.CacheStrategies.getStrategyFor(CacheStrategies.java:105)
at org.sonar.plugins.javascript.eslint.cache.CacheStrategies.getStrategyFor(CacheStrategies.java:69)
at org.sonar.plugins.javascript.eslint.HtmlSensor.analyzeFiles(HtmlSensor.java:89)
at org.sonar.plugins.javascript.eslint.AbstractEslintSensor.execute(AbstractEslintSensor.java:73)
at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:62)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:75)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:48)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:66)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:48)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:64)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:468)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:464)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:420)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:130)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:57)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:51)
at og.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$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:112)
at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Sonar analysis finished.
In the Sonarcloud UI, we can see that the analysis was triggered (X minutes ago), but we don’t see the bugs, code smells, coverage information,… All the values are displayed as 0.
We didn’t change anything specific from our side in the project. It appears at the same time on master and features branches. The scanner version hasn’t changed.
When we execute the scanner in the same version but from our Macbooks, the analysis works correctly.
I tried to provide more memory (-XmX parameter) to the scanner but apparently, it’s not a memory issue.
I think it could be explained by a potential change Heroku did from their side regarding the testing environment (OS,…). This could explain why it stopped working without any change on our side…
Any idea how we could fix this annoying issue?
Thank you in advance for you help!