I encountered a fetch connect timeout error (took around 249021ms) when the server attempted to proxy a request. This is caused by a known issue in Node 18/20's undici fetch implementation when trying to establish IPv6 connections that drop silently.
Adding --dns-result-order=ipv4first to the spawned Node processes (for the server and the tray) in cli.js completely resolves the issue, forcing it to fall back properly to IPv4.
Stack Trace:
[20:03:28] 🟡 ✗ ERROR 502 · nvidia/z-ai/glm-5.2 · 249021ms [502]: fetch connect timeout Error: fetch connect timeout at node:internal/deps/undici/undici:14976:13
Fix:
In cli.js, simply append --dns-result-order=ipv4first to the spawn arguments where serverPath and the tray background process are launched.
I encountered a
fetch connect timeouterror (took around 249021ms) when the server attempted to proxy a request. This is caused by a known issue in Node 18/20'sundicifetch implementation when trying to establish IPv6 connections that drop silently.Adding
--dns-result-order=ipv4firstto the spawned Node processes (for the server and the tray) incli.jscompletely resolves the issue, forcing it to fall back properly to IPv4.Stack Trace:
Fix:
In
cli.js, simply append--dns-result-order=ipv4firstto thespawnarguments whereserverPathand the tray background process are launched.