xpipe-io/xpipe · error · ValidationException
${uriErrorMessage}
Error message
${uriErrorMessage} What it means
AbstractServiceStore.checkComplete() validates the service URL. When the configured service protocol type uses a scheme (e.g. http/https), it formats the open target URL as an address and attempts URI.create(addr); an IllegalArgumentException (the "${uriErrorMessage}") means the formatted address is not a syntactically valid URI, rethrown as ValidationException.
Source
Thrown at ext/base/src/main/java/io/xpipe/ext/base/service/AbstractServiceStore.java:66
@Override
public void checkComplete() throws Throwable {
// We do not require the host to be complete
if (getHost() != null && !(getHost().asNeeded().getStore() instanceof LocalStore)) {
Validators.isType(getHost(), HostAddressStore.class);
}
Validators.nonNull(remotePort);
Validators.nonNull(serviceProtocolType);
if (getHost() == null) {
Validators.nonNull(getAddress());
}
if (serviceProtocolType.hasScheme()) {
var addr = serviceProtocolType.formatAddress(getOpenTargetUrl());
if (addr != null) {
try {
URI.create(addr);
} catch (IllegalArgumentException e) {
throw new ValidationException(e.getMessage());
}
}
}
}
public String getOpenTargetUrl() {
var s = getSession();
if (s == null) {
var address = getAddress();
if (address == null
&& (getHost().getStore() instanceof HostAddressGatewayStore g)
&& !(getHost().getStore() instanceof NetworkTunnelStore)) {
address = g.getHostAddress().get();
}
if (address == null && (getHost().getStore() instanceof NetworkTunnelStore t)) {
var h = t.getTunnelHostName();View on GitHub (pinned to d85ca821ba)
Solutions
- Fix the service URL/host/port configuration so the composed address is a valid URI
- URL-encode any special characters in path/query components
- Test the address with java.net.URI.create(addr) before saving the store
- Switch the protocol type to one without a scheme if the target is not a URL-based service
Example fix
// before
store.setHost("my server"); // space breaks URI
// after
store.setHost("my-server"); Defensive patterns
Strategy: validation
Validate before calling
try {
java.net.URI.create(serviceProtocolType.formatAddress(getOpenTargetUrl()));
} catch (IllegalArgumentException e) {
// invalid service URL — fix host/port/path before checkComplete()
} Try / catch
try { store.checkComplete(); }
catch (ValidationException e) { /* surface URI error message to user */ } Prevention
- URL-encode path/query components
- Reject spaces and illegal characters in hostnames/ports at input time
- Ensure template placeholders are filled before validation
When it happens
Trigger: checkComplete() on a service store whose protocol type has a scheme and whose getOpenTargetUrl() (host/port/path composed from config) produces a string rejected by URI.create — e.g. illegal characters, spaces, or unmatched braces in host, port, or path.
Common situations: Hostnames containing spaces or underscores in the wrong position; unencoded special characters in URL paths; ports or variables substituted with invalid values; a template placeholder that was never filled in.
Understand the failure class
Background: "Invalid URL" errors: why new URL(), URI.parse, and reqwest::Url reject your string — missing scheme, whitespace, and bad path format — this error's family across 39 libraries.
Related errors
- Cannot delete category: " + cat.getName()
- Not a toggleable connection
- Directory is a root
- Principal ${name} is not accessible
- Name is empty
AI-assisted analysis of xpipe-io/xpipe@d85ca821ba (2026-09-06).
Data as JSON: /api/errors/703ff6f690c39320.
Report an issue: GitHub.