Skip to content

Commit

Permalink
fix(screencast): dont throw from frameAck if target is closed (#3702)
Browse files Browse the repository at this point in the history
  • Loading branch information
yury-s authored Sep 1, 2020
1 parent 1877c29 commit db9b8a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/server/chromium/crPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,8 @@ class FrameSession {
return;
const buffer = Buffer.from(payload.data, 'base64');
this._videoRecorder.writeFrame(buffer, payload.metadata.timestamp!);
this._client.send('Page.screencastFrameAck', {sessionId: payload.sessionId});
// The target may be closed before receiving the ack.
this._client.send('Page.screencastFrameAck', {sessionId: payload.sessionId}).catch(() => {});
}

async _startScreencast(screencastId: string, options: types.PageScreencastOptions): Promise<void> {
Expand Down
3 changes: 1 addition & 2 deletions test/screencast.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,7 @@ describe('screencast', suite => {

it('should capture navigation', test => {
test.flaky(options.CHROMIUM && MAC);
test.flaky(options.FIREFOX && LINUX && !options.HEADLESS);
test.flaky(options.FIREFOX && WIN);
test.flaky(options.FIREFOX);
test.flaky(options.WEBKIT);
}, async ({page, tmpDir, server, videoPlayer, toImpl}) => {
const videoFile = path.join(tmpDir, 'v.webm');
Expand Down

0 comments on commit db9b8a0

Please sign in to comment.