Codespaces port forwarding stopped working #46468
Select Topic AreaQuestion BodyAs of a few hours ago port forwarding stop working for me (using the web version of VS code). When I run I tried opening a different repository in a new codespace instance and am having he same issue there as well. |
Replies: 6 comments 3 replies
|
@aaronrubinstein thank you for reporting this issue. We will take a look at this issue and get back to you. |
|
Per the suggestion here, I added |
|
I use a Codespace for a Gatsby project and can confirm that the standard: Will cause the connection to be refused and the 502 nginx bad gateway error. Running with: And using the port from the port list seems to solve this issue. |
|
Just use port-forwarding services like NGROK lol SUPER easy three line of shell commands https://ngrok.com/download |
|
For me, changing to a new port for forwarding solves the problem. |
|
We are still having this issue -- changing the port visibility to private again seems to fix it but very annoying |



Per the suggestion here, I added
--hostto the end of my dev script inpackage.jsonand that solved the problem. Very strange as port forwarding had been working fine without--hostup until yesterday (I double checked the package.json files in previous Vite projects I built in codespaces and none of them had that). Something must have changed.