Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebSocket client got closed immidately for some servers #6543

Closed
xlc opened this issue Oct 17, 2023 · 2 comments
Closed

WebSocket client got closed immidately for some servers #6543

xlc opened this issue Oct 17, 2023 · 2 comments
Labels
bug Something isn't working web-api Something that relates to a standard Web API

Comments

@xlc
Copy link
Contributor

xlc commented Oct 17, 2023

What version of Bun is running?

1.0.6

What platform is your computer?

Darwin 22.4.0 arm64 arm

What steps can reproduce the bug?

bun run this file

https://gist.github.com/xlc/129c41fc4e35246fbc0561d97c9cdccd

What is the expected behavior?

The WebSocket did not get closed and it successfully sent a message and received a response

What do you see instead?

The WebSocket got closed immediately

Additional information

Tried with 3 different servers, two not compatible, and one compatible.
The compatible one is controlled by myself, the other two are not.

Not compatible servers:

  • wss://rpc.polkadot.io
  • wss://polkadot-rpc.dwellir.com

Compatible server:

  • wss://acala-rpc.aca-api.network
Logs:
Not compatible output:
2023-10-17T00:13:16.080Z open!!!! Event {
  isTrusted: true,
  type: "open",
  target: WebSocket {
    URL: "wss://rpc.polkadot.io/",
    url: "wss://rpc.polkadot.io/",
    readyState: 1,
    bufferedAmount: 0,
    onopen: null,
    onmessage: null,
    onerror: null,
    onclose: null,
    protocol: "",
    extensions: "",
    binaryType: "nodebuffer",
    send: [Function: send],
    close: [Function: close],
    ping: [Function: ping],
    pong: [Function: pong],
    terminate: [Function: terminate],
    CONNECTING: 0,
    OPEN: 1,
    CLOSING: 2,
    CLOSED: 3,
    addEventListener: [Function: addEventListener],
    removeEventListener: [Function: removeEventListener],
    dispatchEvent: [Function: dispatchEvent]
  },
  currentTarget: WebSocket {
    URL: "wss://rpc.polkadot.io/",
    url: "wss://rpc.polkadot.io/",
    readyState: 1,
    bufferedAmount: 0,
    onopen: null,
    onmessage: null,
    onerror: null,
    onclose: null,
    protocol: "",
    extensions: "",
    binaryType: "nodebuffer",
    send: [Function: send],
    close: [Function: close],
    ping: [Function: ping],
    pong: [Function: pong],
    terminate: [Function: terminate],
    CONNECTING: 0,
    OPEN: 1,
    CLOSING: 2,
    CLOSED: 3,
    addEventListener: [Function: addEventListener],
    removeEventListener: [Function: removeEventListener],
    dispatchEvent: [Function: dispatchEvent]
  },
  eventPhase: 2,
  cancelBubble: false,
  bubbles: false,
  cancelable: false,
  defaultPrevented: false,
  composed: false,
  timeStamp: 0,
  srcElement: WebSocket {
    URL: "wss://rpc.polkadot.io/",
    url: "wss://rpc.polkadot.io/",
    readyState: 1,
    bufferedAmount: 0,
    onopen: null,
    onmessage: null,
    onerror: null,
    onclose: null,
    protocol: "",
    extensions: "",
    binaryType: "nodebuffer",
    send: [Function: send],
    close: [Function: close],
    ping: [Function: ping],
    pong: [Function: pong],
    terminate: [Function: terminate],
    CONNECTING: 0,
    OPEN: 1,
    CLOSING: 2,
    CLOSED: 3,
    addEventListener: [Function: addEventListener],
    removeEventListener: [Function: removeEventListener],
    dispatchEvent: [Function: dispatchEvent]
  },
  returnValue: true,
  composedPath: [Function: composedPath],
  stopPropagation: [Function: stopPropagation],
  stopImmediatePropagation: [Function: stopImmediatePropagation],
  preventDefault: [Function: preventDefault],
  initEvent: [Function: initEvent],
  NONE: 0,
  CAPTURING_PHASE: 1,
  AT_TARGET: 2,
  BUBBLING_PHASE: 3
}
2023-10-17T00:13:16.117Z close!!!! CloseEvent {
  isTrusted: true,
  wasClean: false,
  code: 1001,
  reason: "",
  type: "close",
  target: WebSocket {
    URL: "wss://rpc.polkadot.io/",
    url: "wss://rpc.polkadot.io/",
    readyState: 3,
    bufferedAmount: 0,
    onopen: null,
    onmessage: null,
    onerror: null,
    onclose: null,
    protocol: "",
    extensions: "",
    binaryType: "nodebuffer",
    send: [Function: send],
    close: [Function: close],
    ping: [Function: ping],
    pong: [Function: pong],
    terminate: [Function: terminate],
    CONNECTING: 0,
    OPEN: 1,
    CLOSING: 2,
    CLOSED: 3,
    addEventListener: [Function: addEventListener],
    removeEventListener: [Function: removeEventListener],
    dispatchEvent: [Function: dispatchEvent]
  },
  currentTarget: WebSocket {
    URL: "wss://rpc.polkadot.io/",
    url: "wss://rpc.polkadot.io/",
    readyState: 3,
    bufferedAmount: 0,
    onopen: null,
    onmessage: null,
    onerror: null,
    onclose: null,
    protocol: "",
    extensions: "",
    binaryType: "nodebuffer",
    send: [Function: send],
    close: [Function: close],
    ping: [Function: ping],
    pong: [Function: pong],
    terminate: [Function: terminate],
    CONNECTING: 0,
    OPEN: 1,
    CLOSING: 2,
    CLOSED: 3,
    addEventListener: [Function: addEventListener],
    removeEventListener: [Function: removeEventListener],
    dispatchEvent: [Function: dispatchEvent]
  },
  eventPhase: 2,
  cancelBubble: false,
  bubbles: false,
  cancelable: false,
  defaultPrevented: false,
  composed: false,
  timeStamp: 0,
  srcElement: WebSocket {
    URL: "wss://rpc.polkadot.io/",
    url: "wss://rpc.polkadot.io/",
    readyState: 3,
    bufferedAmount: 0,
    onopen: null,
    onmessage: null,
    onerror: null,
    onclose: null,
    protocol: "",
    extensions: "",
    binaryType: "nodebuffer",
    send: [Function: send],
    close: [Function: close],
    ping: [Function: ping],
    pong: [Function: pong],
    terminate: [Function: terminate],
    CONNECTING: 0,
    OPEN: 1,
    CLOSING: 2,
    CLOSED: 3,
    addEventListener: [Function: addEventListener],
    removeEventListener: [Function: removeEventListener],
    dispatchEvent: [Function: dispatchEvent]
  },
  returnValue: true,
  composedPath: [Function: composedPath],
  stopPropagation: [Function: stopPropagation],
  stopImmediatePropagation: [Function: stopImmediatePropagation],
  preventDefault: [Function: preventDefault],
  initEvent: [Function: initEvent],
  NONE: 0,
  CAPTURING_PHASE: 1,
  AT_TARGET: 2,
  BUBBLING_PHASE: 3
}

