alibaba/nacos · warning · Error
transport must contain 1 to 64 letters, digits, +, or -
Error message
transport must contain 1 to 64 letters, digits, +, or -
What it means
Thrown by validateTransport() in agent-console-model when the transport/protocol-binding string does not match the regex ^[0-9A-Za-z+-]{1,64}$. Transport identifiers must be 1-64 characters of letters, digits, '+', or '-' only. This validates the A2A protocolBinding (or legacy transport) field on each agent interface.
Source
Thrown at console-ui/src/pages/AI/agent-console-model.js:88
const withoutTrailingCommas = value.replace(
/("(?:\\.|[^"\\])*")|,\s*([}\]])/g,
(match, quoted, closing) => quoted || closing || match
);
return parseJson(withoutTrailingCommas, 'agentCard');
}
function isObject(value) {
return value !== null && !Array.isArray(value) && typeof value === 'object';
}
function optionalString(value) {
return typeof value === 'string' && value.trim() ? value.trim() : undefined;
}
function validateTransport(value) {
const transport = required(value, 'transport');
if (!/^[0-9A-Za-z+-]{1,64}$/.test(transport)) {
throw new Error('transport must contain 1 to 64 letters, digits, +, or -');
}
return transport;
}
function endpointKey(uri, transport) {
let parsed;
try {
parsed = new URL(uri);
} catch (e) {
throw new Error(`Invalid Endpoint URI: ${uri}`);
}
if (!parsed.protocol || !parsed.hostname || parsed.username || parsed.password || parsed.hash) {
throw new Error(`Invalid Endpoint URI: ${uri}`);
}
let { port } = parsed;
if (!port) {
if (parsed.protocol === 'http:' || parsed.protocol === 'ws:') {
port = '80';View on GitHub (pinned to 9b989acdf1)
Solutions
- Use a compact token like 'HTTP', 'GRPC', 'HTTP+JSON', or 'A2A'.
- Remove spaces, underscores, slashes, and special characters; keep only letters, digits, '+', '-'.
- Ensure the value is between 1 and 64 characters.
Example fix
// before transport = 'HTTP JSON'; // after transport = 'HTTP+JSON';
Defensive patterns
Strategy: validation
Validate before calling
function isValidTransport(v) {
return typeof v === 'string' && /^[0-9A-Za-z+-]{1,64}$/.test(v);
} Type guard
function isValidTransport(v) {
return typeof v === 'string' && /^[0-9A-Za-z+-]{1,64}$/.test(v);
} Try / catch
try {
validateTransport(value);
} catch (e) {
Message.error(e.message); // 'transport must contain 1 to 64 letters, digits, +, or -'
return;
} Prevention
- Offer a dropdown of known transports (HTTP, GRPC, HTTP+JSON) with an editable-but-constrained input.
- Validate transport live against the regex.
- Document allowed characters next to the field.
When it happens
Trigger: Entering a transport value containing spaces, underscores, slashes, parentheses, or leaving it longer than 64 characters. Examples that fail: 'HTTP JSON', 'grpc_v2', 'HTTP/1.1', a value with unicode.
Common situations: User types a human-readable protocol label instead of the machine token, or pastes a URL or free text into the transport field.
Related errors
- Labels must be a JSON object
- The latest label is managed by the server
- ${name} is required
- ${name} must be valid JSON
- Invalid Endpoint URI: ${uri}
AI-assisted analysis of alibaba/nacos@9b989acdf1 (2026-08-14).
Data as JSON: /api/errors/447dd4acf61303f1.
Report an issue: GitHub.