{"record":{"id":"80d5d278a51fa3e3","repo":"halo-dev/halo","slug":"https-halo-run-probs-plugin-cyclic-dependency","errorCode":"https://halo.run/probs/plugin-cyclic-dependency","errorMessage":"A cyclic dependency was detected.","messagePattern":"A cyclic dependency was detected\\.","errorType":"http","errorClass":"PluginDependencyException.CyclicException","httpStatus":400,"severity":"error","filePath":"application/src/main/java/run/halo/app/plugin/PluginServiceImpl.java","lineNumber":183,"sourceCode":"                                    // Disable auto enable after installation\n                                    p.getSpec().setEnabled(false);\n                                })\n                                .flatMap(client::create))));\n    }\n\n    private void checkDependencies(Plugin plugin) {\n        var resolvedPlugins = new ArrayList<>(pluginManager.getResolvedPlugins());\n        var pluginDescriptors = new ArrayList<PluginDescriptor>(resolvedPlugins.size() + 1);\n\n        resolvedPlugins.stream().map(PluginWrapper::getDescriptor).forEach(pluginDescriptors::add);\n\n        var pluginDescriptor = YamlPluginDescriptorFinder.convert(plugin);\n        pluginDescriptors.add(pluginDescriptor);\n\n        var deptResolver = new DependencyResolver(pluginManager.getVersionManager());\n        var result = deptResolver.resolve(pluginDescriptors);\n        if (result.hasCyclicDependency()) {\n            throw new PluginDependencyException.CyclicException();\n        }\n        var notFoundDependencies = result.getNotFoundDependencies();\n        if (!CollectionUtils.isEmpty(notFoundDependencies)) {\n            throw new PluginDependencyException.NotFoundException(notFoundDependencies);\n        }\n\n        var wrongVersionDependencies = result.getWrongVersionDependencies();\n        if (!CollectionUtils.isEmpty(wrongVersionDependencies)) {\n            throw new PluginDependencyException.WrongVersionsException(wrongVersionDependencies);\n        }\n    }\n\n    @Override\n    public Mono<Plugin> upgrade(String name, Path path) {\n        return findPluginManifest(path)\n                .doOnNext(plugin -> {\n                    satisfiesRequiresVersion(plugin);\n                    checkDependencies(plugin);","sourceCodeStart":165,"sourceCodeEnd":201,"githubUrl":"https://github.com/halo-dev/halo/blob/d2f5165f9c8f055ffcb3fa9c3f4032821a7b68c8/application/src/main/java/run/halo/app/plugin/PluginServiceImpl.java#L165-L201","documentation":"Error \"A cyclic dependency was detected.\" thrown in halo-dev/halo.","triggerScenarios":"Thrown at application/src/main/java/run/halo/app/plugin/PluginServiceImpl.java:183 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the plugin dependency graph: two or more plugins declare dependencies on each other (directly or transitively).","Edit the plugin.yaml 'dependsOn' declarations of the involved plugins to remove the cycle, then rebuild and reinstall the plugins.","Use the dependency list reported in the error to find which plugins form the cycle and break it at the least important edge."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d2f5165f9c8f055ffcb3fa9c3f4032821a7b68c8","analyzedAt":"2026-08-14T00:18:38.915Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}