microsoft / playwright

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
https://playwright.dev
Apache License 2.0
67.34k stars 3.71k forks source link

Recording HAR via CLI and CTRL + C does end up in stack trace #15080

Closed mxschmitt closed 2 years ago

mxschmitt commented 2 years ago
➜  playwright git:(release-1.23) ✗ npx playwright open --save-har=sinusbot.zip https://bot.badgaming.de 
^C/Users/max/development/playwright/packages/playwright-core/lib/client/connection.js:252
    if (!parent) throw new Error(`Cannot find parent object ${parentGuid} to create ${guid}`);
                 ^

Error: Cannot find parent object browser-context@0abdede4f50efefc2164f6bda441dc0d to create artifact@cd5da0d01fa7fbb18421c93e1e3cc7e0
    at Connection._createRemoteObject (/Users/max/development/playwright/packages/playwright-core/src/client/connection.ts:187:13)
    at Connection.dispatch (/Users/max/development/playwright/packages/playwright-core/src/client/connection.ts:144:12)
    at Immediate.<anonymous> (/Users/max/development/playwright/packages/playwright-core/src/inProcessFactory.ts:42:83)
    at processImmediate (node:internal/timers:466:21)

Repro:

  1. npx playwright open --save-har=sinusbot.zip https://bot.badgaming.de
  2. do something
  3. CTRL + C

Expected: HAR Actual: no HAR

aslushnikov commented 2 years ago

(discussed on a meeting, not a blocker)