Unable to register extension A.A.A.A.A.A from plugin 'securitypythonfrontend'

Hello Everyone,

Started getting this issue this morning with no changes to our codebase.

  • SonarCloud
  • Gradle Plugin 2.7 and 2.8
  • Java Project /JS Projects (no python)
  • Atlassian Pipelines Agent for build system.
  • Build during PR
  • What went wrong:
    Execution failed for task ‘:sonarqube’.
    Unable to register extension A.A.A.A.A.A from plugin ‘securitypythonfrontend’
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ‘:sonarqube’.
    Caused by: java.lang.IllegalStateException: Unable to register extension A.A.A.A.A.A from plugin ‘securitypythonfrontend’
    Caused by: java.lang.NoClassDefFoundError: org/sonar/sslr/grammar/GrammarRuleKey
    Caused by: java.lang.ClassNotFoundException: org.sonar.sslr.grammar.GrammarRuleKey

Looks like its possible related to the sonar cache being saved in atlassian pipelines.

Hi @jgrodskiy, are you still encoutering the issue ?

Yes it is, I have narrowed it down to having to do with the Sonar cache (sonar: ~/.sonar/cache) on Atlassian Pipelines agent.
I have opened a ticket up with them also but they have no idea and claim no pipelines changes have went through.

If I delete the cache it will work and re-upload the cache but the next run will crash again with the same error.

Locally If i run i have no issues with the cache, and Locally if I run with docker and the same container I have no issues.

hello @jgrodskiy,

sorry for this issue, and thanks for reporting it. We would need more information to understand the root cause. Would it be possible for you to share cache content with us? You can do it privately if needed. Is it private or public project? Does it happen on all your projects, or only on this one?

Hey,

The projects are private, I can provided privately but currently I only have access to the cache locally. I can see if atlassian can provide the cache from the cloud for me…

Edit:
Yes this started happening on all our repos. Specifically on Pull Request builds which is when we run the scan. 90% of the projects use the boilerplate yaml generated by SonarCloud when adding a project.

Thanks

I’m having the same issue with pipeline caches enabled. Did this ever get resolved?

I have the same issue - any updates?

There was a bit of back and forth on this issue, the main cause was one of the plugin files was not getting correct permissions in pipelines. This caused the file to not get saved in the pipelines cache, but it also didn’t trigger a new cache download when it gets pulled back.

We just turned of the sonar cache for the time being, and haven’t had the chance to go back and figure it out (might of even gotten fixed.).

1 Like

Got the same, I use SonarQube Server 8.5 and Gradle plugin 3.0.
Gradle itself is 6.6, if that matters.

How did you turn the cache off? Could you please share the config/CLI flag for that? Which versions combo worked for you?
Couldn’t find anything useful in the docs, but maybe I’ve missed something

Remove the cache declaration from your pipelines build

definitions:
  caches:
    sonar: ~/.sonar/cache  # Remove this line
  steps:

Just noticed your issue is for the SonarQube Server, it might be related it might be different. Delete the folder above and re-run the build and see if it helps, if it does the cache is the issue. We use a docker based build so the folder unless explicitly saved gets removed every build anyway for us.

1 Like

I use GitLab CI to run the Gradle plugin with a docker-based CI runner, so it’s more or less the same as you do, but I’ve never used cache there, so my builds should have a clean cache each time.

I’ll double-check that, thanks.