halo-dev/halo · error · IllegalArgumentException
Provider resource path must be a string
Error message
Provider resource path must be a string
What it means
Error "Provider resource path must be a string" thrown in halo-dev/halo.
Source
Thrown at application/src/main/java/run/halo/app/plugin/UiPluginBundleServiceImpl.java:235
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");
}
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("?")View on GitHub (pinned to d2f5165f9c)
Solutions
- Ensure the 'entry' (and 'style', if present) values in the provider manifest are strings.
- Rebuild the plugin bundle so the manifest is serialized with correct types.
- Check for manual manifest edits that introduced non-string values (objects, arrays, numbers).
When it happens
Trigger: Thrown at application/src/main/java/run/halo/app/plugin/UiPluginBundleServiceImpl.java:235 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/acc1522930ce90ca.
Report an issue: GitHub.