compatible output

2023-10-17T00:13:40.210Z open!!!! Event {
  isTrusted: true,
  type: "open",
  target: WebSocket {
    URL: "wss://acala-rpc.aca-api.network/",
    url: "wss://acala-rpc.aca-api.network/",
    readyState: 1,
    bufferedAmount: 0,
    onopen: null,
    onmessage: null,
    onerror: null,
    onclose: null,
    protocol: "",
    extensions: "",
    binaryType: "nodebuffer",
    send: [Function: send],
    close: [Function: close],
    ping: [Function: ping],
    pong: [Function: pong],
    terminate: [Function: terminate],
    CONNECTING: 0,
    OPEN: 1,
    CLOSING: 2,
    CLOSED: 3,
    addEventListener: [Function: addEventListener],
    removeEventListener: [Function: removeEventListener],
    dispatchEvent: [Function: dispatchEvent]
  },
  currentTarget: WebSocket {
    URL: "wss://acala-rpc.aca-api.network/",
    url: "wss://acala-rpc.aca-api.network/",
    readyState: 1,
    bufferedAmount: 0,
    onopen: null,
    onmessage: null,
    onerror: null,
    onclose: null,
    protocol: "",
    extensions: "",
    binaryType: "nodebuffer",
    send: [Function: send],
    close: [Function: close],
    ping: [Function: ping],
    pong: [Function: pong],
    terminate: [Function: terminate],
    CONNECTING: 0,
    OPEN: 1,
    CLOSING: 2,
    CLOSED: 3,
    addEventListener: [Function: addEventListener],
    removeEventListener: [Function: removeEventListener],
    dispatchEvent: [Function: dispatchEvent]
  },
  eventPhase: 2,
  cancelBubble: false,
  bubbles: false,
  cancelable: false,
  defaultPrevented: false,
  composed: false,
  timeStamp: 0,
  srcElement: WebSocket {
    URL: "wss://acala-rpc.aca-api.network/",
    url: "wss://acala-rpc.aca-api.network/",
    readyState: 1,
    bufferedAmount: 0,
    onopen: null,
    onmessage: null,
    onerror: null,
    onclose: null,
    protocol: "",
    extensions: "",
    binaryType: "nodebuffer",
    send: [Function: send],
    close: [Function: close],
    ping: [Function: ping],
    pong: [Function: pong],
    terminate: [Function: terminate],
    CONNECTING: 0,
    OPEN: 1,
    CLOSING: 2,
    CLOSED: 3,
    addEventListener: [Function: addEventListener],
    removeEventListener: [Function: removeEventListener],
    dispatchEvent: [Function: dispatchEvent]
  },
  returnValue: true,
  composedPath: [Function: composedPath],
  stopPropagation: [Function: stopPropagation],
  stopImmediatePropagation: [Function: stopImmediatePropagation],
  preventDefault: [Function: preventDefault],
  initEvent: [Function: initEvent],
  NONE: 0,
  CAPTURING_PHASE: 1,
  AT_TARGET: 2,
  BUBBLING_PHASE: 3
}
2023-10-17T00:13:40.341Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":1}"
}
@xlc xlc added the bug Something isn't working label Oct 17, 2023
@Electroid Electroid added the web-api Something that relates to a standard Web API label Oct 17, 2023
@xlc
Copy link
Contributor Author

