SonarQube code analysis failing with [error]java.lang.IllegalArgumentException: Unable to register token in file

After moving to SonarQube 7.9.6 LTS from 7.9.5, code analysis began failing with the following errors:

[error]java.lang.IllegalArgumentException: Unable to register token in file Presentation/Core/Components/UnitBoard/UnitBoardDetails.tsx

Caused by: java.lang.IllegalArgumentException: Start pointer [line=1041, lineOffset=52] should be before end pointer [line=1040, lineOffset=60]

We use the Run Code Analysis task in Azure DevOps to perform our code analysis. These errors cause that task to fail, which causes our builds to fail.

SonarQube information:

  • Enterprise Edition
  • Version 7.9.6 (build 41879)

On SonarQube 7.9.5 we did not have these errors running against the same code. This code hasn’t changed in months.

Hey there.

Did you make sure you kept the same plugin versions installed in your extensions/plugins directory? What versions of the Javascript/Typescript analyzer(s) are you using?