EpicGames/lore · error

Failed to create client endpoint

Error message

Failed to create client endpoint

What it means

Endpoint::client(client_addr) panics here when quinn cannot create the client UDP endpoint. It fails if the local SocketAddr cannot be bound (invalid address, port in use, or no UDP capability in the environment).

Solutions

  1. Inspect the underlying io::Error from Endpoint::client (permission denied vs address invalid)
  2. Fall back to 127.0.0.1:0 when 0.0.0.0:0 is blocked in the environment
  3. Verify the environment allows UDP sockets (Docker seccomp, CI sandbox policies)
  4. Match address family to the server's (IPv4 server_addr with IPv4 client bind)

Example fix

// before
let mut endpoint = Endpoint::client(client_addr).expect("Failed to create client endpoint");
// after
let mut endpoint = Endpoint::client(client_addr)
    .unwrap_or_else(|e| panic!("Failed to create client endpoint {client_addr}: {e}"));
Defensive patterns

Strategy: validation

Validate before calling

let client_addr: std::net::SocketAddr = "0.0.0.0:0".parse().unwrap();
assert!(std::net::UdpSocket::bind(client_addr).is_ok(), "UDP bind unavailable for client endpoint");

Prevention

When it happens

Trigger: Binding to "0.0.0.0:0" fails due to sandbox/IPv6-vs-IPv4 mismatch, UDP blocked in the container, or the address family unsupported by the host.

Common situations: CI containers without UDP socket permissions; using [::]:0 on a host with IPv6 disabled; conflicting network namespaces in tests.

Related errors


AI-assisted analysis of EpicGames/lore@074eb0b0d1 (2026-09-13). Data as JSON: /api/errors/fc9a05cad43d74e4. Report an issue: GitHub.

Appendix: source

Thrown at lore-server/src/quic/stream_handler.rs:897

                .pkey_file(key_path)
                .stream_handler_factory(factory)
                .build()
                .unwrap(),
        )
        .expect("Failed Quinn server start");

        let mut crypto_config = rustls::ClientConfig::builder()
            .dangerous()
            .with_custom_certificate_verifier(insecure_client_auth::SkipServerVerification::new())
            .with_no_client_auth();
        crypto_config.alpn_protocols = vec![protocol.as_bytes().into()];

        let client_config = ClientConfig::new(Arc::new(
            QuicClientConfig::try_from(crypto_config).expect("Failed client config"),
        ));

        let client_addr: SocketAddr = "0.0.0.0:0".parse().unwrap();
        let mut endpoint = Endpoint::client(client_addr).expect("Failed to create client endpoint");
        endpoint.set_default_client_config(client_config);

        let connection = endpoint
            .connect(server_addr, "localhost")
            .unwrap()
            .await
            .unwrap();
        let (send, recv) = connection
            .open_bi()
            .await
            .expect("Failed to setup bidirectional channel");

        Harness {
            send,
            recv,
            connection,
            _server: server,
            _endpoint: endpoint,

View on GitHub (pinned to 074eb0b0d1)