xlc commented Oct 17, 2023

Ok. The compatible one isn't really compatible. The connection will be closed after 60s. I am sending a message per second so it can't be idle timeout from server side.

Logs
2023-10-17T00:51:44.742Z open!!!! Event {
  isTrusted: true,
  type: "open",
  target: WebSocket {
    URL: "wss://acala-rpc.aca-api.network/",
    url: "wss://acala-rpc.aca-api.network/",
    readyState: 1,
    bufferedAmount: 0,
    onopen: null,
    onmessage: null,
    onerror: null,
    onclose: null,
    protocol: "",
    extensions: "",
    binaryType: "nodebuffer",
    send: [Function: send],
    close: [Function: close],
    ping: [Function: ping],
    pong: [Function: pong],
    terminate: [Function: terminate],
    CONNECTING: 0,
    OPEN: 1,
    CLOSING: 2,
    CLOSED: 3,
    addEventListener: [Function: addEventListener],
    removeEventListener: [Function: removeEventListener],
    dispatchEvent: [Function: dispatchEvent]
  },
  currentTarget: WebSocket {
    URL: "wss://acala-rpc.aca-api.network/",
    url: "wss://acala-rpc.aca-api.network/",
    readyState: 1,
    bufferedAmount: 0,
    onopen: null,
    onmessage: null,
    onerror: null,
    onclose: null,
    protocol: "",
    extensions: "",
    binaryType: "nodebuffer",
    send: [Function: send],
    close: [Function: close],
    ping: [Function: ping],
    pong: [Function: pong],
    terminate: [Function: terminate],
    CONNECTING: 0,
    OPEN: 1,
    CLOSING: 2,
    CLOSED: 3,
    addEventListener: [Function: addEventListener],
    removeEventListener: [Function: removeEventListener],
    dispatchEvent: [Function: dispatchEvent]
  },
  eventPhase: 2,
  cancelBubble: false,
  bubbles: false,
  cancelable: false,
  defaultPrevented: false,
  composed: false,
  timeStamp: 0,
  srcElement: WebSocket {
    URL: "wss://acala-rpc.aca-api.network/",
    url: "wss://acala-rpc.aca-api.network/",
    readyState: 1,
    bufferedAmount: 0,
    onopen: null,
    onmessage: null,
    onerror: null,
    onclose: null,
    protocol: "",
    extensions: "",
    binaryType: "nodebuffer",
    send: [Function: send],
    close: [Function: close],
    ping: [Function: ping],
    pong: [Function: pong],
    terminate: [Function: terminate],
    CONNECTING: 0,
    OPEN: 1,
    CLOSING: 2,
    CLOSED: 3,
    addEventListener: [Function: addEventListener],
    removeEventListener: [Function: removeEventListener],
    dispatchEvent: [Function: dispatchEvent]
  },
  returnValue: true,
  composedPath: [Function: composedPath],
  stopPropagation: [Function: stopPropagation],
  stopImmediatePropagation: [Function: stopImmediatePropagation],
  preventDefault: [Function: preventDefault],
  initEvent: [Function: initEvent],
  NONE: 0,
  CAPTURING_PHASE: 1,
  AT_TARGET: 2,
  BUBBLING_PHASE: 3
}
send 1
2023-10-17T00:51:45.874Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":1}"
}
send 2
2023-10-17T00:51:46.881Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":2}"
}
send 3
2023-10-17T00:51:47.872Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":3}"
}
send 4
2023-10-17T00:51:48.879Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":4}"
}
send 5
2023-10-17T00:51:49.874Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":5}"
}
send 6
2023-10-17T00:51:50.873Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":6}"
}
send 7
2023-10-17T00:51:51.882Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":7}"
}
send 8
2023-10-17T00:51:52.874Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":8}"
}
send 9
2023-10-17T00:51:53.891Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":9}"
}
send 10
2023-10-17T00:51:54.876Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":10}"
}
send 11
2023-10-17T00:51:55.876Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":11}"
}
send 12
2023-10-17T00:51:56.876Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":12}"
}
send 13
2023-10-17T00:51:57.878Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":13}"
}
send 14
2023-10-17T00:51:58.876Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":14}"
}
send 15
2023-10-17T00:51:59.878Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":15}"
}
send 16
2023-10-17T00:52:00.877Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":16}"
}
send 17
2023-10-17T00:52:01.875Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":17}"
}
send 18
2023-10-17T00:52:02.875Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":18}"
}
send 19
2023-10-17T00:52:03.876Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":19}"
}
send 20
2023-10-17T00:52:04.878Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":20}"
}
send 21
2023-10-17T00:52:05.876Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":21}"
}
send 22
2023-10-17T00:52:06.875Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":22}"
}
send 23
2023-10-17T00:52:07.878Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":23}"
}
send 24
2023-10-17T00:52:08.876Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":24}"
}
send 25
2023-10-17T00:52:09.877Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":25}"
}
send 26
2023-10-17T00:52:10.876Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":26}"
}
send 27
2023-10-17T00:52:11.876Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":27}"
}
send 28
2023-10-17T00:52:12.879Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":28}"
}
send 29
2023-10-17T00:52:13.876Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":29}"
}
send 30
2023-10-17T00:52:14.876Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":30}"
}
send 31
2023-10-17T00:52:15.877Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":31}"
}
send 32
2023-10-17T00:52:16.876Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":32}"
}
send 33
2023-10-17T00:52:17.881Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":33}"
}
send 34
2023-10-17T00:52:18.880Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":34}"
}
send 35
2023-10-17T00:52:19.879Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":35}"
}
send 36
2023-10-17T00:52:20.876Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":36}"
}
send 37
2023-10-17T00:52:21.876Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":37}"
}
send 38
2023-10-17T00:52:22.878Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":38}"
}
send 39
2023-10-17T00:52:23.876Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":39}"
}
send 40
2023-10-17T00:52:24.881Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":40}"
}
send 41
2023-10-17T00:52:25.877Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":41}"
}
send 42
2023-10-17T00:52:26.877Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":42}"
}
send 43
2023-10-17T00:52:27.877Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":43}"
}
send 44
2023-10-17T00:52:28.875Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":44}"
}
send 45
2023-10-17T00:52:29.876Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":45}"
}
send 46
2023-10-17T00:52:30.874Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":46}"
}
send 47
2023-10-17T00:52:31.874Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":47}"
}
send 48
2023-10-17T00:52:32.874Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":48}"
}
send 49
2023-10-17T00:52:33.874Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":49}"
}
send 50
2023-10-17T00:52:34.877Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":50}"
}
send 51
2023-10-17T00:52:35.876Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":51}"
}
send 52
2023-10-17T00:52:36.877Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":52}"
}
send 53
2023-10-17T00:52:37.877Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":53}"
}
send 54
2023-10-17T00:52:38.877Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":54}"
}
send 55
2023-10-17T00:52:39.876Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":55}"
}
send 56
2023-10-17T00:52:40.875Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":56}"
}
send 57
2023-10-17T00:52:41.876Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":57}"
}
send 58
2023-10-17T00:52:42.876Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":58}"
}
send 59
2023-10-17T00:52:43.882Z message!!! MessageEvent {
  type: "message",
  data: "{\"jsonrpc\":\"2.0\",\"result\":\"Acala\",\"id\":59}"
}
send 60
2023-10-17T00:52:44.871Z close!!!! CloseEvent {
  isTrusted: true,
  wasClean: false,
  code: 1001,
  reason: "",
  type: "close",
  target: WebSocket {
    URL: "wss://acala-rpc.aca-api.network/",
    url: "wss://acala-rpc.aca-api.network/",
    readyState: 3,
    bufferedAmount: 0,
    onopen: null,
    onmessage: null,
    onerror: null,
    onclose: null,
    protocol: "",
    extensions: "",
    binaryType: "nodebuffer",
    send: [Function: send],
    close: [Function: close],
    ping: [Function: ping],
    pong: [Function: pong],
    terminate: [Function: terminate],
    CONNECTING: 0,
    OPEN: 1,
    CLOSING: 2,
    CLOSED: 3,
    addEventListener: [Function: addEventListener],
    removeEventListener: [Function: removeEventListener],
    dispatchEvent: [Function: dispatchEvent]
  },
  currentTarget: WebSocket {
    URL: "wss://acala-rpc.aca-api.network/",
    url: "wss://acala-rpc.aca-api.network/",
    readyState: 3,
    bufferedAmount: 0,
    onopen: null,
    onmessage: null,
    onerror: null,
    onclose: null,
    protocol: "",
    extensions: "",
    binaryType: "nodebuffer",
    send: [Function: send],
    close: [Function: close],
    ping: [Function: ping],
    pong: [Function: pong],
    terminate: [Function: terminate],
    CONNECTING: 0,
    OPEN: 1,
    CLOSING: 2,
    CLOSED: 3,
    addEventListener: [Function: addEventListener],
    removeEventListener: [Function: removeEventListener],
    dispatchEvent: [Function: dispatchEvent]
  },
  eventPhase: 2,
  cancelBubble: false,
  bubbles: false,
  cancelable: false,
  defaultPrevented: false,
  composed: false,
  timeStamp: 0,
  srcElement: WebSocket {
    URL: "wss://acala-rpc.aca-api.network/",
    url: "wss://acala-rpc.aca-api.network/",
    readyState: 3,
    bufferedAmount: 0,
    onopen: null,
    onmessage: null,
    onerror: null,
    onclose: null,
    protocol: "",
    extensions: "",
    binaryType: "nodebuffer",
    send: [Function: send],
    close: [Function: close],
    ping: [Function: ping],
    pong: [Function: pong],
    terminate: [Function: terminate],
    CONNECTING: 0,
    OPEN: 1,
    CLOSING: 2,
    CLOSED: 3,
    addEventListener: [Function: addEventListener],
    removeEventListener: [Function: removeEventListener],
    dispatchEvent: [Function: dispatchEvent]
  },
  returnValue: true,
  composedPath: [Function: composedPath],
  stopPropagation: [Function: stopPropagation],
  stopImmediatePropagation: [Function: stopImmediatePropagation],
  preventDefault: [Function: preventDefault],
  initEvent: [Function: initEvent],
  NONE: 0,
  CAPTURING_PHASE: 1,
  AT_TARGET: 2,
  BUBBLING_PHASE: 3
}
send 61
send 62
send 63
send 64
send 65
send 66
send 67
send 68
send 69
send 70
send 71
send 72
send 73
send 74
send 75
send 76
send 77
send 78
send 79
send 80
send 81
send 82
send 83
send 84
send 85
send 86
send 87
send 88
send 89
send 90

@Electroid
Copy link
Contributor

We need to test our WebSocket client using the Autobahn test suite to fix these bugs, including this one. For updates, please upvote and subscribe to this issue: #6686

@Electroid Electroid closed this as not planned Won't fix, can't repro, duplicate, stale Oct 24, 2023
@Electroid Electroid marked this as a duplicate of #6686 Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working web-api Something that relates to a standard Web API
Projects
None yet
Development

No branches or pull requests

2 participants