-
Notifications
You must be signed in to change notification settings - Fork 10
Description
π Describe the bug
When viewing test run results in the Azure portal (Playwright Workspaces reporting), screenshot images fail to render (broken image icons), while trace thumbnails render correctly. The root cause is that the SAS token query parameters are being appended twice to the screenshot image URLs, causing Azure Storage to reject the request with an AuthenticationFailed error.
β Expected behavior
Screenshot images should render inline in the test run report.
π To reproduce
- Configure a Playwright Workspace with reporting enabled and a linked storage account
- Configure playwright.service.config.ts with the HTML and Azure reporters:
reporter: [
["html", { open: "never" }],
["@azure/playwright/reporter"],
]
- Configure playwright.config.ts with screenshot capture:
use: {
trace: 'on-first-retry',
video: 'retain-on-failure',
screenshot: 'on'
}
- Run tests that produce screenshots using Entra ID authentication
- Open the test run in the Azure portal β Test runs page
- Observe the Screenshots section
πΈ Screenshots (if applicable)
Add any relevant screenshots or logs to help explain your problem.
π§© Setup information
Please provide the following details to help us investigate:
Example of the broken URL:
https://<storageaccount>.blob.core.windows.net/<container>/<run-id>/data/<hash>.png
?sv=2020-12-06&st=...&se=...&sr=c&sp=rl&spr=https&skoid=...&sktid=...&skt=...&ske=...&sks=b&skv=2020-12-06&sig=...
&sv=2020-12-06&st=...&se=...&sr=c&sp=rl&spr=https&skoid=...&sktid=...&skt=...&ske=...&sks=b&skv=2020-12-06&sig=...
Note: the second &sv=2020-12-06 and all subsequent parameters are exact duplicates of the first set.
Error returned by Azure Storage
<Code>AuthenticationFailed</Code>
<Message>Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.</Message>
<AuthenticationErrorDetail>sv is either not in the correct format or is not equal or later than version 2012-02-12</AuthenticationErrorDetail>
ποΈ Additional context
Add any other context or details that might help us reproduce or diagnose the issue.