playwright icon indicating copy to clipboard operation
playwright copied to clipboard

[BUG] Test suite sometimes leaves a loopback proxy enabled (machine-wide) breaking network access

Open dmachaj opened this issue 2 years ago • 1 comments

System info

  • Playwright Version: "@axe-core/playwright": "^4.7.3", "@playwright/test": "^1.40.1",
  • Operating System: Windows 11
  • Browser: Edge 121
  • Other info:

Source code

Unfortunately I do not have a self-contained set of source code. I've only seen this when running a large internal test suite that I cannot share publicly.

Steps I strongly suspect, but cannot confirm, that the problem occurs when the test suite is interrupted without letting it finish. The test suite in question sometimes causes my device to become unresponsive so I have to hold the power button to reboot the device. After reboot the proxy is in place and network access is broken.

Expected Canceling tests does not break network on my device.

Actual Any network access that respects the machine-wide proxy settings is broken. This includes OneDrive, Outlook, Teams, and Edge. Some things don't seem to use the proxy (remote desktop) so the device can still be reached at least partially.

When the issue strikes going into Windows Settings -> Network & Internet -> Proxy is where it can be repaired. The problem has a manual proxy setup with the proxy IP address being loopback. As soon as I disable the manual proxy my network access is restored.

dmachaj avatar Jan 30 '24 18:01 dmachaj

Playwright does not adjust any machine-wide settings, so it is unlikely that the problem is with Playwright. I would hope we don't even have enough privileges to do something like this. Otherwise any non-privileged user process (Playwright) would be able to hijack entire OS network, which does not sound great for the OS.

pavelfeldman avatar Jan 30 '24 20:01 pavelfeldman

Closing as non-actionable due to the lack of repro. Please open a new bug if you manage to create a repro we can use.

pavelfeldman avatar Feb 02 '24 20:02 pavelfeldman