graphql-ws: Error "Closing a missing client" on connection

Screenshot Снимок экрана 2021-05-26 в 19 43 01

Expected Behaviour Running like excepted

Actual Behaviour

[Server]: started successfully at [localhost:4000] in [4ms]
file:///Users/dalisoft/Desktop/Open_Source/nanoexpress/plugins/middlewares/packages/graphql/examples/node_modules/graphql-ws/lib/use/uWebSockets.mjs:103
                throw new Error('Closing a missing client');
                ^

Error: Closing a missing client
    at close (file:///Users/dalisoft/Desktop/Open_Source/nanoexpress/plugins/middlewares/packages/graphql/examples/node_modules/graphql-ws/lib/use/uWebSockets.mjs:103:23)
    at Object.close (file:///Users/dalisoft/Desktop/Open_Source/nanoexpress/plugins/middlewares/packages/graphql/examples/node_modules/graphql-ws/lib/use/uWebSockets.mjs:65:28)
    at Object.opened (file:///Users/dalisoft/Desktop/Open_Source/nanoexpress/plugins/middlewares/packages/graphql/examples/node_modules/graphql-ws/lib/server.mjs:37:24)
    at open (file:///Users/dalisoft/Desktop/Open_Source/nanoexpress/plugins/middlewares/packages/graphql/examples/node_modules/graphql-ws/lib/use/uWebSockets.mjs:57:36)
    at upgrade (file:///Users/dalisoft/Desktop/Open_Source/nanoexpress/plugins/middlewares/packages/graphql/examples/node_modules/graphql-ws/lib/use/uWebSockets.mjs:39:17)

Debug Information OS: macOS Big Sur 11.4 (Intel x64) Node: v16.2.0

Further Information It sometimes work, sometimes don’t

Minimal reproducible repository https://github.com/nanoexpress/middlewares/tree/master/packages/graphql/examples

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 17 (8 by maintainers)

Commits related to this issue

Most upvoted comments

Or you can try this as uWebSockets uses this way. I used it once, seems good way, but not easy to run

Benchmark.js, console.time for any function compare or Websocket connection time compare.

wrk for http

Seems like a bug with Altair. Having selected “Websockets” once, even after changing it, it will try connecting with the legacy protocol automatically in the background (which is why it happened sometimes for you).

Glad you like graphql-ws and thank you for the kind words! 😄

Yea, I’ll try debug in next two days or next week and maybe we fix it together or i let you know where has been bug