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

Unhandled 'error' event and server crash if attempted webrtc connection to proxy server #12

Open
4c656554 opened this issue Oct 30, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@4c656554
Copy link

This error occurs if you set the DEFAULT_WEBRTC_BOOTSTRAP in ```dat-sdk`` to a hyperswarm-web proxy server. This would be a mistake, but perhaps it could be used to deliberately crash the hyperswarm-web server.


events.js:291
      throw er; // Unhandled 'error' event
      ^

Error: Decoded message is not valid
    at Object.decode (/usr/lib/node_modules/hyperswarm-web/node_modules/hyperswarm-proxy/messages.js:117:28)
    at Client._write (/usr/lib/node_modules/hyperswarm-web/node_modules/hyperswarm-proxy/index.js:109:34)
    at doWrite (_stream_writable.js:403:12)
    at writeOrBuffer (_stream_writable.js:387:5)
    at Client.Writable.write (_stream_writable.js:318:11)
    at Decoder.ondata (/usr/lib/node_modules/hyperswarm-web/node_modules/readable-stream/lib/_stream_readable.js:681:20)
    at Decoder.emit (events.js:314:20)
    at addChunk (/usr/lib/node_modules/hyperswarm-web/node_modules/readable-stream/lib/_stream_readable.js:298:12)
    at readableAddChunk (/usr/lib/node_modules/hyperswarm-web/node_modules/readable-stream/lib/_stream_readable.js:280:11)
    at Decoder.Readable.push (/usr/lib/node_modules/hyperswarm-web/node_modules/readable-stream/lib/_stream_readable.js:241:10)
Emitted 'error' event on HyperswarmServer instance at:
    at Client.<anonymous> (/usr/lib/node_modules/hyperswarm-web/node_modules/hyperswarm-proxy/server.js:52:14)
    at Object.onceWrapper (events.js:421:26)
    at Client.emit (events.js:326:22)
    at errorOrDestroy (internal/streams/destroy.js:108:12)
    at onwriteError (_stream_writable.js:418:5)
    at onwrite (_stream_writable.js:445:5)
    at Client._write (/usr/lib/node_modules/hyperswarm-web/node_modules/hyperswarm-proxy/index.js:120:7)
    at doWrite (_stream_writable.js:403:12)
    at writeOrBuffer (_stream_writable.js:387:5)
    at Client.Writable.write (_stream_writable.js:318:11)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants