{"record":{"id":"3c512b88f4925982","repo":"iflytek/astron-agent","slug":"message-too-large-can-send-a-maximum-of-max-bytes","errorCode":null,"errorMessage":"Message too large (can send a maximum of MAX bytes)","messagePattern":"Message too large \\(can send a maximum of MAX bytes\\)","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"console/frontend/src/utils/avatar-sdk-web_3.1.2.1002/webrtc-player--YuOiwFd.js","lineNumber":1328,"sourceCode":"              ((e.RTCPeerConnection.prototype.createDataChannel = function () {\n                var e = t.apply(this, arguments);\n                return (r(e, this), e);\n              }),\n                s.wrapPeerConnectionEvent(e, 'datachannel', function (e) {\n                  return (r(e.channel, e.target), e);\n                }));\n            }\n            function r(e, t) {\n              var r = e.send;\n              e.send = function () {\n                var n = arguments[0],\n                  i = n.length || n.size || n.byteLength;\n                if (\n                  'open' === e.readyState &&\n                  t.sctp &&\n                  i > t.sctp.maxMessageSize\n                )\n                  throw new TypeError(\n                    'Message too large (can send a maximum of ' +\n                      t.sctp.maxMessageSize +\n                      ' bytes)'\n                  );\n                return r.apply(e, arguments);\n              };\n            }\n          }),\n          (n.shimConnectionState = function (e) {\n            if (\n              e.RTCPeerConnection &&\n              !('connectionState' in e.RTCPeerConnection.prototype)\n            ) {\n              var t = e.RTCPeerConnection.prototype;\n              (Object.defineProperty(t, 'connectionState', {\n                get: function () {\n                  return (\n                    { completed: 'connected', checking: 'connecting' }[","sourceCodeStart":1310,"sourceCodeEnd":1346,"githubUrl":"https://github.com/iflytek/astron-agent/blob/5e758547a83371a5a4b29dadf4ac03e8dd527635/console/frontend/src/utils/avatar-sdk-web_3.1.2.1002/webrtc-player--YuOiwFd.js#L1310-L1346","documentation":"A RangeError thrown by the shimmed RTCDataChannel.send when the payload length/size/byteLength exceeds the channel's negotiated MAX message size. The avatar SDK's data channel cannot carry the message; large JSON/frames sent over the signaling data channel trigger it.","triggerScenarios":"Thrown at console/frontend/src/utils/avatar-sdk-web_3.1.2.1002/webrtc-player--YuOiwFd.js:1328 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Split or compress the payload so it fits under the data channel's maxMessageSize","Check negotiated maxMessageSize via sctp capabilities before sending","Move large payloads to HTTP and only signal via the data channel","Reduce serialization size (strip base64/binary from channel messages)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5e758547a83371a5a4b29dadf4ac03e8dd527635","analyzedAt":"2026-09-12T08:03:51.356Z","contentChangedAt":"2026-09-12T08:03:51.356Z","schemaVersion":2},"datasetVersion":"2026-09-19T12:17:13.211Z"}