BUG: TypeError: protocols.has is not a function (5.6.1 version)
See original GitHub issueI got this bug on new version
handleProtocol?? [ 'graphql-transport-ws' ] graphql-transport-ws
/batcave/node_modules/graphql-ws/lib/server.js:280
: protocols.has(common_1.GRAPHQL_TRANSPORT_WS_PROTOCOL))
^
TypeError: protocols.has is not a function
at Object.handleProtocols (/batcave/node_modules/graphql-ws/lib/server.js:280:21)
at WebSocketServer.completeUpgrade (/batcave/node_modules/ws/lib/websocket-server.js:323:33)
at WebSocketServer.handleUpgrade (/batcave/node_modules/ws/lib/websocket-server.js:271:10)
at Server.<anonymous> (/batcave/node_modules/postgraphile/build/postgraphile/http/subscriptions.js:369:21)
at Server.emit (node:events:520:28)
at onParserExecuteCommon (node:_http_server:727:14)
at onParserExecute (node:_http_server:641:3)
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
TypeError: domain.enter is not a function - Stack Overflow
I found out what was the problem, it turns out that I was overriding request.domain during one of my middlewares.
Read more >Bug listing with status RESOLVED with resolution TEST ...
Bug :233 - "Emacs segfaults when merged through the sandbox." status:RESOLVED resolution:TEST-REQUEST severity:critical · Bug:3888 - "yenta_socket module not ...
Read more >How to Build a Full Stack NFT Marketplace - V2 (2022)
I am getting this Error after createItem function (on click Create an Asset button). I have same RPC in Metamask and the JSONRpc....
Read more >draft-ietf-rtcweb-security-arch-09
The protocol to be used between the domains is not standardized by WebRTC, ... Simpler versions with lower levels of security are also...
Read more >PyCryptodome Documentation - Read the Docs
Why does strxor raise TypeError: argument 2 must be bytes, not ... The following packages, modules and functions have been removed:.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
ya, look like that is the root cause of this issue. Thank you for your quick fix, very nice ❤️
Seems like the
protocols
argument inWebSocketServer.handleProtocols
was an Array in v7 (also stated in the breaking changes of v8), the fix in v5.6.2 covers the issue.Additionally, I’ve made sure that all future tests run on
ws@7
too so bugs like these won’t creep up.Thanks for reporting!