-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Description
Version
1.44
Steps to reproduce
I'm using Azure DevOps Server with self-hosted agents (Windows). I am running many pipelines throughout the night and part of that is running Playwright tests (.NET and MSTest).
Each agent installs the browsers to an agent-specific directory using the PLAYWRIGHT_BROWSERS_PATH
environment variable. This way each agent has its own copy of the browsers and everything is nicely isolated.
The issue is that while the browsers are eventually installed to PLAYWRIGHT_BROWSERS_PATH
, they are downloaded to C:\Users\username\AppData\Local\Temp
. While I have multiple agents, several of them are running on the same machine as the same user. This means that if agent 1 and agent 2 are running at roughly the same time, they will both try to download the browsers to the same location and will end up clobbering each other.
Expected behavior
The PLAYWRIGHT_BROWSERS_PATH
keeps the browsers completely isolated, including the download.
Actual behavior
The agent will begin to download the browsers but it won't be long before you see this error.
[Error: ENOENT: no such file or directory, open 'C:\Users\[REDACTED]\AppData\Local\Temp\playwright-download-firefox-win64-1449.zip'] {
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path: 'C:\\Users\\[REDACTED]\\AppData\\Local\\Temp\\playwright-download-firefox-win64-1449.zip'
}
Additional context
No response
Environment
- Operating System: Windows Server 2022 21H2 (OS Build 20348.2655)
- Browser: All
- .NET Version (TFM): net8.0
- Other info: Azure DevOps Server 2022