The field 'ignoreFontFamilies' does not exist

It seems like there may be a bug in the most recent SonarCloud scanner utilized in the GitHub scanner action (4.6)

ERROR: Error during SonarScanner execution
java.lang.IllegalStateException: The field 'ignoreFontFamilies' does not exist or is not annotated with @RuleProperty in the class org.sonar.plugins.javascript.css.rules.FontFamilyNoMissingGenericFamilyKeyword

The text ignoreFontFamilies exists nowhere in our project so I assume it’s not something on our end.

2 Likes

Hi,

Can you provide the full analysis log and the code that caused this?

 
Ann

I can’t give you access to my codebase, no, but here are debug logs:

##[debug]Evaluating: secrets.GITHUB_TOKEN
##[debug]Evaluating Index:
##[debug]..Evaluating secrets:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'GITHUB_TOKEN'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Evaluating: secrets.SONAR_TOKEN
##[debug]Evaluating Index:
##[debug]..Evaluating secrets:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'SONAR_TOKEN'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Evaluating condition for step: 'Run Sonar scan'
##[debug]Evaluating: (success() && (inputs.ran == 'true') && (inputs.failed != 'true') && (inputs.package != 'e2e'))
##[debug]Evaluating And:
##[debug]..Evaluating success:
##[debug]..=> true
##[debug]..Evaluating Equal:
##[debug]....Evaluating Index:
##[debug]......Evaluating inputs:
##[debug]......=> Object
##[debug]......Evaluating String:
##[debug]......=> 'ran'
##[debug]....=> 'true'
##[debug]....Evaluating String:
##[debug]....=> 'true'
##[debug]..=> true
##[debug]..Evaluating NotEqual:
##[debug]....Evaluating Index:
##[debug]......Evaluating inputs:
##[debug]......=> Object
##[debug]......Evaluating String:
##[debug]......=> 'failed'
##[debug]....=> 'false'
##[debug]....Evaluating String:
##[debug]....=> 'true'
##[debug]..=> true
##[debug]..Evaluating NotEqual:
##[debug]....Evaluating Index:
##[debug]......Evaluating inputs:
##[debug]......=> Object
##[debug]......Evaluating String:
##[debug]......=> 'package'
##[debug]....=> 'client'
##[debug]....Evaluating String:
##[debug]....=> 'e2e'
##[debug]..=> true
##[debug]=> true
##[debug]Expanded: (true && ('true' == 'true') && ('false' != 'true') && ('client' != 'e2e'))
##[debug]Result: true
##[debug]Starting: Run Sonar scan
##[debug]Loading inputs
##[debug]Evaluating: format('{0}/{1}', github.workspace, inputs.package)
##[debug]Evaluating format:
##[debug]..Evaluating String:
##[debug]..=> '{0}/{1}'
##[debug]..Evaluating Index:
##[debug]....Evaluating github:
##[debug]....=> Object
##[debug]....Evaluating String:
##[debug]....=> 'workspace'
##[debug]..=> '/home/runner/work/unstoppable-domains-website/unstoppable-domains-website'
##[debug]..Evaluating Index:
##[debug]....Evaluating inputs:
##[debug]....=> Object
##[debug]....Evaluating String:
##[debug]....=> 'package'
##[debug]..=> 'client'
##[debug]=> '/home/runner/work/unstoppable-domains-website/unstoppable-domains-website/client'
##[debug]Result: '/home/runner/work/unstoppable-domains-website/unstoppable-domains-website/client'
##[debug]Loading env
Run sonarsource/sonarcloud-github-action@master
/usr/bin/docker run --name b31cbcb2b7a747644348970cac9bddcadef_b1a8c0 --label 294b31 --workdir /github/workspace --rm -e GITHUB_TOKEN -e SONAR_TOKEN -e INPUT_PROJECTBASEDIR -e INPUT_ARGS -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_REF_NAME -e GITHUB_REF_PROTECTED -e GITHUB_REF_TYPE -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e GITHUB_STEP_SUMMARY -e RUNNER_DEBUG -e RUNNER_OS -e RUNNER_ARCH -e RUNNER_NAME -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e ACTIONS_ID_TOKEN_REQUEST_URL -e ACTIONS_ID_TOKEN_REQUEST_TOKEN -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/unstoppable-domains-website/unstoppable-domains-website":"/github/workspace" 294b31:cbcb2b7a747644348970cac9bddcadef
INFO: Scanner configuration file: /opt/sonar-scanner/conf/sonar-scanner.properties
INFO: Project root configuration file: /github/workspace/client/sonar-project.properties
INFO: SonarScanner 4.6.2.2472
INFO: Java 11.0.14 Alpine (64-bit)
INFO: Linux 5.13.0-1021-azure amd64
INFO: User cache: /opt/sonar-scanner/.sonar/cache
INFO: Scanner configuration file: /opt/sonar-scanner/conf/sonar-scanner.properties
INFO: Project root configuration file: /github/workspace/client/sonar-project.properties
INFO: Analyzing on SonarCloud
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Load global settings
INFO: Load global settings (done) | time=573ms
INFO: Server id: 1BD809FA-AWHW8ct9-T_TB3XqouNu
INFO: User cache: /opt/sonar-scanner/.sonar/cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=138ms
INFO: Load/download plugins (done) | time=29465ms
INFO: Loaded core extensions: developer-scanner
INFO: Found an active CI vendor: 'Github Actions'
INFO: Load project settings for component key: 'unstoppabledomains_website_client'
INFO: Load project settings for component key: 'unstoppabledomains_website_client' (done) | time=133ms
INFO: Process project properties
INFO: Execute project builders
INFO: Execute project builders (done) | time=2ms
INFO: Project key: unstoppabledomains_website_client
INFO: Base dir: /github/workspace/client
INFO: Working dir: /github/workspace/client/.scannerwork
INFO: Load project branches
INFO: Load project branches (done) | time=168ms
INFO: Check ALM binding of project 'unstoppabledomains_website_client'
INFO: Detected project binding: BOUND
INFO: Check ALM binding of project 'unstoppabledomains_website_client' (done) | time=108ms
INFO: Load project pull requests
INFO: Load project pull requests (done) | time=619ms
INFO: Load branch configuration
INFO: Github event: pull_request
INFO: Auto-configuring pull request 4509
INFO: Load branch configuration (done) | time=682ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=200ms
INFO: Load active rules
INFO: Load active rules (done) | time=4820ms
INFO: Organization key: unstoppabledomains
INFO: Pull request 4509 for merge into master from fruwe/SRE-280
INFO: Load project repositories
INFO: Load project repositories (done) | time=588ms
INFO: SCM collecting changed files in the branch
INFO: SCM collecting changed files in the branch (done) | time=278ms
INFO: Indexing files...
INFO: Project configuration:
INFO:   Included sources: **/*.ts, **/*.tsx, **/*.js, **/*.jsx
INFO:   Excluded sources: **/build-wrapper-dump.json, node_modules/**/*, build/**/*, coverage/**/*
INFO:   Excluded sources for coverage: tests/**/*, **/*.test.ts, **/*.test.tsx, styles/**/*, scripts/**/*, public/**/*, __mocks__/**/*, static/**/*, **/types.ts, **/*.d.ts, csp/**/*, config/datadog.ts
INFO:   Excluded sources for duplication: tests/**/*, **/*.test.ts, **/*.test.tsx, pages/previous-privacy-policy*.tsx
INFO: 1589 files indexed
INFO: 1126 files ignored because of inclusion/exclusion patterns
INFO: 0 files ignored because of scm ignore settings
INFO: Quality profile for js: Sonar way
INFO: Quality profile for ts: Sonar way V2
INFO: ------------- Run sensors on module unstoppabledomains_website_client
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=120ms
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 46.291s
ERROR: Error during SonarScanner execution
INFO: Final Memory: 27M/94M
INFO: ------------------------------------------------------------------------
java.lang.IllegalStateException: The field 'ignoreFontFamilies' does not exist or is not annotated with @RuleProperty in the class org.sonar.plugins.javascript.css.rules.FontFamilyNoMissingGenericFamilyKeyword
	at org.sonar.api.batch.rule.Checks.configureFields(Checks.java:170)
	at org.sonar.api.batch.rule.Checks.instantiate(Checks.java:154)
	at org.sonar.api.batch.rule.Checks.addAnnotatedChecks(Checks.java:128)
	at org.sonar.plugins.javascript.css.CssRules.<init>(CssRules.java:72)
	at org.sonar.plugins.javascript.eslint.CssRuleSensor.<init>(CssRuleSensor.java:69)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at org.picocontainer.injectors.AbstractInjector.newInstance(AbstractInjector.java:145)
	at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:342)
	at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
	at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:364)
	at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
	at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
	at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
	at org.picocontainer.DefaultPicoContainer.getLocalInstance(DefaultPicoContainer.java:606)
	at org.picocontainer.DefaultPicoContainer.getComponents(DefaultPicoContainer.java:587)
	at org.sonar.core.platform.ComponentContainer.getComponentsByType(ComponentContainer.java:282)
	at org.sonar.scanner.bootstrap.AbstractExtensionDictionary.completeScannerExtensions(AbstractExtensionDictionary.java:68)
	at org.sonar.scanner.bootstrap.AbstractExtensionDictionary.getExtensions(AbstractExtensionDictionary.java:63)
	at org.sonar.scanner.bootstrap.AbstractExtensionDictionary.getFilteredExtensions(AbstractExtensionDictionary.java:53)
	at org.sonar.scanner.sensor.ModuleSensorExtensionDictionary.selectSensors(ModuleSensorExtensionDictionary.java:39)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$0(ModuleSensorsExecutor.java:41)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:66)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:41)
	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:64)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:440)
	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:436)
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:394)
	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.batch.bootstrapper.Batch.doExecute(Batch.java:58)
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:52)
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
	at com.sun.proxy.$Proxy0.execute(Unknown Source)
	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
	at org.sonarsource.scanner.cli.Main.main(Main.java:61)
