Socketio:错误:单独的代理U + D83D不是一个标量值

最近我的node.js服务器已经崩溃了很多,由于这个socket.io错误。 我怀疑是客户端发送无效的utfstring,这将在utf8.js文件中引发错误。 有没有办法避免服务器崩溃? 这是非常令人沮丧的。 如果需要的话,我要猴子修补这个文件。

 Error: Lone surrogate U+D83D is not a scalar value at Error (native) at checkScalarValue (/root/node_modules/socket.io/node_modules/engine.io/node_modules/engine.io-parser/node_modules/utf8/utf8.js:69:10) at encodeCodePoint (/root/node_modules/socket.io/node_modules/engine.io/node_modules/engine.io-parser/node_modules/utf8/utf8.js:90:4) at Object.utf8encode [as encode] (/root/node_modules/socket.io/node_modules/engine.io/node_modules/engine.io-parser/node_modules/utf8/utf8.js:111:18) at Object.exports.encodePacket (/root/node_modules/socket.io/node_modules/engine.io/node_modules/engine.io-parser/lib/index.js:74:34) at encodeOne (/root/node_modules/socket.io/node_modules/engine.io/node_modules/engine.io-parser/lib/index.js:387:13) at eachWithIndex (/root/node_modules/socket.io/node_modules/engine.io/node_modules/engine.io-parser/lib/index.js:256:5) at map (/root/node_modules/socket.io/node_modules/engine.io/node_modules/engine.io-parser/lib/index.js:263:5) at Object.exports.encodePayloadAsBinary (/root/node_modules/socket.io/node_modules/engine.io/node_modules/engine.io-parser/lib/index.js:411:3) at Object.exports.encodePayload (/root/node_modules/socket.io/node_modules/engine.io/node_modules/engine.io-parser/lib/index.js:225:20) at XHR.Polling.send (/root/node_modules/socket.io/node_modules/engine.io/lib/transports/polling.js:238:10) at Socket.flush (/root/node_modules/socket.io/node_modules/engine.io/lib/socket.js:341:20) at Socket.sendPacket (/root/node_modules/socket.io/node_modules/engine.io/lib/socket.js:317:10) at Socket.send.Socket.write (/root/node_modules/socket.io/node_modules/engine.io/lib/socket.js:290:8) at writeToEngine (/root/node_modules/socket.io/lib/client.js:148:17) at Client.packet (/root/node_modules/socket.io/lib/client.js:159:7) 

       

网上收集的解决方案 "Socketio:错误:单独的代理U + D83D不是一个标量值"