Package.json causing Java heap space error

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    SonarQube v10.6

I am trying to run an analysis to ONLY scan JS files, nothing else, however analysis gets stuck at package.json till we run into the Java Heap Space error.

I’ve tried excluding the package.json but the scanner still insists on scanning it.

Logs:

2024-09-24 10:42:21,060	[STDOUT]	(3556859) 10:42:21.060 DEBUG: Checking Node.js version
2024-09-24 10:42:21,069	[STDOUT]	(3556859) 10:42:21.068 DEBUG: Using Node.js v20.9.0.
2024-09-24 10:42:23,067	[STDOUT]	(3556859) 10:42:23.066 INFO: Memory configuration: OS (32337 MB), Node.js (4144 MB).
2024-09-24 10:42:23,067	[STDOUT]	(3556859) 10:42:23.067 DEBUG: Starting the bridge server
2024-09-24 10:42:23,077	[STDOUT]	(3556859) 10:42:23.077 DEBUG: The bridge server is listening on port 46577
2024-09-24 10:42:23,101	[STDOUT]	(3556859) 10:42:23.101 DEBUG: The worker thread is running
2024-09-24 10:42:23,199	[STDOUT]	(3556859) 10:42:23.199 DEBUG: Bridge server started on port 46577 in 2141 ms
2024-09-24 10:42:23,207	[STDOUT]	(3556859) 10:42:23.207 DEBUG: Analysis of unchanged files will not be skipped (current analysis requires all files to be analyzed)
2024-09-24 10:42:24,810	[STDOUT]	(3556859) 10:42:24.806 DEBUG: Initializing linter "default" with no-vue-bypass-sanitization,heading-has-content,hashing,for-loop-increment-sign,label-has-associated-control,img-redundant-alt,interactive-supports-focus,no-globals-shadowing,null-dereference,unverified-hostname,no-extra-arguments,no-absolute-path,no-redeclare,constructor-for-side-effects,post-message,cookie-no-httponly,no-noninteractive-element-to-interactive-role,no-interactive-element-to-noninteractive-role,no-ignored-exceptions,autocomplete-valid,no-throw-literal,no-useless-increment,weak-ssl,tabindex-no-positive,pseudo-random,no-access-key,no-noninteractive-element-interactions,session-regeneration,no-use-of-empty-return-value,anchor-is-valid,no-associative-arrays,confidential-information-logging,no-weak-keys,no-noninteractive-tabindex,no-ip-forward,no-static-element-interactions,single-character-alternation,aws-ec2-unencrypted-ebs-volume,unused-named-groups,single-char-in-character-classes,no-same-argument-assert,certificate-transparency,inconsistent-function-call,arguments-order,file-uploads,no-case-declarations,sonar-no-misleading-character-class,no-inverted-boolean-check,duplicates-in-character-class,todo-tag,fixme-tag,aws-s3-bucket-public-access,aws-s3-bucket-granted-access,no-mixed-content,aria-role,anchor-precedence,no-angular-bypass-sanitization,frame-ancestors,stable-tests,
2024-09-24 10:42:29,707	[STDOUT]	(3556859) 10:42:29.707 DEBUG: Loaded rules ucfg from <path>/.scannerwork/.sonartmp/bridge-bundle/package/custom-rules1820940085362506368/package
2024-09-24 10:42:29,707	[STDOUT]	(3556859) 10:42:29.707 DEBUG: Creating linter config
2024-09-24 10:42:29,707	[STDOUT]	(3556859) 10:42:29.707 DEBUG: Linter config: {"language":"js","fileType":"MAIN"} with alt-text,anchor-has-content,anchor-is-valid,anchor-precedence,argument-type,arguments-order,aria-activedescendant-has-tabindex,aria-proptypes,aria-role,aria-unsupported-elements,array-callback-without-return,autocomplete-valid,aws-apigateway-public-api,aws-ec2-rds-dms-public,aws-ec2-unencrypted-ebs-volume,aws-efs-unencrypted,aws-iam-all-privileges,aws-iam-privilege-escalation,aws-iam-public-access,aws-opensearchservice-domain,aws-rds-unencrypted-databases,aws-restricted-ip-admin-access,aws-s3-bucket-granted-access,aws-s3-bucket-insecure-http,aws-s3-bucket-public-access,aws-s3-bucket-versioning,aws-sagemaker-unencrypted-notebook,aws-sns-unencrypted-topics,aws-sqs-unencrypted-queue,bitwise-operators,call-argument-line,certificate-transparency,class-name,code-eval,cognitive-complexity,comma-or-logical-or-case,concise-regex,confidential-information-logging,constructor-for-side-effects,content-length,content-security-policy,cookie-no-httponly,cors,csrf,default-param-last,default-props-match-prop-types,deprecation,different-types-comparison,disabled-auto-escaping,disabled-resource-integrity,duplicates-in-character-class,empty-string-repetition,encryption-secure-mode,existing-groups,file-permissions,file-uploads,fixme-tag,for-loop-increment-sign,frame-ancestors,function-inside-loop,function-return-type,future-reserved-words,generator-without-yield,hashing,heading-has-content,hidden-files,hook-use-state,html-has-lang,iframe-has-title,img-redundant-alt,in-operator-type-error,inconsistent-function-call,index-of-compare-to-positive-number,insecure-cookie,insecure-jwt-token,interactive-supports-focus,jsx-child-element-spacing,jsx-key,jsx-no-comment-textnodes,jsx-no-constructed-context-values,jsx-no-useless-fragment,jsx-pascal-case,label-has-associated-control,label-position,link-with-target-blank,max-switch-cases,media-has-caption,misplaced-loop-counter,mouse-events-a11y,new-cap,new-operator-misuse,no-absolute-path,no-access-key,no-access-state-in-setstate,no-accessor-field-mismatch,no-all-duplicated-branches,no-alphabetical-sort,no-angular-bypass-sanitization,no-aria-hidden-on-focusable,no-array-delete,no-array-index-key,no-associative-arrays,no-base-to-string,no-caller,no-case-declarations,no-case-label-in-switch,no-children-prop,no-clear-text-protocols,no-collection-size-mischeck,no-commented-code,no-constant-binary-expression,no-constructor-return,no-danger-with-children,no-dead-store,no-delete-var,no-direct-mutation-state,no-dupe-args,no-duplicated-branches,no-duplicates,no-element-overwrite,no-empty,no-empty-after-reluctant,no-empty-alternatives,no-empty-collection,no-empty-function,no-empty-group,no-empty-pattern,no-equals-in-for-termination,no-extend-native,no-extra-arguments,no-extra-bind,no-extra-boolean-cast,no-extraneous-class,no-find-dom-node,no-global-this,no-globals-shadowing,no-gratuitous-expressions,no-hardcoded-credentials,no-hardcoded-ip,no-hook-setter-in-body,no-identical-conditions,no-identical-expressions,no-identical-functions,no-ignored-return,no-implicit-global,no-import-assign,no-in-misuse,no-infinite-loop,no-interactive-element-to-noninteractive-role,no-intrusive-permissions,no-invalid-await,no-invariant-returns,no-inverted-boolean-check,no-ip-forward,no-is-mounted,no-labels,no-lone-blocks,no-lonely-if,no-loss-of-precision,no-mime-sniff,no-misleading-array-reverse,no-misused-promises,no-mixed-content,no-multi-str,no-mutable-exports,no-nested-assignment,no-nested-conditional,no-nested-template-literals,no-new-native-nonconstructor,no-noninteractive-element-interactions,no-noninteractive-element-to-interactive-role,no-noninteractive-tabindex,no-octal,no-octal-escape,no-one-iteration-loop,no-os-command-from-path,no-parameter-reassignment,no-primitive-wrappers,no-proto,no-redeclare,no-redundant-assignments,no-redundant-boolean,no-redundant-jump,no-redundant-roles,no-redundant-should-component-update,no-referrer-policy,no-render-return-value,no-same-line-conditional,no-self-assign,no-self-compare,no-sequences,no-setter-return,no-small-switch,no-sparse-arrays,no-static-element-interactions,no-string-refs,no-this-in-sfc,no-throw-literal,no-try-promise,no-undef-init,no-unenclosed-multiline-block,no-unescaped-entities,no-uniq-key,no-unknown-property,no-unneeded-ternary,no-unreachable,no-unsafe,no-unsafe-finally,no-unsafe-negation,no-unsafe-optional-chaining,no-unsafe-unzip,no-unstable-nested-components,no-unthrown-error,no-unused-collection,no-unused-expressions,no-unused-private-class-members,no-unused-prop-types,no-use-of-empty-return-value,no-useless-call,no-useless-catch,no-useless-constructor,no-useless-increment,no-useless-react-setstate,no-useless-rename,no-vue-bypass-sanitization,no-weak-cipher,no-weak-keys,no-with,non-existent-operator,null-dereference,os-command,post-message,prefer-default-last,prefer-for-of,prefer-object-has-own,prefer-object-spread,prefer-promise-reject-errors,prefer-promise-shorthand,prefer-regex-literals,prefer-single-boolean-return,prefer-spread,prefer-string-starts-ends-with,prefer-tag-over-role,prefer-while,production-debug,prop-types,pseudo-random,publicly-writable-directories,regex-complexity,require-render-return,role-has-required-aria-props,role-supports-aria-props,rules-of-hooks,session-regeneration,single-char-in-character-classes,single-character-alternation,slow-regex,sonar-block-scoped-var,sonar-jsx-no-leaked-render,sonar-max-params,sonar-no-control-regex,sonar-no-dupe-keys,sonar-no-empty-character-class,sonar-no-fallthrough,sonar-no-invalid-regexp,sonar-no-misleading-character-class,sonar-no-regex-spaces,sonar-no-unused-class-component-methods,sonar-no-unused-vars,sonar-prefer-optional-chain,sonar-prefer-regexp-exec,sql-queries,stateful-regex,strict-transport-security,super-invocation,tabindex-no-positive,todo-tag,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,unnecessary-character-escapes,unused-import,unused-named-groups,unverified-certificate,unverified-hostname,updated-const-var,updated-loop-counter,use-isnan,valid-typeof,void-use,weak-ssl,x-powered-by,xml-parser-xxe
2024-09-24 10:42:29,708	[STDOUT]	(3556859) 10:42:29.707 DEBUG: Linter config: {"language":"js","fileType":"TEST"} with assertions-in-tests,chai-determinate-assertion,disabled-timeout,inverted-assertion-arguments,no-code-after-done,no-empty-test-file,no-exclusive-tests,no-ignored-exceptions,no-incomplete-assertions,no-same-argument-assert,stable-tests,test-check-exception
2024-09-24 10:42:29,708	[STDOUT]	(3556859) 10:42:29.707 DEBUG: Linter config: {"language":"ts","fileType":"MAIN"} with alt-text,anchor-has-content,anchor-is-valid,anchor-precedence,arguments-order,aria-activedescendant-has-tabindex,aria-proptypes,aria-role,aria-unsupported-elements,autocomplete-valid,aws-apigateway-public-api,aws-ec2-rds-dms-public,aws-ec2-unencrypted-ebs-volume,aws-efs-unencrypted,aws-iam-all-privileges,aws-iam-privilege-escalation,aws-iam-public-access,aws-opensearchservice-domain,aws-rds-unencrypted-databases,aws-restricted-ip-admin-access,aws-s3-bucket-granted-access,aws-s3-bucket-insecure-http,aws-s3-bucket-public-access,aws-s3-bucket-versioning,aws-sagemaker-unencrypted-notebook,aws-sns-unencrypted-topics,aws-sqs-unencrypted-queue,bitwise-operators,call-argument-line,certificate-transparency,class-name,code-eval,cognitive-complexity,comma-or-logical-or-case,concise-regex,confidential-information-logging,constructor-for-side-effects,content-length,content-security-policy,cookie-no-httponly,cors,csrf,default-param-last,default-props-match-prop-types,deprecation,disabled-auto-escaping,disabled-resource-integrity,duplicates-in-character-class,empty-string-repetition,encryption-secure-mode,existing-groups,file-permissions,file-uploads,fixme-tag,for-loop-increment-sign,frame-ancestors,function-inside-loop,generator-without-yield,hashing,heading-has-content,hidden-files,hook-use-state,html-has-lang,iframe-has-title,img-redundant-alt,index-of-compare-to-positive-number,insecure-cookie,insecure-jwt-token,interactive-supports-focus,jsx-child-element-spacing,jsx-key,jsx-no-comment-textnodes,jsx-no-constructed-context-values,jsx-no-useless-fragment,jsx-pascal-case,label-has-associated-control,label-position,link-with-target-blank,max-switch-cases,media-has-caption,misplaced-loop-counter,mouse-events-a11y,new-cap,new-operator-misuse,no-absolute-path,no-access-key,no-access-state-in-setstate,no-accessor-field-mismatch,no-all-duplicated-branches,no-alphabetical-sort,no-angular-bypass-sanitization,no-aria-hidden-on-focusable,no-array-delete,no-array-index-key,no-associative-arrays,no-base-to-string,no-caller,no-case-declarations,no-case-label-in-switch,no-children-prop,no-clear-text-protocols,no-collection-size-mischeck,no-commented-code,no-confusing-non-null-assertion,no-constant-binary-expression,no-constructor-return,no-danger-with-children,no-dead-store,no-delete-var,no-deprecated-react,no-direct-mutation-state,no-duplicate-enum-values,no-duplicate-in-composite,no-duplicated-branches,no-duplicates,no-element-overwrite,no-empty,no-empty-after-reluctant,no-empty-alternatives,no-empty-collection,no-empty-function,no-empty-group,no-empty-pattern,no-equals-in-for-termination,no-extend-native,no-extra-bind,no-extra-boolean-cast,no-extraneous-class,no-find-dom-node,no-global-this,no-globals-shadowing,no-gratuitous-expressions,no-hardcoded-credentials,no-hardcoded-ip,no-hook-setter-in-body,no-identical-conditions,no-identical-expressions,no-identical-functions,no-ignored-return,no-import-assign,no-in-misuse,no-interactive-element-to-noninteractive-role,no-intrusive-permissions,no-invalid-await,no-invariant-returns,no-inverted-boolean-check,no-ip-forward,no-is-mounted,no-labels,no-literal-call,no-lone-blocks,no-lonely-if,no-loss-of-precision,no-mime-sniff,no-misleading-array-reverse,no-misused-new,no-misused-promises,no-mixed-content,no-mixed-enums,no-multi-str,no-mutable-exports,no-nested-assignment,no-nested-conditional,no-nested-functions,no-nested-template-literals,no-noninteractive-element-interactions,no-noninteractive-element-to-interactive-role,no-noninteractive-tabindex,no-octal,no-octal-escape,no-one-iteration-loop,no-os-command-from-path,no-parameter-reassignment,no-primitive-wrappers,no-proto,no-redundant-assignments,no-redundant-boolean,no-redundant-jump,no-redundant-optional,no-redundant-roles,no-redundant-should-component-update,no-redundant-type-constituents,no-referrer-policy,no-render-return-value,no-same-line-conditional,no-self-assign,no-self-compare,no-sequences,no-small-switch,no-sparse-arrays,no-static-element-interactions,no-string-refs,no-table-as-layout,no-this-in-sfc,no-throw-literal,no-try-promise,no-undefined-argument,no-unenclosed-multiline-block,no-unescaped-entities,no-uniq-key,no-unknown-property,no-unnecessary-type-assertion,no-unnecessary-type-constraint,no-unneeded-ternary,no-unreachable,no-unsafe,no-unsafe-finally,no-unsafe-negation,no-unsafe-optional-chaining,no-unsafe-unzip,no-unstable-nested-components,no-unthrown-error,no-unused-collection,no-unused-expressions,no-unused-private-class-members,no-unused-prop-types,no-use-of-empty-return-value,no-useless-call,no-useless-catch,no-useless-constructor,no-useless-increment,no-useless-intersection,no-useless-react-setstate,no-useless-rename,no-var,no-vue-bypass-sanitization,no-weak-cipher,no-weak-keys,non-existent-operator,object-alt-content,os-command,post-message,prefer-as-const,prefer-default-last,prefer-enum-initializers,prefer-for-of,prefer-function-type,prefer-literal-enum-member,prefer-namespace-keyword,prefer-nullish-coalescing,prefer-object-has-own,prefer-object-spread,prefer-promise-reject-errors,prefer-promise-shorthand,prefer-regex-literals,prefer-return-this-type,prefer-spread,prefer-string-starts-ends-with,prefer-tag-over-role,prefer-type-guard,prefer-while,production-debug,pseudo-random,public-static-readonly,publicly-writable-directories,reduce-initial-value,redundant-type-aliases,regex-complexity,require-render-return,role-has-required-aria-props,role-supports-aria-props,rules-of-hooks,session-regeneration,single-char-in-character-classes,single-character-alternation,slow-regex,sonar-block-scoped-var,sonar-jsx-no-leaked-render,sonar-max-params,sonar-no-control-regex,sonar-no-dupe-keys,sonar-no-empty-character-class,sonar-no-fallthrough,sonar-no-invalid-regexp,sonar-no-misleading-character-class,sonar-no-regex-spaces,sonar-no-unused-class-component-methods,sonar-prefer-optional-chain,sonar-prefer-read-only-props,sonar-prefer-regexp-exec,sql-queries,stateful-regex,strict-transport-security,super-invocation,tabindex-no-positive,table-header,table-header-reference,todo-tag,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,ucfg,unnecessary-character-escapes,unused-import,unused-named-groups,unverified-certificate,unverified-hostname,updated-loop-counter,use-isnan,use-type-alias,void-use,weak-ssl,x-powered-by,xml-parser-xxe
2024-09-24 10:42:29,708	[STDOUT]	(3556859) 10:42:29.707 DEBUG: Linter config: {"language":"ts","fileType":"TEST"} with assertions-in-tests,chai-determinate-assertion,disabled-timeout,inverted-assertion-arguments,no-code-after-done,no-empty-test-file,no-exclusive-tests,no-ignored-exceptions,no-incomplete-assertions,no-same-argument-assert,stable-tests,test-check-exception
2024-09-24 10:42:29,709	[STDOUT]	(3556859) 10:42:29.708 DEBUG: Found file: <path/to>/package.json
2024-09-24 10:46:56,115	[STDOUT]	(3556859) 10:46:56.115 INFO: Hit the cache for 0 out of 0
2024-09-24 10:46:56,116	[STDOUT]	(3556859) 10:46:56.116 DEBUG: Shutting down the worker
2024-09-24 10:46:56,116	[STDOUT]	(3556859) 10:46:56.116 INFO: Rule | Time (ms) | Relative
2024-09-24 10:46:56,116	[STDOUT]	(3556859) 10:46:56.116 INFO: :----|----------:|--------:
2024-09-24 10:46:56,116	[STDOUT]	(3556859) 10:46:56.116 DEBUG: The worker thread exited with code 0
2024-09-24 10:46:56,116	[STDOUT]	(3556859) 10:46:56.116 DEBUG: The bridge server shut down
2024-09-24 10:46:56,117	[STDOUT]	(3556859) 10:46:56.116 INFO: Rule | Time (ms) | Relative
2024-09-24 10:46:56,117	[STDOUT]	(3556859) 10:46:56.116 INFO: :----|----------:|--------:
2024-09-24 10:46:56,125	[STDOUT]	(3556859) 10:46:56.125 INFO: Miss the cache for 0 out of 0
2024-09-24 10:46:57,026	[STDOUT]	(3556859) 10:46:57.026 INFO: ------------------------------------------------------------------------
2024-09-24 10:46:57,026	[STDOUT]	(3556859) 10:46:57.026 INFO: EXECUTION FAILURE
2024-09-24 10:46:57,026	[STDOUT]	(3556859) 10:46:57.026 INFO: ------------------------------------------------------------------------
2024-09-24 10:46:57,026	[STDOUT]	(3556859) 10:46:57.026 INFO: Total time: 4:43.007s
2024-09-24 10:46:57,078	[STDERR]	(3556859) 10:46:57.078 ERROR: Error during SonarScanner execution
2024-09-24 10:46:57,078	[STDOUT]	(3556859) 10:46:57.077 INFO: Final Memory: 16M/80M
2024-09-24 10:46:57,078	[STDOUT]	(3556859) 10:46:57.077 INFO: ------------------------------------------------------------------------
2024-09-24 10:46:57,091	[STDERR]	(3556859) java.lang.OutOfMemoryError: Java heap space
2024-09-24 10:46:57,091	[STDERR]	(3556859) 	at java.base/java.io.File.listFiles(Unknown Source)
2024-09-24 10:46:57,091	[STDERR]	(3556859) 	at org.sonar.plugins.javascript.bridge.TsConfigProvider$LookupTsConfigProvider.tsconfigs(TsConfigProvider.java:176)
2024-09-24 10:46:57,091	[STDERR]	(3556859) 	at org.sonar.plugins.javascript.bridge.TsConfigProvider.tsconfigs(TsConfigProvider.java:94)
2024-09-24 10:46:57,091	[STDERR]	(3556859) 	at org.sonar.plugins.javascript.bridge.TsConfigProvider.getTsConfigs(TsConfigProvider.java:89)
2024-09-24 10:46:57,091	[STDERR]	(3556859) 	at org.sonar.plugins.javascript.bridge.JsTsSensor.analyzeFiles(JsTsSensor.java:104)
2024-09-24 10:46:57,091	[STDERR]	(3556859) 	at org.sonar.plugins.javascript.bridge.AbstractBridgeSensor.execute(AbstractBridgeSensor.java:74)
2024-09-24 10:46:57,091	[STDERR]	(3556859) 	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:64)
2024-09-24 10:46:57,091	[STDERR]	(3556859) 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:88)
2024-09-24 10:46:57,091	[STDERR]	(3556859) 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:61)
2024-09-24 10:46:57,091	[STDERR]	(3556859) 	at org.sonar.scanner.sensor.ModuleSensorsExecutor$$Lambda$756/0x000000080144fb00.run(Unknown Source)
2024-09-24 10:46:57,091	[STDERR]	(3556859) 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:79)
2024-09-24 10:46:57,091	[STDERR]	(3556859) 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:61)
2024-09-24 10:46:57,091	[STDERR]	(3556859) 	at org.sonar.scanner.scan.SpringModuleScanContainer.doAfterStart(SpringModuleScanContainer.java:82)
2024-09-24 10:46:57,091	[STDERR]	(3556859) 	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
2024-09-24 10:46:57,091	[STDERR]	(3556859) 	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
2024-09-24 10:46:57,091	[STDERR]	(3556859) 	at org.sonar.scanner.scan.SpringProjectScanContainer.scan(SpringProjectScanContainer.java:204)
2024-09-24 10:46:57,091	[STDERR]	(3556859) 	at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:200)
2024-09-24 10:46:57,091	[STDERR]	(3556859) 	at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:173)
2024-09-24 10:46:57,091	[STDERR]	(3556859) 	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
2024-09-24 10:46:57,091	[STDERR]	(3556859) 	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
2024-09-24 10:46:57,091	[STDERR]	(3556859) 	at org.sonar.scanner.bootstrap.SpringScannerContainer.doAfterStart(SpringScannerContainer.java:351)
2024-09-24 10:46:57,091	[STDERR]	(3556859) 	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
2024-09-24 10:46:57,091	[STDERR]	(3556859) 	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
2024-09-24 10:46:57,091	[STDERR]	(3556859) 	at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:144)
2024-09-24 10:46:57,091	[STDERR]	(3556859) 	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
2024-09-24 10:46:57,091	[STDERR]	(3556859) 	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
2024-09-24 10:46:57,091	[STDERR]	(3556859) 	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73)
2024-09-24 10:46:57,092	[STDERR]	(3556859) 	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
2024-09-24 10:46:57,092	[STDERR]	(3556859) 	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
2024-09-24 10:46:57,092	[STDERR]	(3556859) 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2024-09-24 10:46:57,092	[STDERR]	(3556859) 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2024-09-24 10:46:57,092	[STDERR]	(3556859) 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2024-09-24 10:46:57,124	[STDOUT]	(3556859) 10:46:57.124 DEBUG: Cleanup org.eclipse.jgit.util.FS$FileStoreAttributes$$Lambda$363/0x0000000801304c00@1686f0b4 during JVM shutdown
2024-09-24 10:46:57,791	[ERROR]	####################################################################
2024-09-24 10:46:57,791	[ERROR]	10:46:57.078 ERROR: Error during SonarScanner execution

sonar properties:

sonar.host.url=<url>
sonar.projectKey=<project>
sonar.projectBaseDir=<root>
sonar.verbose=true
sonar.login=<token>
sonar.c.file.suffixes=-
sonar.objc.file.suffixes=-
sonar.cpp.file.suffixes=- 
sonar.sources=<root>/common,<root>/ex/components/modules
sonar.test.exclusions=**/*.ts,**/*.js
sonar.branch.name=JS-Files
sonar.exclusions=**/*.ts,**/*.test.js,**/path/to/package.json/**/*,**/package.json

I would only like to analyse JS files, not package.json or ts or tsx or jsx

Thanks

found a work around which was to run the analysis before the package.json gets generated

hello @hus90 ,

It would still be interesting for us to understand what’s happened because it’s unusual that we’ve got an OutOfMemory exception in this part of the code. Could you please share how the package.json looks? How much memory is available for the Java heap? Do you set the heap size explicitly (—Xmx)?

Do you have symlinks, or something similar that could cause loops when traversing the filesystem?

hi @saberduck ,

package.json

{
  "author": {
    "name": "Yuta Imaya"
  },
  "contributors": {
    "name": "Yuta Imaya",
    "email": "imaya.devel@gmail.com"
  },
  "name": "zlibjs",
  "description": "zlib, gzip and zip implementation in JavaScript",
  "version": "0.1.6",
  "main": "./bin/node-zlib.js",
  "homepage": "https://github.com/imaya/zlib.js",
  "repository": {
    "type": "git",
    "url": "git://github.com/imaya/zlib.js.git"
  },
  "dependencies" : {
    "buster" : ">=0.6.3"
  },
  "devDependencies": {},
  "optionalDependencies": {},
  "engines": {
    "node": "*"
  },
  "scripts" : {
    "test" : "node_modules/.bin/buster-test"
  }
}

Our buildserver contains 32gb RAM, and we have allocated 7GB of ram to the docker container which runs the analysis. I’ve tried setting the size of the heap up to -Xm4 but no luck

Yes we do have symlinks but not sure if they could cause any loops

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.