Replies: 1 comment 2 replies
-
Yes, the CLI doesn't proxy websockets correctly today. #3895 fixes that issue |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to run Dioxus in fullstack mode with an Axum router as described here. The routing works - but for some reason, not for WebSockets.
I'm adding the WebSocket route using https://github.com/idanarye/kivnun/blob/58cf00cf095ed700424fc1438aa23b8f4a571579/src/main.rs#L15-L28
Where the WebSocket upgrade and handling are https://github.com/idanarye/kivnun/blob/58cf00cf095ed700424fc1438aa23b8f4a571579/backend/src/wsjrpc/mod.rs
But it fails - when I'm trying to connect a WebSocket client, it complains about an I/O failure:
And
dx serve
prints the following logs:So basically - the server thinks it managed to send its message, but the client does not see it, and when the server tries to receive a message - it gets a
ConnectionReset
.If I use the same code but connect to the socket manually: https://github.com/idanarye/kivnun/blob/58cf00cf095ed700424fc1438aa23b8f4a571579/examples/regular_axum_ws.rs
Then everything works:
What's wrong? I suspect that maybe
dx serve
is doing some proxying which messes up with WebSockets?Beta Was this translation helpful? Give feedback.
All reactions