waku-org / js-waku

JavaScript implementation of Waku v2
https://js.waku.org
Apache License 2.0
168 stars 42 forks source link

Report an error when js-waku is running over http and hence cannot connect via WSS #1991

Open vpavlin opened 6 months ago

vpavlin commented 6 months ago
This is a **change request** ## Problem When a js-waku app is ran on HTTP (not HTTPS) and also not `localhost` connection-manager will silently fail to connect to any node. This is visible when `debug:waku*` is enabled, but not in "production" setting ``` waku:error:connection-manager Error dialing peer 16Uiu2HAmSve7tR5YZugpskMv2dmJAsMUKmfWYEKRXNUxRaTCnsXV - Error occurred during XX handshake: Error occurred while verifying signed payload: TypeError: Cannot read properties of undefined (reading 'digest') +0ms ``` ## Proposed Solutions Surface an error/warning about not using HTTPS and hence not being able to connect to any peers to the dev/user ## Notes
weboko commented 6 months ago

Let's confirm that full nodes advertise ws connection and not only wss.

In nwaku-compose - https://github.com/waku-org/nwaku-compose/blob/8abb2a474d9bf9f9acc5c3a8bc03c4eda015551d/run_node.sh#L36

Todo: