halo-dev/halo · error · IllegalArgumentException

Provider manifest must be an object

Error message

Provider manifest must be an object

What it means

Error "Provider manifest must be an object" thrown in halo-dev/halo.

Source

Thrown at application/src/main/java/run/halo/app/plugin/UiPluginBundleServiceImpl.java:217

        if (manifestResource == null) {
            return ClassifiedProvider.legacy(candidate);
        }
        try {
            var manifest = readManifest(candidate, manifestResource);
            return ClassifiedProvider.esm(candidate, manifest);
        } catch (Exception e) {
            return ClassifiedProvider.invalid(
                    candidate, Objects.toString(e.getMessage(), e.getClass().getSimpleName()));
        }
    }

    private ProviderManifest readManifest(ProviderCandidate candidate, Resource resource) throws IOException {
        JsonNode manifest;
        try (var inputStream = resource.getInputStream()) {
            manifest = JSON_MAPPER.readTree(inputStream);
        }
        if (!manifest.isObject()) {
            throw new IllegalArgumentException("Provider manifest must be an object");
        }
        var fields = new HashSet<String>();
        fields.addAll(manifest.propertyNames());
        if (!fields.containsAll(Set.of("format", "entry"))
                || !Set.of("format", "entry", "style").containsAll(fields)) {
            throw new IllegalArgumentException("Provider manifest must contain format, entry, and optional style only");
        }
        if (!"esm".equals(manifest.path("format").textValue())) {
            throw new IllegalArgumentException("Provider manifest format must be esm");
        }
        var entry = validateManifestResource(candidate, manifest.path("entry"));
        var style = manifest.has("style") ? validateManifestResource(candidate, manifest.path("style")) : null;
        return new ProviderManifest(entry, style);
    }

    private String validateManifestResource(ProviderCandidate candidate, JsonNode value) {
        if (!value.isTextual()) {
            throw new IllegalArgumentException("Provider resource path must be a string");

View on GitHub (pinned to d2f5165f9c)

Solutions

  1. Ensure the UI plugin bundle contains a valid provider manifest JSON object (not an array, string, or empty value).
  2. Rebuild the UI plugin with @halo-dev/ui-plugin-bundler-kit so the manifest is generated correctly.
  3. Check that the manifest file inside the plugin bundle is valid JSON and parses to an object.

When it happens

Trigger: Thrown at application/src/main/java/run/halo/app/plugin/UiPluginBundleServiceImpl.java:217 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/baedd91b10c256b5. Report an issue: GitHub.