Skip to content

[BUG] createSolanaClient throws Websocket error when using Surfnet RPC #317

@ZYJLiu

Description

@ZYJLiu

Version
gill: v0.12.0
node: v24.9.0

The createSolanaClient function throws websocket failed to connect error when using txtx surfnet cloud rpc.

SolanaError: WebSocket failed to connect

  context: {
    __code: 8190004,
    errorEvent: ErrorEvent {
      Symbol(type): 'error',
      Symbol(kTarget): WebSocket {
        Symbol(kEvents): SafeMap(0) {},
        Symbol(events.maxEventTargetListeners): 10,
        Symbol(events.maxEventTargetListenersWarned): false,
        Symbol(kHandlers): SafeMap(0) {}
      },
      Symbol(kIsBeingDispatched): false
    }
  }

Steps to reproduce:

const { rpc, rpcSubscriptions, sendAndConfirmTransaction } = createSolanaClient(
  {
    urlOrMoniker: <use a surfnet rpc here>,
  }
);

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