Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(socks): downgrade socks-proxy-agent to fix two failing tests on main #32988

Closed
wants to merge 1 commit into from

Conversation

Skn0tt
Copy link
Member

@Skn0tt Skn0tt commented Oct 7, 2024

"should pass with matching certificates when a socks proxy is used" was broken by de4a4d1. This PR fixes it by downgrading socks-proxy-agent to the version it was at before - I added that upgrade to the PR to keep it up-to-date, but we only needed to really update https-proxy-agent.

@Skn0tt Skn0tt added the CQ1 label Oct 7, 2024
@Skn0tt Skn0tt requested a review from mxschmitt October 7, 2024 14:05
@Skn0tt Skn0tt self-assigned this Oct 7, 2024
@@ -97,8 +98,8 @@ class SocksProxyConnection {
}

async connect() {
if (this.socksProxy.proxyAgentFromOptions)
this.target = await this.socksProxy.proxyAgentFromOptions.connect(new EventEmitter() as any, { host: rewriteToLocalhostIfNeeded(this.host), port: this.port, secureEndpoint: false });
if (this.socksProxy.proxyAgentFromOptions instanceof SocksProxyAgent)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks wrong, it can be also a HttpsProxyAgent.

Copy link
Member Author

@Skn0tt Skn0tt Oct 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In a file called socksClientCertificatesInterceptor.ts?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Background: Only the communication between the browser and Playwright is made via a Socks Proxy, hence its called like that. Internally when we make requests to the target (e.g. internal.corp.com it can be either direct or via an agent. An agent is a proxy agent which then can be https or socks.). (We don't intercept http traffic.)

@@ -24,7 +24,7 @@
"proxy-from-env": "1.1.0",
"retry": "0.12.0",
"signal-exit": "3.0.7",
"socks-proxy-agent": "8.0.4",
"socks-proxy-agent": "6.1.1",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https-proxy-agent and socks-proxy-agent depend both on agent-base. So ideally we keep them in sync.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need the up-to-date version for the fix from de4a4d1 though. If we want to keep them in sync, we need to revert it until I figure out how we can update socks-proxy-agent.

@Skn0tt
Copy link
Member Author

Skn0tt commented Oct 7, 2024

Alright, reverting in #32989.

Copy link
Contributor

github-actions bot commented Oct 7, 2024

Test results for "tests others"

2 failed
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used

20524 passed, 491 skipped
✔️✔️✔️

Merge workflow run.

Copy link
Contributor

github-actions bot commented Oct 7, 2024

Test results for "tests 1"

6 failed
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [firefox-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [webkit-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used

2 flaky ⚠️ [playwright-test] › ui-mode-test-update.spec.ts:202:5 › should update test locations
⚠️ [webkit-library] › library/video.spec.ts:797:5 › screencast › should work with video+trace

35814 passed, 619 skipped
✔️✔️✔️

Merge workflow run.

Copy link
Contributor

github-actions bot commented Oct 7, 2024

Test results for "tests 2"

70 failed
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-library] › library/video.spec.ts:381:5 › screencast › should capture navigation
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [firefox-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [firefox-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [firefox-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [firefox-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [firefox-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [firefox-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [firefox-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [firefox-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [firefox-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [firefox-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [firefox-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [firefox-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [firefox-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-library] › library/emulation-focus.spec.ts:104:3 › should not affect screenshots
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-page] › page/interception.spec.ts:124:3 › should intercept worker requests when enabled after worker creation
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-page] › page/interception.spec.ts:124:3 › should intercept worker requests when enabled after worker creation
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-page] › page/interception.spec.ts:124:3 › should intercept worker requests when enabled after worker creation
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [firefox-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [webkit-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [webkit-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [webkit-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [webkit-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [webkit-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [webkit-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [webkit-library] › library/inspector/cli-codegen-3.spec.ts:686:7 › cli codegen › should assert value
❌ [webkit-library] › library/inspector/cli-codegen-3.spec.ts:733:7 › cli codegen › should assert value on disabled input
❌ [webkit-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [webkit-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [webkit-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [webkit-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [webkit-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [webkit-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used
❌ [webkit-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used

43 flaky ⚠️ [chromium-library] › library/inspector/cli-codegen-1.spec.ts:24:7 › cli codegen › should click
⚠️ [chromium-library] › library/inspector/pause.spec.ts:112:5 › pause › should pause on next pause
⚠️ [chromium-library] › library/trace-viewer.spec.ts:1324:1 › should open snapshot in new browser context
⚠️ [chromium-library] › library/inspector/cli-codegen-3.spec.ts:171:7 › cli codegen › should generate frame locators (4)
⚠️ [chromium-page] › page/page-add-locator-handler.spec.ts:301:5 › should wait for hidden by default 2
⚠️ [chromium-library] › library/inspector/cli-codegen-3.spec.ts:171:7 › cli codegen › should generate frame locators (4)
⚠️ [chromium-library] › library/inspector/cli-codegen-2.spec.ts:249:7 › cli codegen › should handle dialogs
⚠️ [firefox-library] › library/client-certificates.spec.ts:705:3 › browser › support http2 if the browser only supports http1.1
⚠️ [firefox-library] › library/capabilities.spec.ts:254:3 › requestFullscreen
⚠️ [firefox-library] › library/video.spec.ts:381:5 › screencast › should capture navigation
⚠️ [firefox-page] › page/page-screenshot.spec.ts:668:5 › page screenshot animations › should resume infinite animations
⚠️ [firefox-library] › library/inspector/cli-codegen-2.spec.ts:467:7 › cli codegen › should --save-trace
⚠️ [firefox-library] › library/inspector/cli-codegen-3.spec.ts:283:7 › cli codegen › should generate frame locators with title attribute
⚠️ [firefox-library] › library/inspector/cli-codegen-3.spec.ts:616:7 › cli codegen › should consume contextmenu events, despite a custom context menu
⚠️ [firefox-library] › library/selector-generator.spec.ts:504:5 › selector generator › should generate exact title when necessary
⚠️ [firefox-page] › page/page-click.spec.ts:105:3 › should click the button after navigation
⚠️ [firefox-page] › page/page-set-input-files.spec.ts:39:3 › should upload a folder
⚠️ [chromium-library] › library/client-certificates.spec.ts:400:3 › browser › should not hang on tls errors during TLS 1.2 handshake
⚠️ [chromium-library] › library/trace-viewer.spec.ts:730:1 › should register custom elements
⚠️ [chromium-page] › page/page-click.spec.ts:850:3 › should not hang when frame is detached
⚠️ [webkit-library] › library/video.spec.ts:165:5 › screencast › should work with old options
⚠️ [webkit-library] › library/video.spec.ts:581:5 › screencast › should capture static page in persistent context @smoke
⚠️ [webkit-library] › library/inspector/cli-codegen-1.spec.ts:611:7 › cli codegen › should select
⚠️ [webkit-page] › page/page-request-continue.spec.ts:196:5 › post data › should compute content-length from post data
⚠️ [webkit-library] › library/browsercontext-reuse.spec.ts:206:1 › should reset mouse position
⚠️ [webkit-library] › library/inspector/cli-codegen-1.spec.ts:200:7 › cli codegen › should work with TrustedTypes
⚠️ [webkit-library] › library/inspector/cli-codegen-1.spec.ts:238:7 › cli codegen › should not target selector preview by text regexp
⚠️ [webkit-library] › library/inspector/pause.spec.ts:143:5 › pause › should step with keyboard shortcut
⚠️ [webkit-library] › library/inspector/cli-codegen-1.spec.ts:24:7 › cli codegen › should click
⚠️ [webkit-library] › library/inspector/cli-codegen-3.spec.ts:26:7 › cli codegen › should click locator.first
⚠️ [webkit-library] › library/inspector/cli-codegen-3.spec.ts:779:7 › cli codegen › should assert visibility
⚠️ [webkit-library] › library/inspector/cli-codegen-1.spec.ts:56:7 › cli codegen › should double click
⚠️ [webkit-library] › library/inspector/cli-codegen-3.spec.ts:171:7 › cli codegen › should generate frame locators (4)
⚠️ [webkit-library] › library/inspector/cli-codegen-3.spec.ts:437:7 › cli codegen › should generate getByTestId
⚠️ [webkit-library] › library/inspector/cli-codegen-3.spec.ts:556:7 › cli codegen › should generate getByLabel without regex
⚠️ [webkit-library] › library/inspector/cli-codegen-3.spec.ts:616:7 › cli codegen › should consume contextmenu events, despite a custom context menu
⚠️ [webkit-library] › library/selector-generator.spec.ts:394:5 › selector generator › should use the name attributes for elements that can have it
⚠️ [webkit-library] › library/browsercontext-basic.spec.ts:34:3 › should be able to click across browser contexts
⚠️ [webkit-library] › library/tracing.spec.ts:410:14 › should produce screencast frames fit
⚠️ [webkit-library] › library/tracing.spec.ts:410:14 › should produce screencast frames scale
⚠️ [webkit-page] › page/page-request-continue.spec.ts:253:5 › post data › should amend binary post data
⚠️ [webkit-library] › library/tracing.spec.ts:410:14 › should produce screencast frames crop
⚠️ [webkit-library] › library/tracing.spec.ts:410:14 › should produce screencast frames scale

234821 passed, 9301 skipped
✔️✔️✔️

Merge workflow run.

@Skn0tt Skn0tt closed this Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants