Describe the bug
$ gh version
gh version 2.32.1 (2023-07-24)
https://github.com/cli/cli/releases/tag/v2.32.1
When running gh codespace ports for my currently running Codespace, it fails to show all of the ports that are currently being forwarded. I am able to determine this because the VS Code Ports view is showing 8 ports, whereas the CLI only shows 1.
Steps to reproduce the behavior
In my case:
- Start a Codespace with a port that’s forwarded on startup (in my case, that’s NoVNC, which listens on 6080)
- Once the Codespace has started, run a command that opens some ports (in my case, a dev server that opens 6 ports)
- Observe that the VS Code Ports view shows all 6 + 1 = 7 ports
- Run
gh codespace ports -c <CODESPACE_NAME>
- Observe that the CLI only lists a single port, which is the originally open one (6080)
This also interferes with the other commands:
$ gh codespace ports visibility 3001:public -c <CODESPACE_NAME>
error updating port 3001 to public: jsonrpc2: code -32098 message: The specified port is not being fowarded
$ gh codespace ports forward 3001:3001 -c <CODESPACE_NAME>
failed to listen to local port over tcp: listen tcp :3001: bind: address already in use
This started happening around the time that GitHub moved from preview.app.github.dev to app.github.dev, but I have no idea if that relationship is causal. What information can I help give you to debug this?
Describe the bug
When running
gh codespace portsfor my currently running Codespace, it fails to show all of the ports that are currently being forwarded. I am able to determine this because the VS Code Ports view is showing 8 ports, whereas the CLI only shows 1.Steps to reproduce the behavior
In my case:
gh codespace ports -c <CODESPACE_NAME>This also interferes with the other commands:
This started happening around the time that GitHub moved from
preview.app.github.devtoapp.github.dev, but I have no idea if that relationship is causal. What information can I help give you to debug this?