Skip to content

Fresh V2 Beta WebSocket upgrade request never reaches server behind vite development environment #3350

@Tropxical

Description

@Tropxical

Hey there,

I've recently just migrated Fresh V2 from Alpha to Beta and now I'm noticing that WebSocket connections hangs and never arrives in a vite development environment. I've verified that the endpoint is most definitely reachable by sending a GET request, but however if the browser attempts a WebSocket connection, it seems to never even reach the server.

I'm guessing this has to do something with vite. No issues with production, building the project and starting has no issues with WebSocket connectivity.

//Client Connection: new WebSocket("ws://127.0.0.1:5174/somewebsocket")
//Server never sees WebSocket upgrade request.

app.get("/somewebsocket", (ctx) => {
     const { socket, response } = Deno.upgradeWebSocket(ctx.req)

    //More logic here.

    return response
})

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions