Skip to content

Commit 3ec057b

Browse files
committed
fix(engine): a truth page that cannot open falls back to the render page
1 parent 9e6cb7d commit 3ec057b

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

‎packages/engine/src/services/frameCapture.ts‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5164,8 +5164,14 @@ async function captureDeVerificationFrames(
51645164
const fractions = computeDeVerifySampleFractions(k);
51655165
// A video-free comp reads its truth on a disposable page: callbacks that run there
51665166
// cannot leave the render's own page changed. The video injector is tied to the render page.
5167-
const isolated = !session.onBeforeCapture;
5168-
const truthPage = isolated ? await createStaticVerificationPage(session) : page;
5167+
const disposable = session.onBeforeCapture
5168+
? null
5169+
: await createStaticVerificationPage(session).catch(() => {
5170+
logInitPhase("self-verify truth page unavailable; reading it on the render page");
5171+
return null;
5172+
});
5173+
const isolated = disposable !== null;
5174+
const truthPage = disposable ?? page;
51695175
const seekTo = (t: number): Promise<void> => seekDeVerifyTruth(truthPage, t, !isolated);
51705176
const frames = new Map<number, Buffer>();
51715177
try {

0 commit comments

Comments
 (0)