sonar-flutter icon indicating copy to clipboard operation
sonar-flutter copied to clipboard

Flutter plugin 0.5.2 fails to start SonarQube DCE 2025.1

Open patrickpeck opened this issue 11 months ago • 3 comments

Dear team,

I am currently working on an upgrade of our SonarQube DCE instance from version 9.9 LTA to 2025.1 LTA. We are using the flutter plugin 0.5.2. In SonarQube DCE 9.9 LTA the plugins works fine, but it prevents SonarQube 2025.1 from starting up, with the following error message:

2025.02.19 08:08:51 INFO  sonarqube-app-5b5d7bb67-rslbg web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.platform.web.WebServiceFilter@b849fa6 [pattern=UrlPattern{inclusions=[/api/system/migrate_db.*, ...], exclusions=[/api/components/update_key, ...]}]
2025.02.19 08:08:51 INFO  sonarqube-app-5b5d7bb67-rslbg web[][o.s.s.p.DetectPluginChange] Detect plugin changes
2025.02.19 08:08:55 ERROR sonarqube-app-5b5d7bb67-rslbg web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
java.lang.IllegalStateException: Fail to load plugin dart [dart]
	at org.sonar.server.plugins.ServerExtensionInstaller.installExtensions(ServerExtensionInstaller.java:81)
	at org.sonar.server.platform.platformlevel.PlatformLevel4.start(PlatformLevel4.java:757)
	at org.sonar.server.platform.PlatformImpl.start(PlatformImpl.java:217)
	at org.sonar.server.platform.PlatformImpl.startLevel34Containers(PlatformImpl.java:197)
	at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.runIfNotAborted(PlatformImpl.java:365)
	at org.sonar.server.platform.PlatformImpl$1.doRun(PlatformImpl.java:116)
	at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.run(PlatformImpl.java:349)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: org.springframework.beans.factory.support.BeanDefinitionOverrideException: Invalid bean definition with name 'jdk.internal.loader.ClassLoaders$AppClassLoader@724af044-org.sonar.api.config.PropertyDefinition-sonar.dart.file.suffixes' defined in null: Cannot register bean definition [Generic bean: class=org.sonar.api.config.PropertyDefinition; scope=singleton; abstract=false; lazyInit=null; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; fallback=false; factoryBeanName=null; factoryMethodName=null; initMethodNames=null; destroyMethodNames=null] for bean 'jdk.internal.loader.ClassLoaders$AppClassLoader@724af044-org.sonar.api.config.PropertyDefinition-sonar.dart.file.suffixes' since there is already [Generic bean: class=org.sonar.api.config.PropertyDefinition; scope=singleton; abstract=false; lazyInit=null; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; fallback=false; factoryBeanName=null; factoryMethodName=null; initMethodNames=null; destroyMethodNames=null] bound.
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.registerBeanDefinition(DefaultListableBeanFactory.java:1151)
	at org.springframework.context.support.GenericApplicationContext.registerBeanDefinition(GenericApplicationContext.java:351)
	at org.springframework.beans.factory.support.BeanDefinitionReaderUtils.registerBeanDefinition(BeanDefinitionReaderUtils.java:164)
	at org.springframework.context.annotation.AnnotatedBeanDefinitionReader.doRegisterBean(AnnotatedBeanDefinitionReader.java:289)
	at org.springframework.context.annotation.AnnotatedBeanDefinitionReader.registerBean(AnnotatedBeanDefinitionReader.java:233)
	at org.springframework.context.annotation.AnnotationConfigApplicationContext.registerBean(AnnotationConfigApplicationContext.java:198)
	at org.sonar.core.platform.SpringComponentContainer.registerInstance(SpringComponentContainer.java:148)
	at org.sonar.core.platform.SpringComponentContainer.addExtension(SpringComponentContainer.java:164)
	at org.sonar.core.platform.SpringComponentContainer.addExtension(SpringComponentContainer.java:261)
	at org.sonar.core.platform.SpringComponentContainer.addExtension(SpringComponentContainer.java:41)
	at org.sonar.server.plugins.ServerExtensionInstaller.installExtension(ServerExtensionInstaller.java:89)
	at org.sonar.server.plugins.ServerExtensionInstaller.installExtensions(ServerExtensionInstaller.java:73)
	... 7 common frames omitted
2025.02.19 08:08:55 INFO  sonarqube-app-5b5d7bb67-rslbg web[][o.s.p.ProcessEntryPoint] Hard stopping process
2025.02.19 08:08:56 INFO  sonarqube-app-5b5d7bb67-rslbg web[][o.h.v.i.util.Version] HV000001: Hibernate Validator null
2025.02.19 08:08:56 WARN  sonarqube-app-5b5d7bb67-rslbg web[][o.s.p.ProcessEntryPoint$HardStopperThread] Can not stop in 1000ms
2025.02.19 08:08:57 INFO  sonarqube-app-5b5d7bb67-rslbg web[][c.z.h.HikariDataSource] HikariPool-1 - Shutdown initiated...
2025.02.19 08:08:57 INFO  sonarqube-app-5b5d7bb67-rslbg web[][c.z.h.HikariDataSource] HikariPool-1 - Shutdown completed.
2025.02.19 08:08:57 INFO  sonarqube-app-5b5d7bb67-rslbg app[][o.s.a.SchedulerImpl] Process[Web Server] is stopped
2025.02.19 08:08:57 INFO  sonarqube-app-5b5d7bb67-rslbg app[][o.s.a.SchedulerImpl] SonarQube is stopped

Thank you, Patrick

patrickpeck avatar Feb 19 '25 08:02 patrickpeck

Same problem here.

xsak avatar Feb 20 '25 13:02 xsak

As of SonarQube 10.9 LTS (or in other words - 2025.01 LTA), there is supports by default for Dart/Flutter. Source: https://docs.sonarsource.com/sonarqube-server/latest/server-upgrade-and-maintenance/release-notes-and-notices/lta-to-lta-release-notes/#languages

Dart/Flutter (10.6 - 10.8)

Analysis of [Dart/Flutter](https://docs.sonarsource.com/sonarqube-server/latest/analyzing-source-code/languages/dart/) apps is now available. 115 Dart rules were introduced.

EDIT: This is only valid for non-community editions. Community edition (also now known as Community Build) does NOT support Dart/Flutter. Only from Developer onwards:

Image

Meaning, we would still need this plugin maintained.

ku4eto avatar Mar 06 '25 10:03 ku4eto

Hi team! Thank you for your work so far, it's very valuable!

We're using SonarQube 10.5.1 Community Edition at the moment and the plugin is working fine, but my users are complaining because of the message appearing on the top of the page : "You’re running a version of SonarQube that is no longer active. Please upgrade to an active version immediately.".

We planned to update to v2025 LTA but this issue prevent us to do so.

Please help! @zippy1978

mrjoops avatar Apr 03 '25 13:04 mrjoops

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] avatar Jul 03 '25 03:07 github-actions[bot]

We had the same issue, I've created a pull request to make the plugin compatible with Sonar Community 25.3: https://github.com/insideapp-oss/sonar-flutter/pull/254

If you need the updated plugin, I've released it on my fork: https://github.com/AdrienAudouard/sonar-flutter/releases/tag/v0.5.3

AdrienAudouard avatar Jul 15 '25 12:07 AdrienAudouard

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] avatar Oct 15 '25 02:10 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Oct 29 '25 02:10 github-actions[bot]