You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to route my development server through two proxies in order to test my application on Confluence / Jira Cloud, and the websocket connection gets lost along the way. After 4+ hours of research and I decent amount of networking experience I can't figure out how to get the websocket to work.
My only workaround is editing the source code in order to prevent the constant refresh (thanks #592), which doesn't really scale well to multiple users / setups.
The error message of my pain in question: [vite] server connection lost. polling for restart...
Suggested solution
A feature to prevent the refresh as simple as a boolean value would be nice, ideally under the server config (don't really care where).
Something like:
server: {disableDisconnectRefresh: true,}
Alternative
If anyone knows anything about routing a websocket through 3 target ports, I'd be open to working things out that way as well.
Here's my current setup:
Vite Server (servePort:3001, hmrPort:3001 ) -> Express backend proxying port 3001 on port 3000 -> Ngrok tunnel on port 443 (which is where the websocket gets lost)
Additional context
Lmk if this is something you guys are interested in and I can submit a merge or something. Looks like you closed a dupe of this issue (#592) a couple years ago and I don't want to spend time on something no one but me wants.
Vite 3.0.0-beta.5 includes #8650 which improves port inference.
Would you test it?
If express backend supports proxying websocket, it should work with the config below.
We're running a Deno proxy that cannot forward websocket connections (no one can figure out how), so Vite keeps refreshing every time websockets time-out, would be great if we could manually reload.
Description
I need to route my development server through two proxies in order to test my application on Confluence / Jira Cloud, and the websocket connection gets lost along the way. After 4+ hours of research and I decent amount of networking experience I can't figure out how to get the websocket to work.
My only workaround is editing the source code in order to prevent the constant refresh (thanks #592), which doesn't really scale well to multiple users / setups.
The error message of my pain in question:
[vite] server connection lost. polling for restart...
Suggested solution
A feature to prevent the refresh as simple as a boolean value would be nice, ideally under the server config (don't really care where).
Something like:
Alternative
If anyone knows anything about routing a websocket through 3 target ports, I'd be open to working things out that way as well.
Here's my current setup:
Vite Server (servePort:3001, hmrPort:3001 ) -> Express backend proxying port 3001 on port 3000 -> Ngrok tunnel on port 443 (which is where the websocket gets lost)
Additional context
Lmk if this is something you guys are interested in and I can submit a merge or something. Looks like you closed a dupe of this issue (#592) a couple years ago and I don't want to spend time on something no one but me wants.
Thanks!
Validations
The text was updated successfully, but these errors were encountered: