Skip to content

assignSocket method is not implemented #6673

@florian-lefebvre

Description

@florian-lefebvre

Initially opened at h3js/srvx#201.

assignSocket() is not implemented in workerd. That would allow using frameworks like express through srvx.

Bug can be reproduced with https://github.com/florian-lefebvre/srvx-cloudflare-socket-repro: when running pnpm dev, visiting the dev server throws this error: The assignSocket method is not implemented.

assignSocket() is being used here: https://github.com/h3js/srvx/blob/e50148058c4c89edd7cf2e7e28f597e12bfcf2c3/src/adapters/_node/web/response.ts#L10.

Closest issue I found was #2129 but didn't seem to address this problem exactly.

Logs:

[vite] Internal server error: The assignSocket method is not implemented
      at WebServerResponse.assignSocket (node-internal:internal_http_server:407:15)
      at new WebServerResponse (/home/foo/cloudflare-express/node_modules/.vite/deps_ssr/srvx_node.js?v=95586aca:910:8)
      at fetchNodeHandler (/home/foo/cloudflare-express/node_modules/.vite/deps_ssr/srvx_node.js?v=95586aca:960:18)
      at Object.app (converted to Web handler) [as fetch] (/home/foo/cloudflare-express/node_modules/.vite/deps_ssr/srvx_node.js?v=95586aca:999:10)
      at null.<anonymous> (workers/runner-worker/index.js:380:20)
      at maybeCaptureError (workers/runner-worker/index.js:50:10) (x2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions