iflytek/astron-agent · error · RangeError

max_framerate must be >= 0.0

Error message

max_framerate must be >= 0.0

What it means

A RangeError from the addTransceiver shim's sendEncodings validation when maxFramerate is present but parses to a negative number (or non-numeric). Indicates malformed RTP encoding parameters supplied to the avatar SDK's PeerConnection.

Solutions

  1. Set maxFramerate to a non-negative number (e.g. 15, 30)
  2. Remove maxFramerate from sendEncodings if framerate capping is not needed
  3. Validate encoding params before passing them to addTransceiver
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at console/frontend/src/utils/avatar-sdk-web_3.1.2.1002/webrtc-player--YuOiwFd.js:1857 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of iflytek/astron-agent@5e758547a8 (2026-09-12). Data as JSON: /api/errors/4598663648e81518. Report an issue: GitHub.

Appendix: source

Thrown at console/frontend/src/utils/avatar-sdk-web_3.1.2.1002/webrtc-player--YuOiwFd.js:1857

                  this.setParametersPromises = [];
                  var e = arguments[1],
                    r = e && 'sendEncodings' in e;
                  r &&
                    e.sendEncodings.forEach(function (e) {
                      if ('rid' in e && !/^[a-z0-9]{0,16}$/i.test(e.rid))
                        throw new TypeError('Invalid RID value provided.');
                      if (
                        'scaleResolutionDownBy' in e &&
                        !(parseFloat(e.scaleResolutionDownBy) >= 1)
                      )
                        throw new RangeError(
                          'scale_resolution_down_by must be >= 1.0'
                        );
                      if (
                        'maxFramerate' in e &&
                        !(parseFloat(e.maxFramerate) >= 0)
                      )
                        throw new RangeError('max_framerate must be >= 0.0');
                    });
                  var n = t.apply(this, arguments);
                  if (r) {
                    var i = n.sender,
                      a = i.getParameters();
                    'encodings' in a ||
                      ((a.encodings = e.sendEncodings),
                      this.setParametersPromises.push(
                        i.setParameters(a).catch(function () {})
                      ));
                  }
                  return n;
                });
            }
          }),
          (n.shimCreateOffer = function (e) {
            if (
              'object' === (void 0 === e ? 'undefined' : i(e)) &&

View on GitHub (pinned to 5e758547a8)