mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-10-30 17:27:09 +00:00
fix(engine): retry capture screenshot timeouts (#3641)
This commit is contained in:
@@ -6,6 +6,10 @@ describe("classifyCaptureFailure", () => {
|
||||
["Target closed", "transient_browser"],
|
||||
["Runtime.callFunctionOn timed out after 30000ms", "protocol_timeout"],
|
||||
["Runtime.evaluate timed out", "protocol_timeout"],
|
||||
[
|
||||
"Page.captureScreenshot timed out. Increase the 'protocolTimeout' setting in launch/connect calls for a higher timeout if needed.",
|
||||
"protocol_timeout",
|
||||
],
|
||||
["drawElement worker encode timed out (frame 42)", "protocol_timeout"],
|
||||
["Waiting failed: 30000ms exceeded", "protocol_timeout"],
|
||||
["JavaScript heap out of memory", "memory_exhaustion"],
|
||||
|
||||
@@ -57,6 +57,7 @@ const TRANSIENT_BROWSER_ERROR_PATTERNS = [
|
||||
const PROTOCOL_TIMEOUT_PATTERNS = [
|
||||
/Runtime\.callFunctionOn timed out/i,
|
||||
/Runtime\.evaluate timed out/i,
|
||||
/Page\.captureScreenshot timed out/i,
|
||||
/HeadlessExperimental\.beginFrame timed out/i,
|
||||
/drawElement worker encode timed out \(frame \d+\)/i,
|
||||
/Protocol error[\s\S]*tim(?:ed|e) out/i,
|
||||
|
||||
@@ -1523,6 +1523,13 @@ describe("adaptive missing-frame retry helpers", () => {
|
||||
new Error("[Parallel] Capture failed: Worker 1: HeadlessExperimental.beginFrame timed out"),
|
||||
),
|
||||
).toBe(true);
|
||||
expect(
|
||||
isRecoverableParallelCaptureError(
|
||||
new Error(
|
||||
"[Parallel] Capture failed: Worker 2: Page.captureScreenshot timed out. Increase the 'protocolTimeout' setting in launch/connect calls for a higher timeout if needed.",
|
||||
),
|
||||
),
|
||||
).toBe(true);
|
||||
expect(
|
||||
isRecoverableParallelCaptureError(
|
||||
new Error(
|
||||
|
||||
Reference in New Issue
Block a user