Within the past 2 days since April 13th, my SonarScan action within GitHub Actions has failed with the error ‘1 is not a valid line offset for pointer’. We have been using the action ‘SonarSource/sonarqube-scan-action@v5’ for about a year now with no issues. I tried upgrading the action to version 5.1, with no change. The error suggests that removing any empty first line of any file should resolve the issue, but this has worked previously and it would be quite a pain to go hunt down every file that has an empty line on line 1.
ALM: GitHub
CI System Used: GitHub Actions
Scanner command used: SonarSource/sonarqube-scan-action@v5 and SonarSource/sonarqube-scan-action@v5.1
Language: Typescript
Error Observed: 2025-04-15T19:08:25.4158656Z 19:08:24.710 WARN Failed to parse range Location[file=packages/mobile/src/screens/SettingsScreen/InviteUser/InviteUserScreen.tsx, kind=file, startLine=1, startColumn=1, endLine=1, endColumn=2] for InviteUserScreen.tsx, 1 is not a valid line offset for pointer. File packages/mobile/src/screens/SettingsScreen/InviteUser/InviteUserScreen.tsx has 0 character(s) at line 1 2025-04-15T19:08:25.4158766Z 19:08:24.715 DEBUG Shutting down the worker
You will see from these logs that this run was on SonarSource/sonarqube-scan-action@v4.2.1, but I have tried v5 and v5.1 as well with the same results.
My team has also been seeing this issue over the past few weeks in typescript using plain command line (in a github action workflow)… Seems very similar.
Error: ScannerEngine: Error during SonarScanner Engine execution
java.lang.IllegalArgumentException: 1 is not a valid line offset for pointer. File src/app/modules/alert/alert.module.ts has 0 character(s) at line 1
at org.sonar.api.utils.Preconditions.checkArgument(Preconditions.java:43)
at org.sonar.api.batch.fs.internal.DefaultInputFile.checkValid(DefaultInputFile.java:338)
at org.sonar.api.batch.fs.internal.DefaultInputFile.newPointer(DefaultInputFile.java:271)
at org.sonar.api.batch.fs.internal.DefaultInputFile.newRange(DefaultInputFile.java:287)
at com.sonarsource.architecture.B.A.D.A(na:2153)
at com.sonarsource.architecture.B.A.D.A(na:794)
at com.sonarsource.architecture.B.A.D.A(na:366)
at com.sonarsource.architecture.D.D.A(na:62)
at com.sonarsource.architecture.D.D.A(na:2641)
at com.sonarsource.architecture.A.execute(na:3125)
at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:63)
at org.sonar.scanner.sensor.ProjectSensorsExecutor.execute(ProjectSensorsExecutor.java:40)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:160)
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.ScannerContainer.doAfterStart(ScannerContainer.java:414)
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:128)
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.ScannerMain.runScannerEngine(ScannerMain.java:137)
at org.sonar.scanner.bootstrap.ScannerMain.run(ScannerMain.java:52)
at org.sonar.scanner.bootstrap.ScannerMain.main(ScannerMain.java:38)
Error: Bootstrapper: An error occurred: Error: Scanner engine failed with code 1
The 2025.4 release will remain officially active for 18 months from the release date. Sonar offers extended commercial support for version 2025.4 during this active period.
We have updated our SonarQube Server to version 2025.4, but the error still persists.
We are using Azure Pipelines with Ubuntu agents, and the problem is only on 1 Angular 20 project.
Let me share the logs here
2025-09-03T13:02:48.7509298Z ##[section]Starting: SonarQubeAnalyze
2025-09-03T13:02:48.7512866Z ==============================================================================
2025-09-03T13:02:48.7512964Z Task : Run Code Analysis
2025-09-03T13:02:48.7513014Z Description : Run scanner and upload the results to the SonarQube Server.
2025-09-03T13:02:48.7513091Z Version : 7.4.1
2025-09-03T13:02:48.7513139Z Author : sonarsource
2025-09-03T13:02:48.7513194Z Help : This task is not needed for Maven and Gradle projects since the scanner should be run as part of the build.
[More Information](https://docs.sonarsource.com/sonarqube/latest/analyzing-source-code/scanners/sonarqube-extension-for-azure-devops/)
2025-09-03T13:02:48.7513358Z ==============================================================================
2025-09-03T13:02:48.9324128Z [command]/home/vsts/work/_tasks/SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055/7.4.1/sonar-scanner/bin/sonar-scanner
2025-09-03T13:02:51.3716779Z 13:02:51.356 INFO Scanner configuration file: /home/vsts/work/_tasks/SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055/7.4.1/sonar-scanner/conf/sonar-scanner.properties
2025-09-03T13:02:51.3723283Z 13:02:51.370 INFO Project root configuration file: NONE
2025-09-03T13:02:51.4198929Z 13:02:51.419 INFO SonarScanner CLI 7.2.0.5079
2025-09-03T13:02:51.4221079Z 13:02:51.421 INFO Linux 6.11.0-1018-azure amd64
2025-09-03T13:02:53.9219962Z 13:02:53.921 INFO Communicating with SonarQube Server 2025.4.2.112048
2025-09-03T13:02:53.9228213Z 13:02:53.922 INFO JRE provisioning: os[linux], arch[x86_64]
2025-09-03T13:02:57.5912084Z 13:02:57.589 INFO Starting SonarScanner Engine...
2025-09-03T13:02:57.5912508Z 13:02:57.590 INFO Java 17.0.13 Eclipse Adoptium (64-bit)
2025-09-03T13:02:58.8897184Z 13:02:58.887 INFO Load global settings
2025-09-03T13:02:59.5696296Z 13:02:59.565 INFO Load global settings (done) | time=676ms
2025-09-03T13:02:59.5711458Z 13:02:59.570 INFO Server id: 0831A05B-AXewk9KpbWoGhuhck1Iz
2025-09-03T13:02:59.5816331Z 13:02:59.581 INFO Loading required plugins
2025-09-03T13:02:59.5818034Z 13:02:59.581 INFO Load plugins index
2025-09-03T13:02:59.6302196Z 13:02:59.629 INFO Load plugins index (done) | time=49ms
2025-09-03T13:02:59.6306547Z 13:02:59.629 INFO Load/download plugins
2025-09-03T13:03:01.0455383Z 13:03:01.042 INFO Load/download plugins (done) | time=1414ms
2025-09-03T13:03:01.1921287Z 13:03:01.191 INFO Loaded core extensions: developer-scanner
2025-09-03T13:03:01.5835105Z 13:03:01.580 INFO Process project properties
2025-09-03T13:03:01.5964110Z 13:03:01.595 INFO Process project properties (done) | time=14ms
2025-09-03T13:03:01.6107912Z 13:03:01.607 INFO Project key: PROJECT_frontend
2025-09-03T13:03:01.6108527Z 13:03:01.608 INFO Base dir: /home/vsts/work/1/s/frontend
2025-09-03T13:03:01.6109240Z 13:03:01.608 INFO Working dir: /home/vsts/work/1/s/frontend/.scannerwork
2025-09-03T13:03:01.6203435Z 13:03:01.619 INFO Load project settings for component key: 'PROJECT_frontend'
2025-09-03T13:03:01.7136455Z 13:03:01.711 INFO Load project settings for component key: 'PROJECT_frontend' (done) | time=91ms
2025-09-03T13:03:01.7368334Z 13:03:01.736 INFO Load project branches
2025-09-03T13:03:01.7938613Z 13:03:01.793 INFO Load project branches (done) | time=56ms
2025-09-03T13:03:01.8020548Z 13:03:01.799 INFO Load branch configuration
2025-09-03T13:03:01.8021279Z 13:03:01.799 INFO Found manual configuration of branch/PR analysis. Skipping automatic configuration.
2025-09-03T13:03:01.8060523Z 13:03:01.802 INFO Load branch configuration (done) | time=3ms
2025-09-03T13:03:01.8222500Z 13:03:01.820 INFO Load quality profiles
2025-09-03T13:03:02.1003408Z 13:03:02.099 INFO Load quality profiles (done) | time=277ms
2025-09-03T13:03:02.1110182Z 13:03:02.110 INFO Auto-configuring with CI 'Azure DevOps'
2025-09-03T13:03:02.1355709Z 13:03:02.135 INFO Load active rules
2025-09-03T13:03:03.8178926Z 13:03:03.817 INFO Load active rules (done) | time=1683ms
2025-09-03T13:03:03.8265863Z 13:03:03.826 INFO Load analysis cache
2025-09-03T13:03:03.8667006Z 13:03:03.864 INFO Load analysis cache (404) | time=40ms
2025-09-03T13:03:04.1535519Z 13:03:04.153 INFO Branch name: fix/sonarqube-frontend
2025-09-03T13:03:04.1840714Z 13:03:04.182 INFO Preprocessing files...
2025-09-03T13:03:05.6778634Z 13:03:05.677 INFO 6 languages detected in 226 preprocessed files (done) | time=1492ms
2025-09-03T13:03:05.6782482Z 13:03:05.677 INFO 0 files ignored because of inclusion/exclusion patterns
2025-09-03T13:03:05.6809201Z 13:03:05.678 INFO 30462 files ignored because of scm ignore settings
2025-09-03T13:03:05.6815320Z 13:03:05.681 INFO Loading plugins for detected languages
2025-09-03T13:03:05.6826324Z 13:03:05.681 INFO Load/download plugins
2025-09-03T13:03:09.9178300Z 13:03:09.917 INFO Load/download plugins (done) | time=4234ms
2025-09-03T13:03:10.0872507Z 13:03:10.084 INFO SonarJasmin relies on SonarSecurity to define the JS/TS security rule repositories.
2025-09-03T13:03:10.1873232Z 13:03:10.185 INFO Load metrics repository
2025-09-03T13:03:10.2390619Z 13:03:10.238 INFO Load metrics repository (done) | time=54ms
2025-09-03T13:03:10.3483034Z 13:03:10.347 INFO Load project repositories
2025-09-03T13:03:10.4664467Z 13:03:10.462 INFO Load project repositories (done) | time=115ms
2025-09-03T13:03:10.4821892Z 13:03:10.480 INFO Indexing files...
2025-09-03T13:03:10.4855237Z 13:03:10.483 INFO Project configuration:
2025-09-03T13:03:10.4855726Z 13:03:10.485 INFO Excluded sources: src/app/graphql/graphql.ts
2025-09-03T13:03:10.7052565Z 13:03:10.704 INFO 226 files indexed (done) | time=220ms
2025-09-03T13:03:10.7080660Z 13:03:10.707 INFO Quality profile for css: Sonar way
2025-09-03T13:03:10.7087003Z 13:03:10.708 INFO Quality profile for docker: Sonar way
2025-09-03T13:03:10.7151468Z 13:03:10.709 INFO Quality profile for js: Sonar way
2025-09-03T13:03:10.7151783Z 13:03:10.710 INFO Quality profile for json: Sonar way
2025-09-03T13:03:10.7152060Z 13:03:10.710 INFO Quality profile for ts: Sonar way
2025-09-03T13:03:10.7152364Z 13:03:10.711 INFO Quality profile for web: Sonar way
2025-09-03T13:03:10.7152999Z 13:03:10.711 INFO ------------- Run sensors on module PROJECT_frontend
2025-09-03T13:03:10.7201223Z 13:03:10.719 INFO SonarJasmin relies on SonarSecurity to define the JS/TS security rule repositories.
2025-09-03T13:03:11.4803486Z 13:03:11.477 INFO Sensor Import external issues report
2025-09-03T13:03:11.4942001Z 13:03:11.493 WARN External issues were imported with a deprecated format which will be removed soon. Please switch to the newest format to fully benefit from Clean Code: https://docs.sonarsource.com/sonarqube-community-build/analyzing-source-code/importing-external-issues/generic-issue-import-format/
2025-09-03T13:03:11.5394498Z ##[error]13:03:11.533 ERROR Error during SonarScanner Engine execution
java.lang.IllegalArgumentException: 54 is not a valid line offset for pointer. File src/app/app.component.ts has 53 character(s) at line 19
at org.sonar.api.utils.Preconditions.checkArgument(Preconditions.java:43)
at org.sonar.api.batch.fs.internal.DefaultInputFile.checkValid(DefaultInputFile.java:378)
at org.sonar.api.batch.fs.internal.DefaultInputFile.newPointer(DefaultInputFile.java:311)
at org.sonar.scanner.externalissue.ExternalIssueImporter.fillLocation(ExternalIssueImporter.java:203)
at org.sonar.scanner.externalissue.ExternalIssueImporter.populateCommonValues(ExternalIssueImporter.java:123)
at org.sonar.scanner.externalissue.ExternalIssueImporter.importDeprecatedIssue(ExternalIssueImporter.java:150)
at org.sonar.scanner.externalissue.ExternalIssueImporter.importDeprecatedFormat(ExternalIssueImporter.java:74)
at org.sonar.scanner.externalissue.ExternalIssueImporter.execute(ExternalIssueImporter.java:67)
at org.sonar.scanner.externalissue.ExternalIssuesImportSensor.execute(ExternalIssuesImportSensor.java:75)
at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:69)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:88)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:61)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:79)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:61)
at org.sonar.scanner.scan.SpringModuleScanContainer.doAfterStart(SpringModuleScanContainer.java:80)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:227)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:206)
at org.sonar.scanner.scan.SpringProjectScanContainer.scan(SpringProjectScanContainer.java:212)
at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:208)
at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:178)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:227)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:206)
at org.sonar.scanner.bootstrap.SpringScannerContainer.doAfterStart(SpringScannerContainer.java:339)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:227)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:206)
at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:142)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:227)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:206)
at org.sonar.scanner.bootstrap.ScannerMain.runScannerEngine(ScannerMain.java:150)
at org.sonar.scanner.bootstrap.ScannerMain.run(ScannerMain.java:67)
at org.sonar.scanner.bootstrap.ScannerMain.main(ScannerMain.java:53)
2025-09-03T13:03:11.5411648Z 13:03:11.533 ERROR Error during SonarScanner Engine execution
2025-09-03T13:03:11.5412044Z java.lang.IllegalArgumentException: 54 is not a valid line offset for pointer. File src/app/app.component.ts has 53 character(s) at line 19
2025-09-03T13:03:11.5412601Z at org.sonar.api.utils.Preconditions.checkArgument(Preconditions.java:43)
2025-09-03T13:03:11.5412986Z at org.sonar.api.batch.fs.internal.DefaultInputFile.checkValid(DefaultInputFile.java:378)
2025-09-03T13:03:11.5413439Z at org.sonar.api.batch.fs.internal.DefaultInputFile.newPointer(DefaultInputFile.java:311)
2025-09-03T13:03:11.5413856Z at org.sonar.scanner.externalissue.ExternalIssueImporter.fillLocation(ExternalIssueImporter.java:203)
2025-09-03T13:03:11.5414290Z at org.sonar.scanner.externalissue.ExternalIssueImporter.populateCommonValues(ExternalIssueImporter.java:123)
2025-09-03T13:03:11.5414753Z at org.sonar.scanner.externalissue.ExternalIssueImporter.importDeprecatedIssue(ExternalIssueImporter.java:150)
2025-09-03T13:03:11.5415208Z at org.sonar.scanner.externalissue.ExternalIssueImporter.importDeprecatedFormat(ExternalIssueImporter.java:74)
2025-09-03T13:03:11.5415654Z at org.sonar.scanner.externalissue.ExternalIssueImporter.execute(ExternalIssueImporter.java:67)
2025-09-03T13:03:11.5416083Z at org.sonar.scanner.externalissue.ExternalIssuesImportSensor.execute(ExternalIssuesImportSensor.java:75)
2025-09-03T13:03:11.5416504Z at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:69)
2025-09-03T13:03:11.5416901Z at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:88)
2025-09-03T13:03:11.5417309Z at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:61)
2025-09-03T13:03:11.5417732Z at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:79)
2025-09-03T13:03:11.5418142Z at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:61)
2025-09-03T13:03:11.5418560Z at org.sonar.scanner.scan.SpringModuleScanContainer.doAfterStart(SpringModuleScanContainer.java:80)
2025-09-03T13:03:11.5419110Z at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:227)
2025-09-03T13:03:11.5419532Z at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:206)
2025-09-03T13:03:11.5421064Z at org.sonar.scanner.scan.SpringProjectScanContainer.scan(SpringProjectScanContainer.java:212)
2025-09-03T13:03:11.5421496Z at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:208)
2025-09-03T13:03:11.5421931Z at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:178)
2025-09-03T13:03:11.5422350Z at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:227)
2025-09-03T13:03:11.5422749Z at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:206)
2025-09-03T13:03:11.5423156Z at org.sonar.scanner.bootstrap.SpringScannerContainer.doAfterStart(SpringScannerContainer.java:339)
2025-09-03T13:03:11.5423574Z at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:227)
2025-09-03T13:03:11.5423982Z at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:206)
2025-09-03T13:03:11.5424382Z at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:142)
2025-09-03T13:03:11.5424790Z at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:227)
2025-09-03T13:03:11.5425196Z at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:206)
2025-09-03T13:03:11.5425576Z at org.sonar.scanner.bootstrap.ScannerMain.runScannerEngine(ScannerMain.java:150)
2025-09-03T13:03:11.5425935Z at org.sonar.scanner.bootstrap.ScannerMain.run(ScannerMain.java:67)
2025-09-03T13:03:11.5426272Z at org.sonar.scanner.bootstrap.ScannerMain.main(ScannerMain.java:53)
2025-09-03T13:03:11.5426422Z
2025-09-03T13:03:11.8633276Z 13:03:11.861 INFO EXECUTION FAILURE
2025-09-03T13:03:11.8640286Z 13:03:11.863 INFO Total time: 20.612s
2025-09-03T13:03:12.1929163Z
2025-09-03T13:03:12.1948934Z ##[error][ERROR] SonarQube Server: Error while executing task Analyze: The process '/home/vsts/work/_tasks/SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055/7.4.1/sonar-scanner/bin/sonar-scanner' failed with exit code 3
2025-09-03T13:03:12.1951676Z ##[error]The process '/home/vsts/work/_tasks/SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055/7.4.1/sonar-scanner/bin/sonar-scanner' failed with exit code 3
2025-09-03T13:03:12.1999157Z ##[section]Finishing: SonarQubeAnalyze
Let me know if you need any further information.
Please note that we have added the following sonar properties as suggested in other posts
@f-piras-hyntelo, based on the full stacktrace, this appears to be a common and unrelated error.
The exception indicates that the report you’re passing to sonar.externalIssuesReportPaths references src/app/app.component.ts with an issue location that exceeds the line’s actual length (attempting to access character 54 on a line with only 53 characters).
I recommend reviewing and updating your report to ensure all issue locations are valid and correspond to the latest version of your source files!