halo-dev/halo · error · IllegalArgumentException

Provider resource path must not be blank

Error message

Provider resource path must not be blank

What it means

Error "Provider resource path must not be blank" thrown in halo-dev/halo.

Source

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

        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");
        }
        var resourcePath = normalizeResourcePath(value.textValue());
        var resource = providerResource(candidate, resourcePath);
        if (resource == null || !resource.isReadable()) {
            throw new IllegalArgumentException(
                    "Provider resource does not exist inside its root: " + value.textValue());
        }
        return resourcePath;
    }

    private static String normalizeResourcePath(String resourcePath) {
        if (!StringUtils.hasText(resourcePath)) {
            throw new IllegalArgumentException("Provider resource path must not be blank");
        }
        var normalizedSlashes = resourcePath.replace('\\', '/');
        if (normalizedSlashes.startsWith("/")
                || normalizedSlashes.startsWith("//")
                || normalizedSlashes.contains("?")
                || normalizedSlashes.contains("#")
                || normalizedSlashes.matches("^[a-zA-Z][a-zA-Z0-9+.-]*:.*")) {
            throw new IllegalArgumentException(
                    "Provider resource path must be provider-root-relative: " + resourcePath);
        }
        var normalized = Path.of(normalizedSlashes).normalize();
        if (normalized.isAbsolute()
                || normalized.startsWith("..")
                || normalized.toString().equals(".")) {
            throw new IllegalArgumentException("Provider resource path escapes its root: " + resourcePath);
        }
        return normalized.toString().replace('\\', '/');
    }

View on GitHub (pinned to d2f5165f9c)

Solutions

  1. Provide a non-blank path for the provider resource (entry/style) in the manifest.
  2. Rebuild the UI plugin; a blank path usually indicates a failed or incomplete bundling step.
  3. Ensure the bundler configuration specifies an entry point for the plugin.

When it happens

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