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(ext/node): fix playwright http client #27662

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

kt3k
Copy link
Member

@kt3k kt3k commented Jan 14, 2025

Similarly to #27639, this PR applies the same workaround to playwright-core package.

Confirmed playwright install command work with this fix:

$ debug_deno run -A "npm:[email protected]" install chromium-headless-shell
Downloading Chromium Headless Shell 131.0.6778.33 (playwright build v1148) from https://playwright.azureedge.net/builds/chromium/1148/chromium-headless-shell-mac-arm64.zip
77.5 MiB [====================] 100% 0.0s
Chromium Headless Shell 131.0.6778.33 (playwright build v1148) downloaded to /Users/kt3k/Library/Caches/ms-playwright/chromium_headless_shell-1148
Downloading FFMPEG playwright build v1010 from https://playwright.azureedge.net/builds/ffmpeg/1010/ffmpeg-mac-arm64.zip
1.1 MiB [====================] 100% 0.0s
FFMPEG playwright build v1010 downloaded to /Users/kt3k/Library/Caches/ms-playwright/ffmpeg-1010

closes #27658

This was caused by #25470

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

Thanks!

@kt3k kt3k merged commit c943f56 into denoland:main Jan 14, 2025
17 checks passed
@kt3k kt3k deleted the fix-ext-node-fix-playwright-core branch January 14, 2025 16:00
kt3k added a commit that referenced this pull request Jan 28, 2025
)

This PR resolves 2 issues of Socket class of node compat (both are
related to playwright)

Currently `browser.launch()` of playwright is not working.
`browser.launch` opens PipeTransport (which is based on Pipe/IPC socket)
with the browser process. But that pipe doesn't start reading the data
because of the workaround #27662 (which pauses the socket at the
beginning if it's from playwright-core). This PR fixes this issue by
checking whether the given handle is `ipc` handle or not.

Another issue is that sock-init-workaround for TLS connection stopped
working at #27707 because of the changes of TLS socket initialization
steps. This change fixes the issue by correctly returning the function
in workaround path.

The added case `specs::npm::playwright_compat` checks both fixes with
actual playwright and playwright-core packages.

`browser.launch` issues
closes #16899
closes #27623 

`https.request` issue
closes #27658
bartlomieju pushed a commit that referenced this pull request Jan 30, 2025
)

This PR resolves 2 issues of Socket class of node compat (both are
related to playwright)

Currently `browser.launch()` of playwright is not working.
`browser.launch` opens PipeTransport (which is based on Pipe/IPC socket)
with the browser process. But that pipe doesn't start reading the data
because of the workaround #27662 (which pauses the socket at the
beginning if it's from playwright-core). This PR fixes this issue by
checking whether the given handle is `ipc` handle or not.

Another issue is that sock-init-workaround for TLS connection stopped
working at #27707 because of the changes of TLS socket initialization
steps. This change fixes the issue by correctly returning the function
in workaround path.

The added case `specs::npm::playwright_compat` checks both fixes with
actual playwright and playwright-core packages.

`browser.launch` issues
closes #16899
closes #27623 

`https.request` issue
closes #27658
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.

playwright regression in 2.1.5 (BadResource: Bad resource ID)
2 participants