Skip to content

[REGRESSION]: Version 1.40.0 Produces corrupted traces  #28319

@maxsudik

Description

@maxsudik

Context:

  • GOOD Playwright Version: [1.37.1]
  • BAD Playwright Version: [1.40.0]
  • Operating System: [Windows/Mac]
  • Node: [18.16.0/20.4.0]

Steps to reproduce:

  1. Create new playwright project https://playwright.dev/docs/intro
  2. Update to the latest:
    npm install -D @playwright/test@latest
    npx playwright install
    npm install
  3. make sure you have these
“devDependencies”: {
    “@playwright/test”: “^1.40.0”,
    “@types/node”: “^20.9.4”
  }

in package.json
5. Enable trace: "on" in playwright.config.ts in the export default defineConfig({use:}) section
6. Run the below test

import { test } from "@playwright/test";
import * as fs from "fs";

test("Test Trace", async ({ browser }) => {
    const auth = "storages/storageState.json";
    if (!fs.existsSync(auth)) {
        fs.writeFileSync(auth, "{}");
    }
    const context = await browser.newContext({ storageState: auth });
    const page = await context.newPage();
    await page.goto("https://demo.playwright.dev/todomvc");
    await page.context().storageState({ path: auth });
});
  1. Run npx playwright show-report and check the attached trace in the report
  2. Verify the traces are displayed and functional. Note: if the trace works on the first attempt - try to reload the page

Expected result: Traces should be visible and functional.
Actual result: Traces are corrupted. Error is displayed: "Could not load trace from http://localhost:9323/data/6a329ada265b653d117eeb16a2ba7b231cc78086.zip. Make sure a valid Playwright Trace is accessible over this url."

image

corruptedTrace.zip

Other details:
When comment out this line:

await page.context().storageState({ path: auth });

the traces is generated as expected.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions