( error: unknown, options: RenderOptions, startTime: number, docker: boolean, hint: string, failedStage?: string, job?: RenderJob, )
| 1562 | } |
| 1563 | |
| 1564 | function handleRenderError( |
| 1565 | error: unknown, |
| 1566 | options: RenderOptions, |
| 1567 | startTime: number, |
| 1568 | docker: boolean, |
| 1569 | hint: string, |
| 1570 | failedStage?: string, |
| 1571 | job?: RenderJob, |
| 1572 | ): never { |
| 1573 | const message = normalizeErrorMessage(error); |
| 1574 | trackRenderError({ |
| 1575 | fps: fpsToNumber(options.fps), |
| 1576 | quality: options.quality, |
| 1577 | docker, |
| 1578 | workers: options.workers, |
| 1579 | gpu: options.gpu, |
| 1580 | authoringSkill: options.authoringSkill, |
| 1581 | elapsedMs: Date.now() - startTime, |
| 1582 | errorMessage: message, |
| 1583 | failedStage, |
| 1584 | ...renderJobObservabilityTelemetryPayload(job), |
| 1585 | ...getMemorySnapshot(), |
| 1586 | }); |
| 1587 | if (options.throwOnError) { |
| 1588 | throw new Error(message); |
| 1589 | } |
| 1590 | // A `Failed to launch the browser process` / `libnss3.so cannot open ...` |
| 1591 | // failure on Linux/WSL is an environment problem, not a composition bug. |
| 1592 | // Replace the generic "Try --docker" hint with the exact per-distro |
| 1593 | // remediation and a pointer at `doctor`. |
| 1594 | const remediation = chromeLaunchRemediation(message); |
| 1595 | if (remediation) { |
| 1596 | errorBox("Render failed — Chrome could not launch", message, remediation); |
| 1597 | process.exit(1); |
| 1598 | } |
| 1599 | errorBox("Render failed", message, hint); |
| 1600 | process.exit(1); |
| 1601 | } |
| 1602 | |
| 1603 | /** |
| 1604 | * Extract rich metrics from the completed render job and send to telemetry. |
no test coverage detected