Thanks to visit codestin.com
Credit goes to github.com

Skip to content

VS Code port forwarding stops working after some time #13726

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jaaydenh opened this issue Jun 28, 2024 · 9 comments
Open

VS Code port forwarding stops working after some time #13726

jaaydenh opened this issue Jun 28, 2024 · 9 comments
Labels
customer-reported Bugs reported by enterprise customers. Only humans may set this. need-backend Issues that need backend work s2 Broken use cases or features (with a workaround). Only humans may set this.

Comments

@jaaydenh
Copy link
Contributor

Repo Steps (For MacOS)

  1. Have a running workspace with an auto-forwarded port setup for to serve a site for frontend development e.g. 8080,3000
  2. Leave it for 30+ mins, the computer should go to sleep during this time (may also occur without sleeping but less reliable)
  3. When returning to VS Code you will see a dialog about reconnecting in one of the 3 possible varieties shown below
  4. When returning to the site hosted at 8080, the site will no longer load
  5. In VS Code, manually stop forwarding port 8080
  6. In VS Code, manually add port 8080, the site at port 8080 will usually load at this point. Sometimes this does not work and a workspace restart is necessary to resolve the port forwarding.

The expectation is that it is not necessary to re-forward the ports or to restart the workspace.

Screenshot 2024-06-27 at 8 21 36 PM Screenshot 2024-06-27 at 9 56 35 AM Screenshot 2024-06-28 at 9 37 18 AM
@coder-labeler coder-labeler bot added the waiting-for-info The issue creator is asked to provide more information. label Jun 28, 2024
@matifali matifali added bug and removed waiting-for-info The issue creator is asked to provide more information. labels Jun 30, 2024
@matifali
Copy link
Member

Possibly related to #13664.

@deansheather deansheather self-assigned this Jul 4, 2024
@bpmct bpmct added the s2 Broken use cases or features (with a workaround). Only humans may set this. label Aug 11, 2024
@sreya
Copy link
Collaborator

sreya commented Aug 21, 2024

Should be fixed by #14165 and #14234

@BrunoQuaresma
Copy link
Collaborator

Just for the record, I’m still facing this issue on v2.18.1.

@BrunoQuaresma
Copy link
Collaborator

Insight: As @Emyrk mentioned in a Slack conversation, this might be caused by the frequent redeployments on dev.coder.com. Maybe we could automatically re-establish port forwarding when the service is back up?

@Mikescops
Copy link

Hello, I'm also facing this issue on v2.20.0, it's a bit of nightmare when you run a client / server app in dev mode because anytime you take a break you have to force reload all your VSCode windows.

If anyone has a workaround in the meantime lmk thanks!

@Aghassi
Copy link

Aghassi commented Apr 1, 2025

Adding here that this also impacts Cursor. My problem mirrors that of OP as well

@bjornrobertsson
Copy link

Similar issue but not necessarily attributed to port forwarding: (potentially degraded with 2.19/2.20) - the Reload Window function can fail when reconnecting to (the) workspace. Using it leaves the window in an infinite spinning/loading state. Requires the end-user to close the VSCode window, open a new window, and issue a "open workspace" command -- after which the workspace shows up immediately.

@matifali matifali added the customer-reported Bugs reported by enterprise customers. Only humans may set this. label Apr 7, 2025
@Kira-Pilot
Copy link
Member

@matifali to test this issue out and create a new issue if necessary

@matifali
Copy link
Member

@Kira-Pilot @bjornrobertsson I have extracted the REload Window not working to a separate issue: coder/vscode-coder#473

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported Bugs reported by enterprise customers. Only humans may set this. need-backend Issues that need backend work s2 Broken use cases or features (with a workaround). Only humans may set this.
Projects
None yet
Development

No branches or pull requests

10 participants