iflytek/astron-agent · error · TypeError

Invalid attempt to spread non-iterable instance. In order…

Error message

Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.

What it means

Babel-compiled _toConsumableArray helper TypeError: a spread (...x) was applied to a value that is neither array-like nor iterable. Same class of failure as the destructure error — a null/undefined/plain-object where an array was expected inside the xrtc player bundle.

Solutions

  1. Ensure the spread source is always an array (default to [] when absent)
  2. Inspect which callee passes the bad value
  3. Verify upstream API/SDK responses match expected array shapes
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at console/frontend/src/utils/avatar-sdk-web_3.1.2.1002/xrtc-player-BJTnVhG9.js:133 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/3823bcd3852f71fe. Report an issue: GitHub.

Appendix: source

Thrown at console/frontend/src/utils/avatar-sdk-web_3.1.2.1002/xrtc-player-BJTnVhG9.js:133

      function a(e) {
        I(o, r, n, s, a, 'throw', e);
      }
      s(void 0);
    });
  };
}
function R(e) {
  return (
    (function (e) {
      if (Array.isArray(e)) return y(e);
    })(e) ||
    (function (e) {
      if ('undefined' != typeof Symbol && Symbol.iterator in Object(e))
        return Array.from(e);
    })(e) ||
    E(e) ||
    (function () {
      throw new TypeError(
        'Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.'
      );
    })()
  );
}
function _(e, t) {
  if (!(e instanceof t))
    throw new TypeError('Cannot call a class as a function');
}
function k(e, t) {
  for (var i = 0; i < t.length; i++) {
    var r = t[i];
    ((r.enumerable = r.enumerable || !1),
      (r.configurable = !0),
      'value' in r && (r.writable = !0),
      Object.defineProperty(e, r.key, r));
  }
}

View on GitHub (pinned to 5e758547a8)