Reproduction for failing Websocket closing in browsers and use-after-free in both browsers and node.
- Build for web:
wasm-pack build --target web - Serve root directory, e.g. with
python3 -m http.server - Open the
localhostsite in your browser and open the devtools console - Click the "Connect to Seed" button, then wait a few seconds
- Observe errors in the console when the peer sends data or closes the connection
- Build for nodejs:
wasm-pack build --target nodejs - Install node dependencies:
npm ior equivalent in your favourite npm package manager - Start node program:
node index.js - Observe error almost immediately and how node exits the program