PDF not generating

Inspector tomorrow, report empty

POST /v1/reports returned 200 but the PDF is blank, or the dashboard's "Download report" button produces a file you cannot open. The five common causes, in descending order of probability:

1 · Wrong date range

The most common cause: the requested period contains no measurements. This happens when:

  • The site was created on day N and the report is for day N − 7.
  • The device on which the report is based was not yet provisioned.
  • The site's timezone is set to UTC and the user asked for a "yesterday" report in their local timezone that has not started yet in UTC.

The dashboard refuses to issue a report with no measurements with a modal warning. The API returns the report anyway — empty — because we have inadvertently broken automation in the past by being too clever about this. The header pages render; the data pages are empty.

Fix: widen the date range and re-issue.

2 · Wrong timezone

PDF reports render in the site's timezone, not the caller's timezone. A site in Europe/Bratislava will render 2026-05-17 00:00 → 2026-05-17 24:00 local time, regardless of the caller's IP.

If the day boundaries are wrong, edit the site's timezone in Site → Settings → Timezone. Existing reports do not retro-fix; you have to re-issue.

3 · Missing devices in the period

If the report template is HACCP and the site has three devices, but only two have data in the period, the report by default shows the third device as "OFFLINE — no data" rather than omitting it. An inspector wants to see the third device exists and was supposed to report.

If you removed a device during the period, the report shows the old device with a "REMOVED" stripe through it.

This is correct behaviour; not a bug. If you want a clean report, remove the device before the period starts.

4 · PDF service down

The PDF rendering runs in a separate container (Chromium-based). It occasionally crashes after a memory leak in the chart library and restarts. Symptom: the dashboard's "Download" button spins forever; the API call hangs and times out at 30 s.

The service auto-restarts within 60 s. Retry. If it fails twice in a row, file a ticket.

5 · Browser blocking the download

Chrome and Firefox occasionally block automatic downloads from new domains. Symptom: the dashboard reports Report ready but no file downloaded.

Look for the download icon in the URL bar, or Downloads → Recent. Allow downloads from opensense.murzin.digital once and the issue goes away.

What to do if the inspector is tomorrow

A more direct workaround: open the dashboard, set the time range to last month, screenshot each chart, email it to yourself as a single-page PDF via your printer's "Save as PDF". The PDF report is nicer but the auditor accepts a screenshot as long as it bears the site name and the URL.

For chronically time-sensitive deployments, configure a monthly report subscription: the dashboard pre-renders the report on the 1st of each month at 02:00 site-local and emails the PDF to the configured recipients. It is already in the inbox before the inspector arrives.