Volto 16.20.5 error: Converting circular structure to JSON

What would cause this error, when no content changes and no server changes have happened in some time? The site has been up for a year, and it started misbehaving yesterday.

This is for Volto 16.20.5.

Plone 6.0.7 (6018)
CMF 3.2
Zope 5.8.5
Python 3.10.12 (main, Nov 6 2024, 20:22:13) [GCC 11.4.0]
PIL 9.5.0 (Pillow)
WSGI: On
Server: waitress 2.1.2
Sorry, something went wrong with your request

Converting circular structure to JSON --> starting at object with constructor 'Object' --- property 'issuerCertificate' closes the circle

The back end runs fine (can see it through the ssh tunnel on port 8080).

Normally the front end is started with NODE_ENV=production node build/server.js.

If we start the Volto front end using make start, it works ok without this error (can see it via ssh tunnel to port 3000).


TypeError: Converting circular structure to JSON
    --> starting at object with constructor 'Object'
    --- property 'issuerCertificate' closes the circle
    at JSON.stringify (<anonymous>)
    at serialize (/home/zope/site/frontend/node_modules/serialize-javascript/index.js:192:20)
    at Html.render (/home/zope/site/frontend/node_modules/@plone/volto/src/helpers/Html/Html.jsx:187:1)
    at processChild (/home/zope/site/frontend/node_modules/react-dom/cjs/react-dom-server.node.development.js:3450:18)
    at resolve (/home/zope/site/frontend/node_modules/react-dom/cjs/react-dom-server.node.development.js:3270:5)
    at ReactDOMServerRenderer.render (/home/zope/site/frontend/node_modules/react-dom/cjs/react-dom-server.node.development.js:3753:22)
    at ReactDOMServerRenderer.read (/home/zope/site/frontend/node_modules/react-dom/cjs/react-dom-server.node.development.js:3690:29)
    at renderToString (/home/zope/site/frontend/node_modules/react-dom/cjs/react-dom-server.node.development.js:4298:27)
    at /home/zope/site/frontend/build/webpack:/node_modules/@plone/volto/src/server.jsx:291:1
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

The server runs Ubuntu 22.04 LTS, and the SSL certificate was issued by certbot on Nov. 21, so the problem seems unlikely to be an old TLS version or just an old certificate.

@tkimnguyen Line 187 of Html.jsx (from the stack trace) is trying to serialize the state of the Redux store. Somehow you must have a self-referential structure in there. I have no idea why certificate details would be there but it sounds like maybe there's a certificate that incorrectly references itself as its own issuer.

Thanks @davisagli