Cannot add the same measure twice

Hello,

We have troubles with sonarqube for the last two days. Our project is open-source and can be found here: https://github.com/criteo/android-publisher-sdk.

Between the last successful run and the failing run our code did not change (could be an issue with one of our dependencies?).

The error is:

Caused by: java.lang.UnsupportedOperationException: Can not add the same measure twice on publisher-sdk/src/test/java/com/criteo/publisher/model/RemoteConfigRequestTest.kt: DefaultMeasure[component=publisher-sdk/src/test/java/com/criteo/publisher/model/RemoteConfigRequestTest.kt,metric=Metric[id=<null>,key=skipped_tests,description=Number of skipped unit tests,type=INT,direction=-1,domain=Coverage,name=Skipped Unit Tests,qualitative=true,userManaged=false,enabled=true,worstValue=<null>,bestValue=0.0,optimizedBestValue=true,hidden=false,deleteHistoricalData=false,decimalScale=<null>],value=0,fromCore=false,storage=org.sonar.scanner.sensor.DefaultSensorStorage@2cb0ef27,saved=false]

Additional information:

  • versions: we are using sonarqube through Gradle plugin v3.0.
    plugins { id("org.sonarqube") version "3.0" }
  • what are you trying to achieve: trying to make ./gradlew sonarqube successful again.
  • what have you tried so far to achieve this: looked at the logs, used ./gradlew sonarqube--stacktrace. Deleted that RemoteConfigRequestTest file but the issue happens with another file.

Any help would be appreciated.

Thank you!

1 Like

Hi @Amokrane,

Sorry for the late reply. Did you update SonarQube itself recently, by any chance? And are you using a community plugin for analyzing Kotlin? As SonarQube provides Kotlin analysis out of the box, it could conflict with another plugin trying to analyze the same files.