graphql-ws: Error "Closing a missing client" on connection
Screenshot
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
- chore(release): 🎉 4.5.2 [skip ci] ## [4.5.2](https://github.com/enisdenjo/graphql-ws/compare/v4.5.1...v4.5.2) (2021-05-28) ### Bug Fixes * **uWebSockets:** Handle premature and abrupt socket close... — committed to enisdenjo/graphql-ws by semantic-release-bot 3 years ago
- chore(release): 🎉 1.0.0 [skip ci] # 1.0.0 (2023-03-16) ### Bug Fixes * Add `browser` export map ([ea306db](https://github.com/ilijaNL/graphql-ws/commit/ea306db45a05ab712782b17c5a3a1ec60537eaa4)) *... — committed to ilijaNL/graphql-transport-ws by semantic-release-bot a year ago
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