Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Backend crash-loops forever ("Reconnecting…") — uncaught setTypeOfService EINVAL from PortDiscovery #10665

Closedwilkye(GitHub profile, opens in a new tab) opened this issue 2 comments

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/desktop

Steps to reproduce

  1. On macOS, install Adobe Creative Cloud and make sure Adobe Desktop Service is running. Confirm it holds the port: lsof -nP -iTCP:15292 -sTCP:LISTEN (Expect Adobe Desktop Service ... 127.0.0.1:15292 (LISTEN).)
  2. Launch T3 Code and open any project.
  3. Wait ~30 seconds. PortDiscovery polls every ~3s and hits 15292.
  4. Observed: the "Reconnecting…" banner appears and never clears. ~/.t3/userdata/logs/server-child.log fills with setTypeOfService EINVAL, each followed by backend child process failure output end ... code=1.
  5. Confirm the backend is cycling — the child PID keeps changing while the main process stays up:ps -eo pid,etime,command | grep "T3 Code.*MacOS" | grep -v grep

Expected behavior

A port that doesn't speak HTTP should be recorded as "not a dev server" and skipped. PortDiscovery is a background convenience feature — a failed probe should never affect the backend process.

Actual behavior

Probing a port that resets the connection throws EINVAL from Socket#setTypeOfService inside undici's writeH1. It's thrown from a once('connect') handler with no catch around it, so it escapes as an uncaughtException and kills the backend child with exit code 1.

The supervisor restarts the child, PortDiscovery runs again, hits the same port, and dies again. This repeats indefinitely — ~1,460 crash-restart cycles over 8 days on my machine, 13–38 per hour.

The renderer process stays alive the whole time, so the only user-visible symptom is a "Reconnecting…" banner that never clears. No error is surfaced anywhere in the UI.

Impact

Blocks work completely

Version or commit

0.0.39

Environment

macOS 27 beta 8

Logs or stack traces

node:net:684
      throw new ErrnoException(err, 'setTypeOfService');
      ^

Error: setTypeOfService EINVAL
    at Socket.setTypeOfService (node:net:684:13)
    at writeH1 (node:internal/deps/undici/undici:8022:16)
    at Object.write (node:internal/deps/undici/undici:7758:18)
    at _resume (node:internal/deps/undici/undici:9656:54)
    at resume (node:internal/deps/undici/undici:9589:7)
    at Client.<computed> (node:internal/deps/undici/undici:9370:35)
    at node:internal/deps/undici/undici:9539:26
    at Socket.<anonymous> (node:internal/deps/undici/undici:3342:13)
    at Object.onceWrapper (node:events:630:28)
    at Socket.emit (node:events:509:28) {
  errno: -22,
  code: 'EINVAL',
  syscall: 'setTypeOfService'
}

Node.js v24.18.1

backend child process failure output end ... pid=92001 code=1

Screenshots, recordings, or supporting files

t3serverchildexcerpt.log

Workaround

Quit Adobe's background service so the port is no longer held:

osascript -e 'quit app "Creative Cloud"'; pkill -f "Adobe Desktop Service"

Then relaunch T3 Code. Verified: the crash counter stopped climbing, the backend child stayed up (vs. respawning 4+ times per 16 minutes), and the banner cleared.

Adobe Desktop Service is launchd-managed and returns on login, so this needs "Launch Creative Cloud at login" disabled in Creative Cloud → Settings → General to persist.

There is no in-app setting to disable PortDiscovery, so users who need Creative Cloud running have no way to avoid this.

  1. wilkye(GitHub profile, opens in a new tab) added labelsbug

  2. wilkye(GitHub profile, opens in a new tab) added labelsneeds-triage

  3. Duplicate of https://github.com/pingdotgg/t3code/issues/9264 — same uncaught setTypeOfService EINVAL from undici taking down the backend child into a reconnect loop on macOS. This report adds a useful trigger (PortDiscovery probing Adobe Desktop Service on :15292), but the crash signature and symptom match #9264.

  4. juliusmarminge removed labelsneeds-triage

  5. juliusmarminge added labelsduplicate

  6. Closing as duplicate of #9264.

  7. juliusmarminge closed this

Sign in to join this conversation.