Export to PDF Error on Large Task Timelines
search cancel

Export to PDF Error on Large Task Timelines

book

Article ID: 451489

calendar_today

Updated On:

Products

Clarity FedRAMP Clarity PPM On Premise Clarity PPM SaaS

Issue/Introduction

When exporting a Task Timeline view containing more than 2,000 tasks to PDF in the Modern UX (MUX), the export process fails or causes system instability due to high memory consumption by the Playwright process.

Steps to Reproduce (STR)

  1. Log in to Clarity Modern UX (MUX).
  2. Open a project containing 2,000+ tasks.
  3. Navigate to the Timeline view.
  4. Click Actions $\rightarrow$ Export to PDF.

Expected Result: The PDF preview generates successfully, allowing users to preview and download the document.

Actual Result: The preview fails, errors out, or crashes the host process with below error stack

Playwright error during export to PDF:
com.microsoft.playwright.impl.TargetClosedError: Error {
  message='Target page, context or browser has been closed
  name='TargetClosedError
  stack='TargetClosedError: Target page, context or browser has been closed
Error
  at captureRawStack (/opt/ppm/tomcat-app-deploy/temp/playwright-java-9852647741401550975/package/lib/utils/stackTrace.js:49:17)
  at LongStandingScope._race (/opt/ppm/tomcat-app-deploy/temp/playwright-java-9852647741401550975/package/lib/utils/manualPromise.js:91:52)
  at LongStandingScope.race (/opt/ppm/tomcat-app-deploy/temp/playwright-java-9852647741401550975/package/lib/utils/manualPromise.js:84:17)
  at PageDispatcher._handleCommand (/opt/ppm/tomcat-app-deploy/temp/playwright-java-9852647741401550975/package/lib/server/dispatchers/dispatcher.js:96:36)
  at DispatcherConnection.dispatch (/opt/ppm/tomcat-app-deploy/temp/playwright-java-9852647741401550975/package/lib/server/dispatchers/dispatcher.js:361:39)
}
Call log:
taking page screenshot
waiting for fonts to load...

Environment

Clarity 16.4.1, 16.4.2

Cause

DE184006

The issue is driven by system memory exhaustion:

  • Exporting a large Timeline view (2,000+ tasks) causes the underlying Playwright Chromium process to consume between 2.7 GB and 3.2 GB of memory.
  • In containerized environments (such as SaaS), the remaining available host memory after JVM heap allocation is typically restricted to 2 – 4 GB.
  • When Playwright attempts to render and capture the full DOM/fonts of a massive timeline, memory limits are exceeded, forcing the process or container to terminate.

Resolution

Fixed in

  • Clarity 16.4.3

Workaround: Reduce display screen resolution prior to exporting. Using a standard HD Display (1920px width or lower) reduces render overhead and allows the export to complete or partially succeed in some scenarios.

Additional Information

Symptoms & Behaviors: Depending on available system memory at the time of export, one of three scenarios occurs:

  1. Incomplete Preview: The PDF preview fails to display completely, though the PDF download remains accessible.
  2. Export Failure (Target Closed): Both the preview and download fail, returning a Playwright TargetClosedError.
  3. Application VM Crash: Severe memory exhaustion causes the entire application Virtual Machine (VM) to crash.