This issue has been created
There are 8 updates, 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-0d41ece5-078b-485d-8c19-42e79e65ecbc XWIKI-23187 Open

PDF export can hang indefinitely if the headless Chrome crashes or is stopped

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-6981cb79-f91d-4988-b3be-d79993a667b8 Marius Dumitru Florea created this issue on 07/May/25 13:56
 
Summary: PDF export can hang indefinitely if the headless Chrome crashes or is stopped
Issue Type: cid:jira-generated-image-avatar-0d41ece5-078b-485d-8c19-42e79e65ecbc Bug
Affects Versions: 15.10.16
Assignee: Unassigned
Components: Export - PDF
Created: 07/May/25 13:56
Priority: cid:jira-generated-image-static-major-91b5b881-4a09-4717-a50f-5137ad49e578 Major
Reporter: Marius Dumitru Florea
Description:

Follow these steps to reproduce:

  • Create a wiki page with some simple test content
  • Add a JSX object to this page, with this content:
    require(['xwiki-page-ready'], function(pageReady) {
      pageReady.delayPageReady(new Promise((resolve, reject) => {
        // Delay the page ready with 55 seconds.
        setTimeout(resolve, 55 * 1000);
      }), 'simulate long PDF export');
    });
    
  • Configure the JSX with:
    • Use on this page or on demand
    • No parsing
  • Make sure PDF export is configured to use the headless Chrome Docker container; keep the default 60 seconds page ready timeout
  • Export the page to PDF
  • While the PDF export is running (in fact it is waiting for the page to be ready before printing to PDF) stop the headless Chrome Docker container

Expected: the PDF export should fail, at most after the 60 seconds page ready timeout.
Actual: the PDF export keeps running beyond those 60 seconds. In fact, it will keep waiting for the page to be ready until you restart XWiki or use some script to kill the background thread used by the PDF export job.

 
 

8 updates

 
cid:jira-generated-image-avatar-6981cb79-f91d-4988-b3be-d79993a667b8 Changes by Marius Dumitru Florea on 07/May/25 13:56
 
Fix Version: 16.10.7
Fix Version: 17.4.0-rc-1
Development Priority: High
Difficulty: Unknown Medium
Documentation: N/A
Documentation in Release Notes: N/A
Assignee: Marius Dumitru Florea
Priority: Major Critical
 
 

1 comment

 
cid:jira-generated-image-avatar-6981cb79-f91d-4988-b3be-d79993a667b8 Marius Dumitru Florea on 07/May/25 14:01
 

For those that can't upgrade right away to have the fix, a simple workaround is to restart XWiki with the following system property set:

export XWIKI_OPTS="-Dcom.github.kklisura.cdt.services.config.readTimeout=60"
./start_xwiki.sh

Use the same value as the configured page ready timeout, since both are expressed in seconds.