alibaba/nacos · warning · Error
protocol must be unique: ${callInterface.protocol}
Error message
protocol must be unique: ${callInterface.protocol} What it means
Thrown by validateUniqueProtocols() in agent-console-model when two or more call interfaces in a structured protocol editor declare the same 'protocol' value. Each call interface must use a unique protocol identifier so the server can route to it unambiguously.
Source
Thrown at console-ui/src/pages/AI/agent-console-model.js:299
return result;
}
function serializeOptionalObject(value, name) {
if (!String(value || '').trim()) {
return undefined;
}
const parsed = parseJson(value, name);
if (!isObject(parsed)) {
throw new Error(`${name} must be a JSON object`);
}
return JSON.stringify(parsed);
}
function validateUniqueProtocols(callInterfaces) {
const protocols = new Set();
callInterfaces.forEach(callInterface => {
if (protocols.has(callInterface.protocol)) {
throw new Error(`protocol must be unique: ${callInterface.protocol}`);
}
protocols.add(callInterface.protocol);
});
return callInterfaces;
}
function serializeCallInterfaces(values, protocolEditors) {
const agentName = required(values.agentName, 'agentName');
const version = required(values.version, 'version');
if (protocolEditors) {
if (protocolEditors.length === 0) {
throw new Error('at least one protocol is required');
}
return JSON.stringify(
validateUniqueProtocols(
protocolEditors.map(editor => buildStructuredCallInterface(agentName, version, editor))
)
);View on GitHub (pinned to 9b989acdf1)
Solutions
- Give each call interface a distinct protocol value.
- Remove duplicate protocol editor rows.
- If using A2A, ensure each interface's protocolBinding differs.
Example fix
// before
[{protocol:'custom',...},{protocol:'custom',...}]
// after
[{protocol:'custom',...},{protocol:'a2a',...}] Defensive patterns
Strategy: validation
Validate before calling
function hasUniqueProtocols(interfaces) {
const seen = new Set();
return interfaces.every(i => !seen.has(i.protocol) && seen.add(i.protocol));
} Try / catch
try {
validateUniqueProtocols(callInterfaces);
} catch (e) {
Message.error(e.message); // 'protocol must be unique: ...'
return;
} Prevention
- Detect duplicate protocols live as editors are added/edited.
- Disable the duplicate protocol option in dropdowns already in use.
- Show a per-row uniqueness indicator.
When it happens
Trigger: Adding two protocol editors both set to 'custom', or two A2A interfaces resolving to the same protocol binding, then serializing the agent draft.
Common situations: User duplicates a protocol editor row and forgets to change the protocol, or two A2A interfaces fall back to the same preferredTransport.
Related errors
- at least one protocol is required
- Labels must be a JSON object
- The latest label is managed by the server
- ${name} is required
- ${name} must be valid JSON
AI-assisted analysis of alibaba/nacos@9b989acdf1 (2026-08-14).
Data as JSON: /api/errors/4e23d74969109626.
Report an issue: GitHub.