lost-pixel / lost-pixel

Open source alternative to Percy, Chromatic, Applitools.

Home Page:https://lost-pixel.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Process stops if recorded video can't be deleted

chriskalmar opened this issue · comments

Bug description

Process ends suddenly if recorded video can't be deleted.
This happens only if video recording is enabled.
The browser context might be not available anymore, thus causing CI pipeline to fail.

A possible solution would be a try/catch block around:

await page.video()?.saveAs(newVideoPath);
await page.video()?.delete();

How to reproduce

Expected behavior

No response

Lost Pixel information

Configuration prop used in lostpixel.confg.ts to enable video recordings:

   configureBrowser: () => ({
      recordVideo: {
        dir: 'tmp/videos',
        size: {
          width: 1280,
          height: 900,
        },
      },
    }
  }),

lost-pixel logs from CI

video.delete: Target page, context or browser has been closed