ERROR: 
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
##[debug]Docker Action run completed with exit code 1
##[debug]Finishing: Run Sonar scan

Hi,

Thanks for the full log.

You’re not the only one to report this error, and “coincidentally,” we updated CSS analysis a few hours ago…

So we’re rolling that back. It’ll take another couple hours (:frowning:). Hopefully, we’ll update this thread again when it’s done.

 
Ann

Hi,

The rollback is complete. Can you try again, please?

 
Ann

This appears to be resolved, thanks

1 Like

TL;DR If you’ve landed on this thread because you’re analyzing on SonarCloud and getting the error message in the title, please wait 10 minutes and try again.


Hi all,

We just finished our postmortem on this & for a couple reasons I want to follow up here with what we found:

The problem was caused by a combination of factors:

  • Blue/Green deployment
  • the addition of a rule parameter in an update to CSS analysis

From the relevant (internal) ticket:

The new rule parameter is added to the [database] during the startup of the web leader in the inactive group.

After the rule parameter was inserted into the DB it is included in the api/rules/search endpoint. This endpoint is used by our scanners to load all the rules in the project’s QP.

However, the latest version of the analyzers does not get served until the blue/green deployment is fully completed. So during the duration of the blue/green deployment, the analyzer is initialised with a rule parameter that it does not know, which can lead to failures like [what we saw here]

I.e., this error was essentially transient for the ~10min Blue/Green deployment takes

And when we re-deploy this CSS update sometime in May, we’ll face it again. To mitigate the impact, we’ll make sure deployment happens during a low-activity time of day.

But if you’re analyzing on SonarCloud in May 2022 and seeing this error, please wait 10 minutes and try again. If you still get the error, then please do open a new thread.

 
Ann

1 Like

One more follow-up: we’re planning to do the re-deployment Wednesday, 4 May at 8 a.m. CEST.

this happens again. Please revert deploy again.

1 Like

it is happening again

@ganncamp could you please revert?

1 Like

Hey @jussiva.oura and @Andre_Quintino_Kuhne – are you still facing the issue? I believe you ran into the issue during the 10-minute window as we expected

I just ran an analysis of some CSS code without error.

looks fine