Skip to content

fix(HttpRequestInterceptor): prevent double connection listeners#796

Open
mikicho wants to merge 2 commits into
feat/net-v2from
Michael/fix-request-replayed-twice
Open

fix(HttpRequestInterceptor): prevent double connection listeners#796
mikicho wants to merge 2 commits into
feat/net-v2from
Michael/fix-request-replayed-twice

Conversation

@mikicho
Copy link
Copy Markdown
Member

@mikicho mikicho commented May 17, 2026

Why

The FetchInterceptor -> HttpRequestInterceptor chain resulted in two connection event listeners being added to the underlying SocketInterceptor singleton. Because of that, handling the same request resulted in this error:

Invariant Violation: CANNOT HANDLE ALREADY HANDLED REQUEST

@mikicho mikicho changed the title fix(interceptor): prevent double connection event listener in BatchIn… fix(interceptor): prevent double connection event listener in BatchInterceptor May 17, 2026
@kettanaito kettanaito changed the title fix(interceptor): prevent double connection event listener in BatchInterceptor fix(HttpRequestInterceptor): prevent double connection listeners May 18, 2026
Copy link
Copy Markdown

Copilot AI commented May 18, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • abc123-non-existing.lol
    • Triggering command: /usr/local/bin/node /usr/local/bin/node --conditions node --conditions development --experimental-import-meta-resolve --require /home/REDACTED/work/interceptors/interceptors/node_modules/.pnpm/vitest@4.0.18_@types+node@22.13.9_@vitest+browser-playwright@4.0.18_happy-dom@20.8.3_jiti@2.4_gubi6snf5z2wutleg4gxf57pgu/node_modules/vitest/suppress-warnings.cjs /home/REDACTED/work/interceptors/interceptors/node_modules/.pnpm/vitest@4.0.18_@types+node@22.13.9_@vitest+browser-playwright@4.0.18_happy-dom@20.8.3_jiti@2.4_gubi6snf5z2wutleg4gxf57pgu/node_modules/vitest/dist/workers/forks.js (dns block)
  • any.host.here
    • Triggering command: /usr/local/bin/node /usr/local/bin/node --conditions node --conditions development --experimental-import-meta-resolve --require /home/REDACTED/work/interceptors/interceptors/node_modules/.pnpm/vitest@4.0.18_@types+node@22.13.9_@vitest+browser-playwright@4.0.18_happy-dom@20.8.3_jiti@2.4_gubi6snf5z2wutleg4gxf57pgu/node_modules/vitest/suppress-warnings.cjs /home/REDACTED/work/interceptors/interceptors/node_modules/.pnpm/vitest@4.0.18_@types+node@22.13.9_@vitest+browser-playwright@4.0.18_happy-dom@20.8.3_jiti@2.4_gubi6snf5z2wutleg4gxf57pgu/node_modules/vitest/dist/workers/forks.js (dns block)
  • error.me
    • Triggering command: /usr/local/bin/node /usr/local/bin/node --conditions node --conditions development --experimental-import-meta-resolve --require /home/REDACTED/work/interceptors/interceptors/node_modules/.pnpm/vitest@4.0.18_@types+node@22.13.9_@vitest+browser-playwright@4.0.18_happy-dom@20.8.3_jiti@2.4_gubi6snf5z2wutleg4gxf57pgu/node_modules/vitest/suppress-warnings.cjs /home/REDACTED/work/interceptors/interceptors/node_modules/.pnpm/vitest@4.0.18_@types+node@22.13.9_@vitest+browser-playwright@4.0.18_happy-dom@20.8.3_jiti@2.4_gubi6snf5z2wutleg4gxf57pgu/node_modules/vitest/dist/workers/forks.js (dns block)
  • example.com
    • Triggering command: /usr/local/bin/node /usr/local/bin/node --conditions node --conditions development --experimental-import-meta-resolve --require /home/REDACTED/work/interceptors/interceptors/node_modules/.pnpm/vitest@4.0.18_@types+node@22.13.9_@vitest+browser-playwright@4.0.18_happy-dom@20.8.3_jiti@2.4_gubi6snf5z2wutleg4gxf57pgu/node_modules/vitest/suppress-warnings.cjs /home/REDACTED/work/interceptors/interceptors/node_modules/.pnpm/vitest@4.0.18_@types+node@22.13.9_@vitest+browser-playwright@4.0.18_happy-dom@20.8.3_jiti@2.4_gubi6snf5z2wutleg4gxf57pgu/node_modules/vitest/dist/workers/forks.js (dns block)
  • foo.example.com
    • Triggering command: /usr/local/bin/node /usr/local/bin/node --conditions node --conditions development --experimental-import-meta-resolve --require /home/REDACTED/work/interceptors/interceptors/node_modules/.pnpm/vitest@4.0.18_@types+node@22.13.9_@vitest+browser-playwright@4.0.18_happy-dom@20.8.3_jiti@2.4_gubi6snf5z2wutleg4gxf57pgu/node_modules/vitest/suppress-warnings.cjs /home/REDACTED/work/interceptors/interceptors/node_modules/.pnpm/vitest@4.0.18_@types+node@22.13.9_@vitest+browser-playwright@4.0.18_happy-dom@20.8.3_jiti@2.4_gubi6snf5z2wutleg4gxf57pgu/node_modules/vitest/dist/workers/forks.js (dns block)
  • httpbin.org
    • Triggering command: /usr/local/bin/node /usr/local/bin/node --conditions node --conditions development --experimental-import-meta-resolve --require /home/REDACTED/work/interceptors/interceptors/node_modules/.pnpm/vitest@4.0.18_@types+node@22.13.9_@vitest+browser-playwright@4.0.18_happy-dom@20.8.3_jiti@2.4_gubi6snf5z2wutleg4gxf57pgu/node_modules/vitest/suppress-warnings.cjs /home/REDACTED/work/interceptors/interceptors/node_modules/.pnpm/vitest@4.0.18_@types+node@22.13.9_@vitest+browser-playwright@4.0.18_happy-dom@20.8.3_jiti@2.4_gubi6snf5z2wutleg4gxf57pgu/node_modules/vitest/dist/workers/forks.js (dns block)
  • non-existing-host.com
    • Triggering command: /usr/local/bin/node /usr/local/bin/node --conditions node --conditions development --experimental-import-meta-resolve --require /home/REDACTED/work/interceptors/interceptors/node_modules/.pnpm/vitest@4.0.18_@types+node@22.13.9_@vitest+browser-playwright@4.0.18_happy-dom@20.8.3_jiti@2.4_gubi6snf5z2wutleg4gxf57pgu/node_modules/vitest/suppress-warnings.cjs /home/REDACTED/work/interceptors/interceptors/node_modules/.pnpm/vitest@4.0.18_@types+node@22.13.9_@vitest+browser-playwright@4.0.18_happy-dom@20.8.3_jiti@2.4_gubi6snf5z2wutleg4gxf57pgu/node_modules/vitest/dist/workers/forks.js (dns block)
  • non-existing-url.com
    • Triggering command: /usr/local/bin/node /usr/local/bin/node --conditions node --conditions development --experimental-import-meta-resolve --require /home/REDACTED/work/interceptors/interceptors/node_modules/.pnpm/vitest@4.0.18_@types+node@22.13.9_@vitest+browser-playwright@4.0.18_happy-dom@20.8.3_jiti@2.4_gubi6snf5z2wutleg4gxf57pgu/node_modules/vitest/suppress-warnings.cjs /home/REDACTED/work/interceptors/interceptors/node_modules/.pnpm/vitest@4.0.18_@types+node@22.13.9_@vitest+browser-playwright@4.0.18_happy-dom@20.8.3_jiti@2.4_gubi6snf5z2wutleg4gxf57pgu/node_modules/vitest/dist/workers/forks.js (dns block)
  • non-existing.com
    • Triggering command: /usr/local/bin/node /usr/local/bin/node --conditions node --conditions development --experimental-import-meta-resolve --require /home/REDACTED/work/interceptors/interceptors/node_modules/.pnpm/vitest@4.0.18_@types+node@22.13.9_@vitest+browser-playwright@4.0.18_happy-dom@20.8.3_jiti@2.4_gubi6snf5z2wutleg4gxf57pgu/node_modules/vitest/suppress-warnings.cjs /home/REDACTED/work/interceptors/interceptors/node_modules/.pnpm/vitest@4.0.18_@types+node@22.13.9_@vitest+browser-playwright@4.0.18_happy-dom@20.8.3_jiti@2.4_gubi6snf5z2wutleg4gxf57pgu/node_modules/vitest/dist/workers/forks.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot stopped work on behalf of mikicho due to an error May 18, 2026 19:00
@mikicho mikicho force-pushed the Michael/fix-request-replayed-twice branch from 1cdd747 to 862f902 Compare May 18, 2026 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants