{"record":{"id":"85bc57baa46fe589","repo":"iflytek/astron-agent","slug":"scale-resolution-down-by-must-be-1-0","errorCode":null,"errorMessage":"scale_resolution_down_by must be >= 1.0","messagePattern":"scale_resolution_down_by must be >= 1\\.0","errorType":"exception","errorClass":"RangeError","httpStatus":null,"severity":"error","filePath":"console/frontend/src/utils/avatar-sdk-web_3.1.2.1002/webrtc-player--YuOiwFd.js","lineNumber":1850,"sourceCode":"            if (\n              'object' === (void 0 === e ? 'undefined' : i(e)) &&\n              e.RTCPeerConnection\n            ) {\n              var t = e.RTCPeerConnection.prototype.addTransceiver;\n              t &&\n                (e.RTCPeerConnection.prototype.addTransceiver = function () {\n                  this.setParametersPromises = [];\n                  var e = arguments[1],\n                    r = e && 'sendEncodings' in e;\n                  r &&\n                    e.sendEncodings.forEach(function (e) {\n                      if ('rid' in e && !/^[a-z0-9]{0,16}$/i.test(e.rid))\n                        throw new TypeError('Invalid RID value provided.');\n                      if (\n                        'scaleResolutionDownBy' in e &&\n                        !(parseFloat(e.scaleResolutionDownBy) >= 1)\n                      )\n                        throw new RangeError(\n                          'scale_resolution_down_by must be >= 1.0'\n                        );\n                      if (\n                        'maxFramerate' in e &&\n                        !(parseFloat(e.maxFramerate) >= 0)\n                      )\n                        throw new RangeError('max_framerate must be >= 0.0');\n                    });\n                  var n = t.apply(this, arguments);\n                  if (r) {\n                    var i = n.sender,\n                      a = i.getParameters();\n                    'encodings' in a ||\n                      ((a.encodings = e.sendEncodings),\n                      this.setParametersPromises.push(\n                        i.setParameters(a).catch(function () {})\n                      ));\n                  }","sourceCodeStart":1832,"sourceCodeEnd":1868,"githubUrl":"https://github.com/iflytek/astron-agent/blob/5e758547a83371a5a4b29dadf4ac03e8dd527635/console/frontend/src/utils/avatar-sdk-web_3.1.2.1002/webrtc-player--YuOiwFd.js#L1832-L1868","documentation":"A RangeError from the addTransceiver shim's sendEncodings validation when scaleResolutionDownBy is present but parses to a value below 1.0 (or non-numeric). Fires when the caller supplies invalid simulcast scaling parameters to the avatar SDK's PeerConnection.","triggerScenarios":"Thrown at console/frontend/src/utils/avatar-sdk-web_3.1.2.1002/webrtc-player--YuOiwFd.js:1850 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set scaleResolutionDownBy to values >= 1.0 (e.g. 1, 2, 4 for simulcast layers)","Remove the property if downscaling is not intended","Validate/parseFloat the value in SDK config before passing it in"],"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"}