Skip to content

moqt: unhandled PUBLISH_NAMESPACE (0x6) fatally closes the session against moq-dev relays #4

Closed

Description

@mmcc

Symptom

Connecting the SPF MoQ engine to a moq-dev (kixelated/moq) relay — e.g. the no-auth deployment at relay.mux.dev — negotiates moqt-19 and completes the WebTransport handshake, then the engine immediately closes the session. The relay side logs the close reason we send:

connection closed err=transport: webtransport error: closed: code=3 reason=unknown control message type 0x6

The player renders nothing and surfaces no error.

Cause

moq-dev relays send an unsolicited PUBLISH_NAMESPACE (0x6) request to every draft-19 session, announcing each available broadcast (their rs/moq-net/src/ietf announce flow, observed at commit 8c4b0801). That is legal: either endpoint may send requests, and 0x6 is a registered draft-19 control message (Table 5).

packages/spf/src/network/moqt/control-messages.ts defines MESSAGE_TYPE.PUBLISH_NAMESPACE: 0x6 but decodeControlMessage has no case for it, so the default: arm throws MoqtProtocolError('unknown control message type 0x6'), and #handleIncomingRequest's catch escalates that to #fatal — tearing down the whole session. The unknown-type ⇒ PROTOCOL_VIOLATION rule shouldn't apply to a message type the registry defines; a known-but-unsupported request should be declined per-request instead.

Fix

Parse the message — [Request ID (varint)][Track Namespace (tuple)][Parameters]; note #readControlFrame enforces exact body-length consumption, so the parameters block must be read too — and return a kind (e.g. publish-namespace) that falls through to #handleIncomingRequest's existing catch-all, which already answers REQUEST_ERROR NOT_SUPPORTED ('subscribe-only client').

Verified against a local moq-relay and against relay.mux.dev: the relay logs publish namespace error … 'subscribe-only client' and continues serving the session normally; the engine proceeds to the catalog SUBSCRIBE. Full playback then requires the FETCH interop shim (separate issue, cross-linked below).

Repro/diagnosis notes and the verified matrix live in muxinc/relay-rs docs/interop.md § 'moq-dev relay interop' (branch moq-dev-moq-pub).

🤖 Generated with Claude Code

Activity

  1. mmcc commented on Jul 30, 2026

    @mmcc
    OwnerAuthor

    The FETCH interop shim mentioned above is tracked in #5 — both are needed for playback against moq-dev relays.

  2. mmcc commented on Oct 27, 2026

    @mmcc
    OwnerAuthor

    Resolved on mmcc/moq by #75. The player now runs on @caprid/moq-core 0.1.1, whose subscribe session answers a request it doesn't serve, such as an unsolicited PUBLISH_NAMESPACE, with REQUEST_ERROR NOT_SUPPORTED and keeps the session open instead of closing it. The local codec this issue was about is deleted.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions