Closed qiulang closed 1 year ago
@qiulang hi! Could not encode
means the encoder encountered something it was not able to encode (for example, a Set). What are you trying to send? Could you please provide an example?
I found the cause
socket.emit('login', {...//any data}) // won't crash
socket.emit('login', {...//any data}, reply => {}); //crash even reply is {}
But why did "@socket.io/admin-ui" cause that problem ?
@darrachequesne I did not see your reply for some days. Not sure if you find the cause.
So I create a project (based on Socket.IO Fiddle) to reproduce the issue https://github.com/qiulang/socket.io-admin-ui, please take a look
Fixed by upgraded "@socket.io/admin-ui to 0.5.1 The root cause was explained at https://github.com/socketio/socket.io-admin-ui/issues/54
When add socket.io/admin-ui, I hit
Error('Could not encode');