Properly log and react to non-compliant server subprotocol received
See original GitHub issueI got this while being connected to the Poloniex socket for a few hours. I only subscribe to the channels, but I don’t send anything after that.
I have no idea what caused it, I can’t duplicate it, but here it is for if somebody wants to give it a look.
/.../my-project/node_modules/autobahn/lib/transport/websocket.js:99
var payload = transport.serializer.serialize(msg);
^
TypeError: Cannot read property 'serialize' of undefined
at Object.transport.send (/.../my-project/node_modules/autobahn/lib/transport/websocket.js:99:47)
at self._send_wamp (/.../my-project/node_modules/autobahn/lib/session.js:279:20)
at Session.join (/.../my-project/node_modules/autobahn/lib/session.js:1156:9)
at Object.self._transport.onopen (/.../my-project/node_modules/autobahn/lib/connection.js:311:24)
at WebSocket.<anonymous> (/.../my-project/node_modules/autobahn/lib/transport/websocket.js:118:23)
at emitNone (events.js:67:13)
at WebSocket.emit (events.js:166:7)
at WebSocket.establishConnection (/.../my-project/node_modules/ws/lib/WebSocket.js:887:8)
at ClientRequest.upgrade (/.../my-project/node_modules/ws/lib/WebSocket.js:778:25)
at ClientRequest.g (events.js:260:16)
Dependencies, as installed:
┬ autobahn@0.10.1
├─┬ bufferutil@1.2.1
│ ├── bindings@1.2.1
│ └── nan@2.4.0
├── crypto-js@3.1.6
├─┬ msgpack-lite@0.1.20
│ ├── event-lite@0.1.1
│ ├── ieee754@1.1.6
│ ├── int64-buffer@0.1.9
│ └── isarray@1.0.0
├── utf-8-validate@1.2.1
├── when@3.7.7
└─┬ ws@1.1.1
├── options@0.0.6
└── ultron@1.0.2
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
RFC 6455: The WebSocket Protocol
The handshake from the client looks as follows: GET /chat HTTP/1.1 Host: ... _ The client can request that the server use a...
Read more >React Error Handling and Logging Best Practices
This article will go over best practices for error handling and logging in React for different scenarios. Let's get started.
Read more >WebSocket request-response subprotocol - Stack Overflow
WAMP is a proper WebSocket subprotocol, uses WebSocket as transport and JSON ... RPC server responses to client initiated procedure calls.
Read more >How to Upgrade to React 18
ReactDOM.render is no longer supported in React 18. ... Finally, if your app uses server-side rendering with hydration, upgrade hydrate to ...
Read more >WebSockets Tutorial: Going Real-time with Node and React
Open a connection, explain your request, receive a response, and then ... The client and server also communicate which subprotocol will be ...
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
^ thanks for clarifying! that use of “WAMP” is completely fine!
Thanks for the feedback + adjustments to this issue, @oberstet!
Regarding OCPP: do know that they’re not using the name WAMP (they use OCPP-J) or state that they have implemented it. They’re simply referring to WAMP as a source of inspiration to solve the same problem WAMP solves. Here’s the relevant passage from their docs:
Their first work on this started back in 2012 — back when WAMP v1 was a thing — so it could perfectly be that the passage “handling RPCs symmetrically is not WAMP compliant” is no longer valid.
(Apologies for hijacking this thread with this info)