simple-whip-server icon indicating copy to clipboard operation
simple-whip-server copied to clipboard

Circular reference in endpoint structure

Open hk298 opened this issue 3 months ago • 0 comments

I'm expanding on the sample server apps you provided as examples and called something like this: JSON.stringify(server.getEndpoint(req.params))

This produces the following error:

TypeError: Converting circular structure to JSON
    --> starting at object with constructor 'Timeout'
    |     property '_idlePrev' -> object with constructor 'TimersList'
    --- property '_idleNext' closes the circle

Here's a snippet of getEndpoint's output when sent to the console log:

JanusWhipEndpoint {
  handle: VideoRoomHandle {
    session: Session {
      _ka_task: Timeout {
        _idleTimeout: 30000,
        _idlePrev: [Timeout],
        _idleNext: [Timeout],

How can this be fixed?

hk298 avatar Oct 06 '25 21:10 hk298