Skip to content

WebSocket RPC calls never resolve under celld dev (Cap'n Web served over Workers WebSocketPair) #178

Closed

Description

@dacuna-ic

I have a Worker running under celld dev that serves Cap'n Web RPC using capnweb's own newWorkersRpcResponse helper, no framework involved. Every RPC call made over the WebSocket transport hangs forever, it never resolves and never rejects. This is 100% reproducible, not intermittent. I tested five fresh connections in a row and all five hung on the very first call.

Plain HTTP batch RPC (newHttpBatchRpcSession) against the same worker works every time, so this is isolated to the WebSocket transport.

Environment

  • celld 0.4.0, run via celld dev
  • capnweb ^0.12.0

Repro

// worker.ts — run with `celld dev`
import { RpcTarget, newWorkersRpcResponse } from 'capnweb';

interface PublicApi {
  hello(name: string): string;
}

class Api extends RpcTarget implements PublicApi {
  hello(name: string) {
    return `Hello, ${name}!`;
  }
}

export default {
  fetch(request: Request) {
    return newWorkersRpcResponse(request, new Api());
  },
};

// client.ts — run against the worker above once `celld dev` is up
import { newWebSocketRpcSession } from 'capnweb';

const stub = newWebSocketRpcSession('ws://127.0.0.1:9876/api');
console.log(await stub.hello('first call')); // never resolves

Steps

  1. Start the worker above with celld dev.
  2. Run the client against it.
  3. hello() never resolves, no error, no rejection, on every attempt.

Expected: the call resolves, same as it does over HTTP batch RPC.

Actual: the WebSocket upgrade completes (101 response), but no RPC response ever comes back over it.

Also note: This is proven on the celld side, the same runs properly on wrangler dev. I also have a patch locally that works for celld, but PRs are disabled :(

Activity

  1. changed the title [-]WebSocket RPC calls hang after the first message when serving Cap'n Web over a Worker socket[/-] [+]WebSocket RPC calls never resolve under celld dev (Cap'n Web served over Workers WebSocketPair)[/+] on Aug 29, 2026
  2. bartlomieju commented on Aug 29, 2026

    @bartlomieju
    Member

    Feel free to send patch to bartek[at]Deno.com

  3. bartlomieju commented on Aug 31, 2026

    @bartlomieju
    Member

    Thanks, I did use parts of your patch. This will be released later this week.

  4. added 4 commits that reference this issue on Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions