dev-tunnels icon indicating copy to clipboard operation
dev-tunnels copied to clipboard

"Batch update of ports is not supported" when hosting a new port on created tunnel

Open manaunl opened this issue 9 months ago • 1 comments
trafficstars

When attempting to host a new tunnel on port 5555 using the command:

devtunnel create TUNNELID devtunnel host TUNNELID -p 5555 --verbose

I receive the following error:

Tunnel service error: Invalid arguments. Batch update of ports is not supported. Add, update, or delete ports individually instead.

Upon inspecting the verbose output, I noticed that the request is being sent with an array structure, even though only a single port (5555) is specified:

"ports": [
    {
      "portNumber": 5555,
      "protocol": "auto",
      "portForwardingUris": null,
      "inspectionUri": null
    }
  ]

It seems that the CLI is sending the port configuration in an array format, which might be causing the tunnel service to reject it.

Looking for guidance on whether this is a bug or if there's a workaround to specify the port individually.

manaunl avatar Feb 20 '25 16:02 manaunl

I had the same issue, and had to manually create the port in a separate command prior to running host.

PS C:\>devtunnel port create myTunnel -p 5000 --protocol https
PS C:\>devtunnel host myTunnel

srbrills avatar Sep 17 '25 20:09 srbrills