halo-dev/halo · error · PluginDependencyException.WrongVersionsException

https://halo.run/probs/plugin-dependencies-with-wrong-versions

https://halo.run/probs/plugin-dependencies-with-wrong-versions

Error message

Dependencies have wrong version.

What it means

Error "Dependencies have wrong version." thrown in halo-dev/halo.

Source

Thrown at application/src/main/java/run/halo/app/plugin/PluginServiceImpl.java:192

        resolvedPlugins.stream().map(PluginWrapper::getDescriptor).forEach(pluginDescriptors::add);

        var pluginDescriptor = YamlPluginDescriptorFinder.convert(plugin);
        pluginDescriptors.add(pluginDescriptor);

        var deptResolver = new DependencyResolver(pluginManager.getVersionManager());
        var result = deptResolver.resolve(pluginDescriptors);
        if (result.hasCyclicDependency()) {
            throw new PluginDependencyException.CyclicException();
        }
        var notFoundDependencies = result.getNotFoundDependencies();
        if (!CollectionUtils.isEmpty(notFoundDependencies)) {
            throw new PluginDependencyException.NotFoundException(notFoundDependencies);
        }

        var wrongVersionDependencies = result.getWrongVersionDependencies();
        if (!CollectionUtils.isEmpty(wrongVersionDependencies)) {
            throw new PluginDependencyException.WrongVersionsException(wrongVersionDependencies);
        }
    }

    @Override
    public Mono<Plugin> upgrade(String name, Path path) {
        return findPluginManifest(path)
                .doOnNext(plugin -> {
                    satisfiesRequiresVersion(plugin);
                    checkDependencies(plugin);
                })
                .flatMap(pluginInPath -> {
                    // pre-check the plugin in the path
                    Assert.notNull(
                            pluginInPath.statusNonNull().getLoadLocation(),
                            "plugin.status.load-location must not be null");
                    if (!Objects.equals(name, pluginInPath.getMetadata().getName())) {
                        return Mono.error(new ServerWebInputException("The provided plugin "
                                + pluginInPath.getMetadata().getName() + " didn't match the given plugin " + name));

View on GitHub (pinned to d2f5165f9c)

Solutions

  1. Upgrade or downgrade the dependent plugins to versions satisfying the version constraints declared in the plugin's 'dependsOn' spec.
  2. Check each dependency's required version range in plugin.yaml and install a compatible version of that plugin.
  3. If the plugin itself declares an incorrect version constraint, rebuild the plugin with a corrected constraint matching the available dependency versions.

When it happens

Trigger: Thrown at application/src/main/java/run/halo/app/plugin/PluginServiceImpl.java:192 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of halo-dev/halo@d2f5165f9c (2026-08-14). Data as JSON: /api/errors/1c99a903035ddafd. Report an issue: GitHub.