Skip to content

CI test runner hangs when Zone-leaked errors hit jsdom-svg-polyfill uncaughtException handler #4998

Closed

Description

@Ma77Ball

What happened?

The frontend Vitest CI job hangs intermittently on Linux/macOS runners (Windows usually passes by scheduling luck). The runner stalls until the GitHub Actions timeout, even though all individual test assertions pass.

Root cause: frontend/src/jsdom-svg-polyfill.ts registers a process.on("uncaughtException") handler that re-throws any non-benign error. Re-throwing inside uncaughtException aborts the Node process, which kills the Vitest
worker mid-run, leaves the pool, waiting for results that never arrive.

The trigger is execute-workflow.service.spec.ts line 161, which deliberately throws "Logical plan error" to test error propagation. The synchronous throw is caught correctly by expect(...).toThrowError(...), but Zone.js
asynchronously re-emits it to process, where the polyfill's handler then re-throws, crashing the worker.

Expected: the runner finishes the suite, and reports pass/fail cleanly.

How to reproduce?

  1. Run yarn --cwd frontend run test:ci on a Linux runner against the current main.

  2. Observe the run intermittently hangs after execute-workflow.service.spec.ts completes, with this trace before stalling:

    /home/runner/work/texera/texera/frontend/setup-jsdom-svg-polyfill.js:119
    throw err;
    ^
    Logical plan error
    Node.js v24.10.0

  3. Failure is non-deterministic — depends on Vitest worker scheduling. Adding new specs (e.g. menu.component.spec.ts on test/menuComponent) makes it reproduce more reliably.

Branch

main

Commit Hash (Optional)

No response

What browsers are you seeing the problem on?

Chrome

Relevant log output

Activity

  1. added theissue type on May 9, 2026
  2. Ma77Ball commented on May 9, 2026

    @Ma77Ball
    ContributorAuthor

    /take

  3. added a commit that references this issue on May 9, 2026
    6f088ab
  4. added a commit that references this issue on Jun 22, 2026
    c623d2f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions