Summary
Once a tunnel has more than one port, every bare-name devtunnel command that targets it
by its short id fails with:
An item with the same key has already been added. Key: host
Passing the cluster-qualified id (<id>.<cluster>) makes the identical command succeed.
This is independent of how many clusters the id exists in — it reproduces with the tunnel
in a single cluster.
Environment
- devtunnel CLI
1.0.1824+9e602bae78
- Linux x64 (also seen interactively)
- Microsoft Entra ID auth
Repro
devtunnel create my-tunnel # lands in nearest cluster, e.g. uks1
devtunnel port create my-tunnel.uks1 -p 3000 --protocol http
devtunnel port create my-tunnel.uks1 -p 8080 --protocol https
devtunnel list | grep my-tunnel # single copy, two ports
devtunnel host my-tunnel # -> An item with the same key has already been added. Key: host
devtunnel show my-tunnel --json # -> same
devtunnel access list my-tunnel --json # -> same
devtunnel host my-tunnel.uks1 # hosts cleanly
devtunnel show my-tunnel.uks1 --json # ok
devtunnel access list my-tunnel.uks1 --json # ok
Deterministic: bare crashes, qualified succeeds, across host, show, and access list.
Impact
Any tooling that drives devtunnel by bare id cannot host or query a tunnel that exposes
two or more ports, and the error gives no hint that qualifying the id is the workaround.
Expected
Bare-name resolution should behave the same as the cluster-qualified form for a tunnel
that resolves unambiguously, regardless of port count.
Summary
Once a tunnel has more than one port, every bare-name
devtunnelcommand that targets itby its short id fails with:
Passing the cluster-qualified id (
<id>.<cluster>) makes the identical command succeed.This is independent of how many clusters the id exists in — it reproduces with the tunnel
in a single cluster.
Environment
1.0.1824+9e602bae78Repro
Deterministic: bare crashes, qualified succeeds, across
host,show, andaccess list.Impact
Any tooling that drives
devtunnelby bare id cannot host or query a tunnel that exposestwo or more ports, and the error gives no hint that qualifying the id is the workaround.
Expected
Bare-name resolution should behave the same as the cluster-qualified form for a tunnel
that resolves unambiguously, regardless of port count.