Sonar-scanner-6.2.1.4610-linux error ENOENT

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
  • how is SonarQube deployed: zip, Docker, Helm
  • what are you trying to achieve
  • what have you tried so far to achieve this
$ sonar-scanner
[INFO]  Bootstrapper: Retrieving info from "package.json" file
[INFO]  Bootstrapper: Platform: linux x64
[INFO]  Bootstrapper: Server URL: http://zelenjak.arnes.si:9000
[INFO]  Bootstrapper: Version: 4.2.4
[INFO]  Bootstrapper: SonarQube server version: 9.9.4
[INFO]  Bootstrapper: JRE provisioning is NOT supported
[INFO]  Bootstrapper: Falling back on using sonar-scanner-cli
[INFO]  Bootstrapper: Downloading SonarScanner CLI
[INFO]  Bootstrapper: Download starting...
[INFO]  Bootstrapper: Download complete
[INFO]  Bootstrapper: Extracting SonarScanner CLI archive
[INFO]  Bootstrapper: Starting analysis
node:events:497
      throw er; // Unhandled 'error' event
      ^
Error: spawn /root/.sonar/native-sonar-scanner/sonar-scanner-6.2.1.4610-linux/bin/sonar-scanner ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:286:19)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on ChildProcess instance at:
    at ChildProcess._handle.onexit (node:internal/child_process:292:12)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn /root/.sonar/native-sonar-scanner/sonar-scanner-6.2.1.4610-linux/bin/sonar-scanner',
  path: '/root/.sonar/native-sonar-scanner/sonar-scanner-6.2.1.4610-linux/bin/sonar-scanner',
  spawnargs: []
}
Node.js v20.18.0
1 Like

We have the same issue:

Error: spawn /root/.sonar/native-sonar-scanner/sonar-scanner-6.2.1.4610-linux/bin/sonar-scanner ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:286:19)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on ChildProcess instance at:
    at ChildProcess._handle.onexit (node:internal/child_process:292:12)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn /root/.sonar/native-sonar-scanner/sonar-scanner-6.2.1.4610-linux/bin/sonar-scanner',
  path: '/root/.sonar/native-sonar-scanner/sonar-scanner-6.2.1.4610-linux/bin/sonar-scanner',
  spawnargs: []
}

Node.js v20.17.0

Same problem here with latest version sonarqube-scanner 4.2.4, when scanning angular (typescript) project.

Worked OK with version sonarqube-scanner 4.2.3.

node:events:497
      throw er; // Unhandled 'error' event
      ^

Error: spawn /root/.sonar/native-sonar-scanner/sonar-scanner-6.2.1.4610-linux/bin/sonar-scanner ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:286:19)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on ChildProcess instance at:
    at ChildProcess._handle.onexit (node:internal/child_process:292:12)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn /root/.sonar/native-sonar-scanner/sonar-scanner-6.2.1.4610-linux/bin/sonar-scanner',
  path: '/root/.sonar/native-sonar-scanner/sonar-scanner-6.2.1.4610-linux/bin/sonar-scanner',
  spawnargs: []
}
1 Like

Hi all,

Welcome to the community and thanks for these reports!

We’ve reproduced the problem on our side and are working on a fix. We’ll update this thread when it’s available.

Our troubleshooting identifies this as related to using the latest NPM scanner with a version of SonarQube < 10.6.

As a workaround, you can downgrade to the previous version of the scanner.

 
Thx,
Ann

2 Likes

Yes we also have same problem. After downgrading to previous version 4.2.3 it works.

1 Like

Hi all,

We’ve released version 4.2.5, which fixes the problem.

Thanks again for your reports and your patience!

 
Ann

1 Like

Thanks for fixing that issue so quickly. It’s working now.

3 Likes

Thank you for quick fix, works fine again with 4.2.5.

1 Like

thx for fix :bug:

1 Like