fix: get rid of url.parse in network code
Motivation: This produces warnings in Node.js >= 24.
https://github.com/microsoft/playwright/issues/36404
Tests are failing with:
...
Fixed in commit 6d9967d. The issue was that my manual property mapping was missing the auth property that was previously included by the ...parsedUrl spread operator. I've added proper auth handling that converts URL username/password to the auth property expected by HTTP libraries.
[!WARNING]
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
1.non.existent.domain.for.the.test
- Triggering command:
/home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1180/chrome-linux/headless_shell --disable-field-trial-config --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=AcceptCHFrame,AutoExpandDetailsElement,AvoidUnnecessaryBeforeUnloadCheckSync,CertificateTransparencyComponentUpdater,DestroyProfileOnBrowserClose,DialMediaRouteProvider,ExtensionManifestV2Disabled,GlobalMediaControls,HttpsUpgrades,ImprovedCookieControls,LazyFrameLoading,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Translate --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-REDACTEDing --force-color-profile=srgb --metrics-recording-only --no-first-run --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --disable-search-engine-choice-screen --unsafely-disable-devtools-self-xss-warnings --enable-automation --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --user-data-dir=/tmp/playwright_chromiumdev_profile-wXlk6A --remote-debugging-pipe --no-startup-window(dns block)127.0.0.2
- Triggering command:
/opt/hostedtoolcache/node/22.16.0/x64/bin/node /home/REDACTED/work/playwright/playwright/packages/playwright/lib/common/process.js(packet block)concertads-configs.vox-cdn.com
- Triggering command:
/home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1180/chrome-linux/headless_shell --disable-field-trial-config --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=AcceptCHFrame,AutoExpandDetailsElement,AvoidUnnecessaryBeforeUnloadCheckSync,CertificateTransparencyComponentUpdater,DestroyProfileOnBrowserClose,DialMediaRouteProvider,ExtensionManifestV2Disabled,GlobalMediaControls,HttpsUpgrades,ImprovedCookieControls,LazyFrameLoading,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Translate --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-REDACTEDing --force-color-profile=srgb --metrics-recording-only --no-first-run --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --disable-search-engine-choice-screen --unsafely-disable-devtools-self-xss-warnings --enable-automation --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --user-data-dir=/tmp/playwright_chromiumdev_profile-eeNjqG --remote-debugging-pipe --no-startup-window(dns block)httpbin.org
- Triggering command: `node -e const https = require('https');
// Simulate exactly what my code does const parsedUrl = new URL('REDACTED'); const options = { protocol: parsedUrl.protocol, hostname: parsedUrl.hostname, port: parsedUrl.port || undefined, path: parsedUrl.pathname + parsedUrl.search, host: parsedUrl.host, method: 'GET' };
console.log('Making request with my approach...'); console.log('Options:', options);
const req = https.request(options, (res) => { console.log('Success! Status:', res.statusCode); res.on('data', () => {}); res.on('end', () => { console.log('Request completed successfully'); process.exit(0); }); });
req.on('error', (err) => { console.log('Error:', err.message); process.exit(1); });
req.setTimeout(5000, () => { console.log('Request timed out'); req.abort(); process.exit(1); });
req.end(); ` (dns block)
- Triggering command: `node -e // Test the httpRequest function by requiring the built module const path = require('path'); const { httpRequest } = require('./packages/playwright-core/lib/server/utils/network.js');
console.log('Testing httpRequest function with our changes...');
const params = { url: 'REDACTED', method: 'GET', headers: { 'Accept': 'application/json' }, timeout: 5000 };
httpRequest(params, (response) => { console.log('Success! Response status:', response.statusCode); response.on('data', () => {}); response.on('end', () => { console.log('HTTP request completed successfully'); process.exit(0); }); }, (error) => { if (error.code === 'EAI_AGAIN' || error.code === 'ENOTFOUND') { console.log('DNS resolution failed (expected in this environment)'); console.log('But no "options or port or path must be specified" error - good!'); process.exit(0); } else { console.log('Error:', error.message); process.exit(1); } } );
// Give it a few seconds setTimeout(() => { console.log('No immediate error thrown - good sign!'); }, 1000); ` (dns block)
my.playwright.dev
- Triggering command:
/opt/hostedtoolcache/node/22.16.0/x64/bin/node /home/REDACTED/work/playwright/playwright/packages/playwright/lib/common/process.js(dns block)www.my.playwright.dev
- Triggering command:
/opt/hostedtoolcache/node/22.16.0/x64/bin/node /home/REDACTED/work/playwright/playwright/packages/playwright/lib/common/process.js(dns block)If you need me to access, download, or install something from one of these locations, you can either:
- Configure Actions setup steps to set up my environment, which run before the firewall is enabled
- Add the appropriate URLs or hosts to my firewall allow list
Test results for "tests 1"
41 failed :x: [chromium-library] › library/browsercontext-proxy.spec.ts:103:3 › should set cookie for top-level domain @chromium-ubuntu-22.04-node18 :x: [chromium-library] › library/client-certificates.spec.ts:175:3 › fetch › pass with trusted client certificates and when a http proxy is used @chromium-ubuntu-22.04-node18 :x: [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used @chromium-ubuntu-22.04-node18 :x: [chromium-library] › library/fetch-proxy.spec.ts:21:3 › context request should pick up proxy credentials @chromium-ubuntu-22.04-node18 :x: [chromium-library] › library/fetch-proxy.spec.ts:45:3 › global request should pick up proxy credentials @chromium-ubuntu-22.04-node18 :x: [chromium-library] › library/fetch-proxy.spec.ts:62:3 › should work with context level proxy @chromium-ubuntu-22.04-node18 :x: [chromium-library] › library/fetch-proxy.spec.ts:80:3 › should support proxy.bypass @chromium-ubuntu-22.04-node18 :x: [chromium-library] › library/browsercontext-proxy.spec.ts:103:3 › should set cookie for top-level domain @chromium-ubuntu-22.04-node20 :x: [chromium-library] › library/client-certificates.spec.ts:175:3 › fetch › pass with trusted client certificates and when a http proxy is used @chromium-ubuntu-22.04-node20 :x: [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used @chromium-ubuntu-22.04-node20 :x: [chromium-library] › library/fetch-proxy.spec.ts:21:3 › context request should pick up proxy credentials @chromium-ubuntu-22.04-node20 :x: [chromium-library] › library/fetch-proxy.spec.ts:45:3 › global request should pick up proxy credentials @chromium-ubuntu-22.04-node20 :x: [chromium-library] › library/fetch-proxy.spec.ts:62:3 › should work with context level proxy @chromium-ubuntu-22.04-node20 :x: [chromium-library] › library/fetch-proxy.spec.ts:80:3 › should support proxy.bypass @chromium-ubuntu-22.04-node20 :x: [chromium-library] › library/browsercontext-proxy.spec.ts:103:3 › should set cookie for top-level domain @chromium-ubuntu-22.04-node22 :x: [chromium-library] › library/client-certificates.spec.ts:175:3 › fetch › pass with trusted client certificates and when a http proxy is used @chromium-ubuntu-22.04-node22 :x: [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used @chromium-ubuntu-22.04-node22 :x: [chromium-library] › library/fetch-proxy.spec.ts:21:3 › context request should pick up proxy credentials @chromium-ubuntu-22.04-node22 :x: [chromium-library] › library/fetch-proxy.spec.ts:45:3 › global request should pick up proxy credentials @chromium-ubuntu-22.04-node22 :x: [chromium-library] › library/fetch-proxy.spec.ts:62:3 › should work with context level proxy @chromium-ubuntu-22.04-node22 :x: [chromium-library] › library/fetch-proxy.spec.ts:80:3 › should support proxy.bypass @chromium-ubuntu-22.04-node22 :x: [firefox-library] › library/browsercontext-proxy.spec.ts:103:3 › should set cookie for top-level domain @firefox-ubuntu-22.04-node18 :x: [firefox-library] › library/client-certificates.spec.ts:175:3 › fetch › pass with trusted client certificates and when a http proxy is used @firefox-ubuntu-22.04-node18 :x: [firefox-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used @firefox-ubuntu-22.04-node18 :x: [firefox-library] › library/fetch-proxy.spec.ts:21:3 › context request should pick up proxy credentials @firefox-ubuntu-22.04-node18 :x: [firefox-library] › library/fetch-proxy.spec.ts:45:3 › global request should pick up proxy credentials @firefox-ubuntu-22.04-node18 :x: [firefox-library] › library/fetch-proxy.spec.ts:62:3 › should work with context level proxy @firefox-ubuntu-22.04-node18 :x: [firefox-library] › library/fetch-proxy.spec.ts:80:3 › should support proxy.bypass @firefox-ubuntu-22.04-node18 :x: [chromium-library] › library/browsercontext-proxy.spec.ts:103:3 › should set cookie for top-level domain @ubuntu-22.04-chromium-tip-of-tree :x: [chromium-library] › library/client-certificates.spec.ts:175:3 › fetch › pass with trusted client certificates and when a http proxy is used @ubuntu-22.04-chromium-tip-of-tree :x: [chromium-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used @ubuntu-22.04-chromium-tip-of-tree :x: [chromium-library] › library/fetch-proxy.spec.ts:21:3 › context request should pick up proxy credentials @ubuntu-22.04-chromium-tip-of-tree :x: [chromium-library] › library/fetch-proxy.spec.ts:45:3 › global request should pick up proxy credentials @ubuntu-22.04-chromium-tip-of-tree :x: [chromium-library] › library/fetch-proxy.spec.ts:62:3 › should work with context level proxy @ubuntu-22.04-chromium-tip-of-tree :x: [chromium-library] › library/fetch-proxy.spec.ts:80:3 › should support proxy.bypass @ubuntu-22.04-chromium-tip-of-tree :x: [webkit-library] › library/client-certificates.spec.ts:175:3 › fetch › pass with trusted client certificates and when a http proxy is used @webkit-ubuntu-22.04-node18 :x: [webkit-library] › library/client-certificates.spec.ts:354:3 › browser › should pass with matching certificates and when a http proxy is used @webkit-ubuntu-22.04-node18 :x: [webkit-library] › library/fetch-proxy.spec.ts:21:3 › context request should pick up proxy credentials @webkit-ubuntu-22.04-node18 :x: [webkit-library] › library/fetch-proxy.spec.ts:45:3 › global request should pick up proxy credentials @webkit-ubuntu-22.04-node18 :x: [webkit-library] › library/fetch-proxy.spec.ts:62:3 › should work with context level proxy @webkit-ubuntu-22.04-node18 :x: [webkit-library] › library/fetch-proxy.spec.ts:80:3 › should support proxy.bypass @webkit-ubuntu-22.04-node18
13 flaky
:warning: [chromium-library] › library/chromium/tracing.spec.ts:49:3 › should run with custom categories if provided @chromium-ubuntu-22.04-node18:warning: [chromium-library] › library/chromium/tracing.spec.ts:49:3 › should run with custom categories if provided @chromium-ubuntu-22.04-node20
:warning: [firefox-library] › library/inspector/cli-codegen-3.spec.ts:667:7 › cli codegen › should consume contextmenu events, despite a custom context menu @firefox-ubuntu-22.04-node18
:warning: [firefox-page] › page/page-wait-for-function.spec.ts:104:3 › should work with strict CSP policy @firefox-ubuntu-22.04-node18
:warning: [playwright-test] › ui-mode-trace.spec.ts:397:5 › should work behind reverse proxy @macos-latest-node18-1
:warning: [playwright-test] › ui-mode-test-watch.spec.ts:145:5 › should watch all @ubuntu-latest-node18-1
:warning: [playwright-test] › ui-mode-test-watch.spec.ts:145:5 › should watch all @ubuntu-latest-node20-1
:warning: [playwright-test] › ui-mode-test-watch.spec.ts:145:5 › should watch all @ubuntu-latest-node22-1
:warning: [chromium] › headerView.spec.tsx:46:1 › should toggle filters @web-components-html-reporter
:warning: [webkit-library] › library/browsercontext-viewport-mobile.spec.ts:87:5 › mobile viewport › should support window.orientation emulation @webkit-ubuntu-22.04-node18
:warning: [webkit-library] › library/video.spec.ts:475:5 › screencast › should scale frames down to the requested size @webkit-ubuntu-22.04-node18
:warning: [webkit-page] › page/page-screenshot.spec.ts:345:5 › page screenshot › should work while navigating @webkit-ubuntu-22.04-node18
:warning: [playwright-test] › ui-mode-test-watch.spec.ts:145:5 › should watch all @windows-latest-node18-1
39400 passed, 823 skipped :heavy_check_mark::heavy_check_mark::heavy_check_mark:
Merge workflow run.
tests are still failing with "apiRequestContext.get: The "options" or "port" or "path" argument must be specified"
Fixed in commit 675dbe4. The issue was that the WHATWG URL API returns an empty string ("") for the port property when no port is specified, while HTTP libraries expect undefined. I've added || undefined conversion to handle this correctly.
[!WARNING]
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
1.non.existent.domain.for.the.test
- Triggering command:
/home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1180/chrome-linux/headless_shell --disable-field-trial-config --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=AcceptCHFrame,AutoExpandDetailsElement,AvoidUnnecessaryBeforeUnloadCheckSync,CertificateTransparencyComponentUpdater,DestroyProfileOnBrowserClose,DialMediaRouteProvider,ExtensionManifestV2Disabled,GlobalMediaControls,HttpsUpgrades,ImprovedCookieControls,LazyFrameLoading,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Translate --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-REDACTEDing --force-color-profile=srgb --metrics-recording-only --no-first-run --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --disable-search-engine-choice-screen --unsafely-disable-devtools-self-xss-warnings --enable-automation --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --user-data-dir=/tmp/playwright_chromiumdev_profile-byy0j7 --remote-debugging-pipe --no-startup-window(dns block)- Triggering command:
/home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1180/chrome-linux/headless_shell --disable-field-trial-config --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=AcceptCHFrame,AutoExpandDetailsElement,AvoidUnnecessaryBeforeUnloadCheckSync,CertificateTransparencyComponentUpdater,DestroyProfileOnBrowserClose,DialMediaRouteProvider,ExtensionManifestV2Disabled,GlobalMediaControls,HttpsUpgrades,ImprovedCookieControls,LazyFrameLoading,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Translate --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-REDACTEDing --force-color-profile=srgb --metrics-recording-only --no-first-run --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --disable-search-engine-choice-screen --unsafely-disable-devtools-self-xss-warnings --enable-automation --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --user-data-dir=/tmp/playwright_chromiumdev_profile-BJMrmH --remote-debugging-pipe --no-startup-window(dns block)127.0.0.2
- Triggering command:
/opt/hostedtoolcache/node/22.16.0/x64/bin/node /home/REDACTED/work/playwright/playwright/packages/playwright/lib/common/process.js(packet block)2.non.existent.domain.for.the.test
- Triggering command:
/home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1180/chrome-linux/headless_shell --disable-field-trial-config --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=AcceptCHFrame,AutoExpandDetailsElement,AvoidUnnecessaryBeforeUnloadCheckSync,CertificateTransparencyComponentUpdater,DestroyProfileOnBrowserClose,DialMediaRouteProvider,ExtensionManifestV2Disabled,GlobalMediaControls,HttpsUpgrades,ImprovedCookieControls,LazyFrameLoading,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Translate --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-REDACTEDing --force-color-profile=srgb --metrics-recording-only --no-first-run --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --disable-search-engine-choice-screen --unsafely-disable-devtools-self-xss-warnings --enable-automation --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --user-data-dir=/tmp/playwright_chromiumdev_profile-BJMrmH --remote-debugging-pipe --no-startup-window(dns block)concertads-configs.vox-cdn.com
- Triggering command:
/home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1180/chrome-linux/headless_shell --disable-field-trial-config --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=AcceptCHFrame,AutoExpandDetailsElement,AvoidUnnecessaryBeforeUnloadCheckSync,CertificateTransparencyComponentUpdater,DestroyProfileOnBrowserClose,DialMediaRouteProvider,ExtensionManifestV2Disabled,GlobalMediaControls,HttpsUpgrades,ImprovedCookieControls,LazyFrameLoading,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Translate --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-REDACTEDing --force-color-profile=srgb --metrics-recording-only --no-first-run --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --disable-search-engine-choice-screen --unsafely-disable-devtools-self-xss-warnings --enable-automation --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --user-data-dir=/tmp/playwright_chromiumdev_profile-Fc5WvM --remote-debugging-pipe --no-startup-window(dns block)example.com
- Triggering command: `node -e const { httpRequest } = require('./packages/playwright-core/lib/server/utils/network.js');
console.log('Testing different URL patterns...');
// Test different URL patterns
const testUrls = [
'REDACTED', // No port, no path
'REDACTED/', // No port, root path
'REDACTED/path', // No port, with path
'REDACTED:443', // Default HTTPS port
'REDACTED:8080', // Custom port
'REDACTED', // HTTP, no port
'REDACTED:80', // Default HTTP port
'REDACTED:3000', // Custom HTTP port
];
let passed = 0; let total = testUrls.length;
testUrls.forEach((url, index) => {
try {
console.log(Testing ${index + 1}/${total}: ${url});
httpRequest({ url, method: 'GET', timeout: 1000 },
(response) => {
console.log(` ✅ Success for ${url}`);
passed++;
},
(error) => {
if (error.message.includes('options') || error.message.includes('The "options" or "port" or "path"')) {
console.log(` ❌ Options error for ${url}: ${error.message}`);
} else {
console.log(` ✅ Different error for ${url} (not the bug we're fixing)`);
passed++;
}
}
);
} catch (error) {
if (error.message.includes('options') || error.message.includes('The "options" or "port" or "path"')) {
console.log( ❌ Sync options error for ${url}: ${error.message});
} else {
console.log( ✅ Different sync error for ${url} (not the bug we're fixing));
passed++;
}
}
});
setTimeout(() => {
console.log(\nResult: ${passed}/${total} tests passed (no options/port/path errors detected));
if (passed === total) {
console.log('✅ All tests passed - the fix works correctly!');
process.exit(0);
} else {
console.log('❌ Some tests failed - the options/port/path error still exists');
process.exit(1);
}
}, 2000);
` (dns block)
foo.is.the.another.test
- Triggering command:
/home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1180/chrome-linux/headless_shell --disable-field-trial-config --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=AcceptCHFrame,AutoExpandDetailsElement,AvoidUnnecessaryBeforeUnloadCheckSync,CertificateTransparencyComponentUpdater,DestroyProfileOnBrowserClose,DialMediaRouteProvider,ExtensionManifestV2Disabled,GlobalMediaControls,HttpsUpgrades,ImprovedCookieControls,LazyFrameLoading,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Translate --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-REDACTEDing --force-color-profile=srgb --metrics-recording-only --no-first-run --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --disable-search-engine-choice-screen --unsafely-disable-devtools-self-xss-warnings --enable-automation --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --user-data-dir=/tmp/playwright_chromiumdev_profile-BJMrmH --remote-debugging-pipe --no-startup-window(dns block)httpbin.org
- Triggering command: `node -e // Test the httpRequest function to ensure it doesn't throw the 'options' error const { httpRequest } = require('./packages/playwright-core/lib/server/utils/network.js');
console.log('Testing httpRequest function with fixed port handling...');
// Test with a URL that has no port (this is where the issue would occur) const params = { url: 'REDACTED', // No port specified method: 'GET', headers: { 'Accept': 'application/json' }, timeout: 5000 };
console.log('Making request to:', params.url);
httpRequest(params, (response) => { console.log('✅ Success! Response status:', response.statusCode); response.on('data', () => {}); response.on('end', () => { console.log('✅ HTTP request completed successfully'); process.exit(0); }); }, (error) => { if (error.code === 'EAI_AGAIN' || error.code === 'ENOTFOUND') { console.log('✅ DNS resolution failed (expected in this environment)'); console.log('✅ But no "options or port or path must be specified" error - this is good!'); process.exit(0); } else if (error.message.includes('options') || error.message.includes('port') || error.message.includes('path')) { console.log('❌ Found the options/port/path error:', error.message); process.exit(1); } else { console.log('✅ Different error (not the options issue):', error.message); process.exit(0); } } );
// Give it a few seconds before timing out setTimeout(() => { console.log('✅ No immediate error thrown - good sign!'); }, 1000); ` (dns block)
my.playwright.dev
- Triggering command:
/opt/hostedtoolcache/node/22.16.0/x64/bin/node /home/REDACTED/work/playwright/playwright/packages/playwright/lib/common/process.js(dns block)www.my.playwright.dev
- Triggering command:
/opt/hostedtoolcache/node/22.16.0/x64/bin/node /home/REDACTED/work/playwright/playwright/packages/playwright/lib/common/process.js(dns block)If you need me to access, download, or install something from one of these locations, you can either:
- Configure Actions setup steps to set up my environment, which run before the firewall is enabled
- Add the appropriate URLs or hosts to my firewall allow list
Test results for "tests 1"
1 failed :x: [playwright-test] › runner.spec.ts:118:5 › should ignore subprocess creation error because of SIGINT @macos-latest-node18-1
5 flaky
:warning: [firefox-library] › library/inspector/cli-codegen-1.spec.ts:986:7 › cli codegen › should not throw csp directive violation errors @firefox-ubuntu-22.04-node18:warning: [firefox-page] › page/page-wait-for-function.spec.ts:104:3 › should work with strict CSP policy @firefox-ubuntu-22.04-node18
:warning: [playwright-test] › ui-mode-test-watch.spec.ts:145:5 › should watch all @ubuntu-latest-node18-1
:warning: [webkit-page] › page/elementhandle-bounding-box.spec.ts:22:3 › should work @webkit-ubuntu-22.04-node18
:warning: [playwright-test] › ui-mode-test-watch.spec.ts:145:5 › should watch all @windows-latest-node18-1
39454 passed, 823 skipped :heavy_check_mark::heavy_check_mark::heavy_check_mark:
Merge workflow run.
Test results for "tests 1"
8 flaky
:warning: [chromium-library] › library/popup.spec.ts:258:3 › should not throw when click closes popup @chromium-ubuntu-22.04-node20:warning: [firefox-library] › library/inspector/cli-codegen-1.spec.ts:986:7 › cli codegen › should not throw csp directive violation errors @firefox-ubuntu-22.04-node18
:warning: [firefox-page] › page/page-wait-for-function.spec.ts:104:3 › should work with strict CSP policy @firefox-ubuntu-22.04-node18
:warning: [playwright-test] › ui-mode-test-watch.spec.ts:145:5 › should watch all @ubuntu-latest-node18-1
:warning: [playwright-test] › ui-mode-test-watch.spec.ts:145:5 › should watch all @ubuntu-latest-node20-1
:warning: [playwright-test] › ui-mode-test-watch.spec.ts:145:5 › should watch all @ubuntu-latest-node22-1
:warning: [webkit-page] › page/page-screenshot.spec.ts:345:5 › page screenshot › should work while navigating @webkit-ubuntu-22.04-node18
:warning: [playwright-test] › ui-mode-test-watch.spec.ts:145:5 › should watch all @windows-latest-node18-1
39452 passed, 823 skipped :heavy_check_mark::heavy_check_mark::heavy_check_mark:
Merge workflow run.
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
I tried to connect to the following addresses, but was blocked by firewall rules:
1.non.existent.domain.for.the.test
- Triggering command:
/home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1180/chrome-linux/headless_shell --disable-field-trial-config --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=AcceptCHFrame,AutoExpandDetailsElement,AvoidUnnecessaryBeforeUnloadCheckSync,CertificateTransparencyComponentUpdater,DestroyProfileOnBrowserClose,DialMediaRouteProvider,ExtensionManifestV2Disabled,GlobalMediaControls,HttpsUpgrades,ImprovedCookieControls,LazyFrameLoading,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Translate --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-REDACTEDing --force-color-profile=srgb --metrics-recording-only --no-first-run --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --disable-search-engine-choice-screen --unsafely-disable-devtools-self-xss-warnings --enable-automation --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --user-data-dir=/tmp/playwright_chromiumdev_profile-Pd0BvF --remote-debugging-pipe --no-startup-window(dns block)- Triggering command:
/home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1180/chrome-linux/headless_shell --disable-field-trial-config --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=AcceptCHFrame,AutoExpandDetailsElement,AvoidUnnecessaryBeforeUnloadCheckSync,CertificateTransparencyComponentUpdater,DestroyProfileOnBrowserClose,DialMediaRouteProvider,ExtensionManifestV2Disabled,GlobalMediaControls,HttpsUpgrades,ImprovedCookieControls,LazyFrameLoading,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Translate --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-REDACTEDing --force-color-profile=srgb --metrics-recording-only --no-first-run --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --disable-search-engine-choice-screen --unsafely-disable-devtools-self-xss-warnings --enable-automation --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --user-data-dir=/tmp/playwright_chromiumdev_profile-JnMb0h --remote-debugging-pipe --no-startup-window(dns block)- Triggering command:
/opt/hostedtoolcache/node/22.16.0/x64/bin/node /home/REDACTED/work/playwright/playwright/packages/playwright/lib/common/process.js(dns block)2.non.existent.domain.for.the.test
- Triggering command:
/home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1180/chrome-linux/headless_shell --disable-field-trial-config --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=AcceptCHFrame,AutoExpandDetailsElement,AvoidUnnecessaryBeforeUnloadCheckSync,CertificateTransparencyComponentUpdater,DestroyProfileOnBrowserClose,DialMediaRouteProvider,ExtensionManifestV2Disabled,GlobalMediaControls,HttpsUpgrades,ImprovedCookieControls,LazyFrameLoading,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Translate --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-REDACTEDing --force-color-profile=srgb --metrics-recording-only --no-first-run --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --disable-search-engine-choice-screen --unsafely-disable-devtools-self-xss-warnings --enable-automation --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --user-data-dir=/tmp/playwright_chromiumdev_profile-JnMb0h --remote-debugging-pipe --no-startup-window(dns block)- Triggering command:
/opt/hostedtoolcache/node/22.16.0/x64/bin/node /home/REDACTED/work/playwright/playwright/packages/playwright/lib/common/process.js(dns block)- Triggering command:
/home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1180/chrome-linux/headless_shell --disable-field-trial-config --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=AcceptCHFrame,AutoExpandDetailsElement,AvoidUnnecessaryBeforeUnloadCheckSync,CertificateTransparencyComponentUpdater,DestroyProfileOnBrowserClose,DialMediaRouteProvider,ExtensionManifestV2Disabled,GlobalMediaControls,HttpsUpgrades,ImprovedCookieControls,LazyFrameLoading,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Translate --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-REDACTEDing --force-color-profile=srgb --metrics-recording-only --no-first-run --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --disable-search-engine-choice-screen --unsafely-disable-devtools-self-xss-warnings --enable-automation --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --proxy-server=http://localhost:8927 --proxy-bypass-list=1.non.existent.domain.for.the.test;2.non.existent.domain.for.the.test;*.another.test;<-loopback> --user-data-dir=/tmp/playwright_chromiumdev_profile-ookvbx --remote-debugging-pipe --no-startup-window(dns block)example.com
- Triggering command: `node -e const { httpRequest } = require('./packages/playwright-core/lib/server/utils/network.js');
console.log('Testing httpRequest function with our fixed clashing hostname issue...');
// Test making a request (this will fail due to network restrictions, but should not throw the options error) const params = { url: 'REDACTED', method: 'GET', headers: { 'Accept': 'application/json' }, timeout: 1000 };
try { httpRequest(params, (response) => { console.log('✅ Success! Response status:', response.statusCode); process.exit(0); }, (error) => { if (error.message.includes('options') || error.message.includes('port') || error.message.includes('path')) { console.log('❌ Found the options/port/path error:', error.message); process.exit(1); } else { console.log('✅ Different error (not the options issue):', error.message); console.log('✅ This means our fix is working correctly!'); process.exit(0); } } );
console.log('✅ No immediate error thrown - good sign!'); } catch (error) { if (error.message.includes('options') || error.message.includes('port') || error.message.includes('path')) { console.log('❌ Sync options error:', error.message); process.exit(1); } else { console.log('✅ Different sync error (not the options issue):', error.message); console.log('✅ This means our fix is working correctly!'); process.exit(0); } }
setTimeout(() => { console.log('✅ Test completed - no options/port/path errors detected'); process.exit(0); }, 2000); ` (dns block)
foo.is.the.another.test
- Triggering command:
/home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1180/chrome-linux/headless_shell --disable-field-trial-config --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=AcceptCHFrame,AutoExpandDetailsElement,AvoidUnnecessaryBeforeUnloadCheckSync,CertificateTransparencyComponentUpdater,DestroyProfileOnBrowserClose,DialMediaRouteProvider,ExtensionManifestV2Disabled,GlobalMediaControls,HttpsUpgrades,ImprovedCookieControls,LazyFrameLoading,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Translate --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-REDACTEDing --force-color-profile=srgb --metrics-recording-only --no-first-run --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --disable-search-engine-choice-screen --unsafely-disable-devtools-self-xss-warnings --enable-automation --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --user-data-dir=/tmp/playwright_chromiumdev_profile-JnMb0h --remote-debugging-pipe --no-startup-window(dns block)- Triggering command:
/opt/hostedtoolcache/node/22.16.0/x64/bin/node /home/REDACTED/work/playwright/playwright/packages/playwright/lib/common/process.js(dns block)- Triggering command:
/home/REDACTED/.cache/ms-playwright/chromium_headless_shell-1180/chrome-linux/headless_shell --disable-field-trial-config --disable-REDACTED-networking --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=AcceptCHFrame,AutoExpandDetailsElement,AvoidUnnecessaryBeforeUnloadCheckSync,CertificateTransparencyComponentUpdater,DestroyProfileOnBrowserClose,DialMediaRouteProvider,ExtensionManifestV2Disabled,GlobalMediaControls,HttpsUpgrades,ImprovedCookieControls,LazyFrameLoading,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Translate --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-REDACTEDing --force-color-profile=srgb --metrics-recording-only --no-first-run --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --disable-search-engine-choice-screen --unsafely-disable-devtools-self-xss-warnings --enable-automation --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --proxy-server=http://localhost:8927 --proxy-bypass-list=1.non.existent.domain.for.the.test;2.non.existent.domain.for.the.test;*.another.test;<-loopback> --user-data-dir=/tmp/playwright_chromiumdev_profile-ookvbx --remote-debugging-pipe --no-startup-window(dns block)If you need me to access, download, or install something from one of these locations, you can either:
- Configure Actions setup steps to set up my environment, which run before the firewall is enabled
- Add the appropriate URLs or hosts to my firewall allow list
Test results for "tests 1"
7 flaky
:warning: [chromium-library] › library/inspector/cli-codegen-pick-locator.spec.ts:35:7 › should update locator highlight @chromium-ubuntu-22.04-node20:warning: [firefox-library] › library/inspector/cli-codegen-1.spec.ts:986:7 › cli codegen › should not throw csp directive violation errors @firefox-ubuntu-22.04-node18
:warning: [playwright-test] › ui-mode-test-watch.spec.ts:145:5 › should watch all @ubuntu-latest-node18-1
:warning: [webkit-library] › library/browsercontext-viewport-mobile.spec.ts:87:5 › mobile viewport › should support window.orientation emulation @webkit-ubuntu-22.04-node18
:warning: [webkit-library] › library/browsercontext-viewport-mobile.spec.ts:206:5 › mobile viewport › view scale should reset after navigation @webkit-ubuntu-22.04-node18
:warning: [webkit-page] › page/page-screenshot.spec.ts:345:5 › page screenshot › should work while navigating @webkit-ubuntu-22.04-node18
:warning: [playwright-test] › ui-mode-test-watch.spec.ts:145:5 › should watch all @windows-latest-node18-1
39453 passed, 823 skipped :heavy_check_mark::heavy_check_mark::heavy_check_mark:
Merge workflow run.