Hello,
I’ve been trying to get js-scan via Jenkins to work for the past few days. There are several topics on this, but none of the solutions there helped me yet…
- which versions are you using: SonarQube 10.1
- how is SonarQube deployed: zip
- what are you trying to achieve: Checking javascript / nodejs / vue via Jenkins (2.40) scanner plugin (2.15)
- what have you tried so far to achieve this: Increased maxspace to 16k, switchet nodjs versions, excluded js libraries from scans.
Also attached:
tsconfig.sonar.json (702 Bytes)
Jenkinsfile.txt (1.3 KB)
Log with -X (removed linter stuff to avoid massive amounts of text)
08:24:58.935 INFO: Sensor JavaScript/TypeScript analysis [javascript]
08:24:58.957 DEBUG: Deploying bundle
08:24:58.957 DEBUG: Deploying eslint-bridge into /var/lib/jenkins/workspace/SonarQube_Test/.scannerwork/.s
onartmp/eslint-bridge-bundle
08:25:06.296 DEBUG: Deploying bundle (done) | time=7339ms
08:25:06.300 DEBUG: Starting server
08:25:06.326 DEBUG: Using default Node.js executable: 'node'.
08:25:06.326 DEBUG: Checking Node.js version
08:25:06.328 DEBUG: Launching command node -v
08:25:06.474 DEBUG: Using Node.js v16.20.2.
08:25:06.474 DEBUG: Starting Node.js process to start eslint-bridge server at port 35598
08:25:06.475 DEBUG: Launching command node --max-old-space-size=16384 /var/lib/jenkins/workspace/SonarQube_Test/.scannerwork/.sonartmp/eslint-bridge-bundle/package/bin/server 35598 127.0.0.1 /var/lib/jenkins/workspace/SonarQube_Test/.scannerwork true false
08:25:13.407 DEBUG: Context set with {"workDir":"/var/lib/jenkins/workspace/SonarQube_Test/.scannerwork","shouldUseTypeScriptParserForJS":true,"sonarlint":false,"bundles":[]}
08:25:13.408 DEBUG: starting eslint-bridge server at port 35598
08:25:13.442 DEBUG: eslint-bridge server is running at port 35598
08:25:13.695 DEBUG: Starting server (done) | time=7395ms
08:25:13.706 INFO: 613 source files to be analyzed
08:25:13.734 DEBUG: Analysis of unchanged files will not be skipped (current analysis requires all files to be analyzed)
08:25:13.736 INFO: Resolving TSConfig files using 'tsconfig.sonar.json' from property sonar.typescript.tsconfigPaths
08:25:13.736 DEBUG: Using 'tsconfig.sonar.json' to resolve TSConfig file(s)
08:25:13.748 INFO: Found 1 TSConfig file(s): [/var/lib/jenkins/workspace/SonarQube_Test/tsconfig.sonar.json]
08:25:13.954 DEBUG: Creating linter config
08:25:14.150 DEBUG: Cache strategy set to 'WRITE_ONLY' for file 'src/main/webapp/v4user/static/jquery/plugins/jquery-validate/lib/jquery.metadata.js' as current analysis requires all files to be analyzed
08:25:14.161 DEBUG: Analyzing file: file:///var/lib/jenkins/workspace/SonarQube_Test/src/main/webapp/v4user/static/jquery/plugins/jquery-validate/lib/jquery.metadata.js
08:25:14.193 DEBUG: Analyzing file "/var/lib/jenkins/workspace/SonarQube_Test/src/main/webapp/v4user/static/jquery/plugins/jquery-validate/lib/jquery.metadata.js" with linterId "default"
08:25:23.707 INFO: 1/613 file analyzed, current file: /var/lib/jenkins/workspace/SonarQube_Test/src/main/webapp/v4user/static/jquery/plugins/jquery-validate/lib/jquery.metadata.js
08:25:33.744 INFO: 1/613 file analyzed, current file: /var/lib/jenkins/workspace/SonarQube_Test/src/main/webapp/v4user/static/jquery/plugins/jquery-validate/lib/jquery.metadata.js
08:25:38.125 ERROR: eslint-bridge Node.js process is unresponsive. This is most likely caused by process running out of memory. Consider setting sonar.javascript.node.maxspace to higher value (e.g. 4096).
08:25:38.200 ERROR: Failed to get response while analyzing file:///var/lib/jenkins/workspace/SonarQube_Test/src/main/webapp/v4user/static/jquery/plugins/jquery-validate/lib/jquery.metadata.js
java.lang.IllegalStateException: eslint-bridge is unresponsive
at org.sonar.plugins.javascript.eslint.EslintBridgeServerImpl.request(EslintBridgeServerImpl.java:386)
at org.sonar.plugins.javascript.eslint.EslintBridgeServerImpl.analyzeJavaScript(EslintBridgeServerImpl.java:340)
at org.sonar.plugins.javascript.eslint.JsTsSensor.analyze(JsTsSensor.java:152)