socketio / chat-example

Basic chat example with Socket.IO
https://socket.io
MIT License
1.42k stars 1.31k forks source link

Microsoft Edge Crushing Nodejs #85

Open RobGrants opened 7 months ago

RobGrants commented 7 months ago

Great example, however it seems my Microsoft Edge v 123.0.2420.1 is killing the script every time I start typing in Edge.

Edge is receiving other messages from Chrome and Firefox without problem.

C:\Users\ted\NODEDEV\WEBSOCKET3\index.js:46 callback(); ^

TypeError: callback is not a function at Socket. (C:\Users\ted\NODEDEV\WEBSOCKET3\index.js:46:7)

Node.js v18.18.2 [nodemon] app crashed - waiting for file changes before starting... [nodemon] restarting due to changes... [nodemon] starting node index.js server running at http://localhost:3000

How can I resolve sending messages by Edge?

darrachequesne commented 7 months ago

callback being undefined probably means that the retries option is missing: https://github.com/socketio/chat-example/blob/07a183a618aea3e1c7f63c8d9bb1fcb78a1e99e8/index.html#L28-L34

Reference: https://socket.io/docs/v4/client-options/#retries

Could you please check?