Skip to content

chore: bump server/shared for PDF generation reliability fix - #258

Closed
buzz-code wants to merge 1 commit into
mainfrom
chore/bump-server-shared-pdf-fix
Closed

buzz-code wants to merge 1 commit into
mainfrom
chore/bump-server-shared-pdf-fix

Conversation

@buzz-code

@buzz-code buzz-code commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

Bumps server/shared to 0619f38 (nra-server PR #89).

Why

Incident 500 on GET /student/report (bulk studentReportCardReact PDF):

TimeoutError: waiting for Page.printToPDF failed: timeout 30000ms exceeded
    at ReactToPdfReportGenerator.convertMarkupToPdf (markup-to-pdf.generator.js:32:36)

Report markup embeds external Google Fonts <link> stylesheets; when the container's network access hangs, those requests never settle and Page.printToPDF stalls until puppeteer's 30s default timeout kills the request.

What the bump brings

  • Fallback PDF render aborts external http(s) requests, so printing can no longer wait on the network (fonts fall back to the locally installed ones in the container).
  • Transient browser-death errors (Session closed/Target closed) retry once with a fresh browser.
  • Optional PDF_PRINT_TIMEOUT_MS env var to raise the print timeout (default unchanged, 30000 ms). No config change required.

Fixes buzz-code/ops#43

- Stop stuck external requests (Google Fonts links) from hanging
  Page.printToPDF and 500-ing bulk student report PDFs (incident:
  TimeoutError waiting for Page.printToPDF, 30000ms).
- Retry once with a fresh browser on transient browser crashes.
- Optional PDF_PRINT_TIMEOUT_MS env var to raise the print timeout.

Fix: buzz-code/nra-server#89
@buzz-code

Copy link
Copy Markdown
Owner Author

Closing: the nra-server fix (#89) is now merged into main, so this pointer to a branch-only commit (0619f38) is obsolete. A single submodule bump PR pointing at the merge commit will follow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant