Deployment & operations

Troubleshooting

Nothing prints, it hangs, or the layout is wrong — the order to check connection, authorisation, printers, options and logs.

Last updated

Working through these steps in order covers the vast majority of cases. Each step says what to look at and what to do.

1. Is the connection up?

Look at: whether the page can connect.

const probe = await PrintLink.detect();
console.log(probe.installed, probe.reachable, probe.reason);
ResultWhat to do
installed: falsePrintLink is not installed or not running; guide the user through installing or starting it
installed: true, reachable: falseThe service is down or the port is wrong — check the tray and the console's port setting
Both fineContinue

From a shell: curl http://127.0.0.1:17888/healthz returning 200 means the service is up.

2. Has authorisation happened?

Look at: the error code.

CodeMeaningWhat to do
PAIRING_PENDINGWaiting for the user to confirm locallyAsk the user; do not treat it as a failure
PAIRING_DENIEDThe user refusedExplain why and offer to request again
PERMISSION_DENIEDMissing permissionSend the user to Security & sites to grant it
TOKEN_INVALIDThe token is no longer validCall ensureAuthorized() again
ORIGIN_NOT_ALLOWEDThe origin is refused by policyCheck the new-site policy and the trusted list

3. Is the printer there?

const { queues } = await client.listPrinters();
const status = await client.printerStatus(queueId);
SymptomMeaningWhat to do
Empty listThe operating system has no usable printerMake OS printing work first
status.state: 'offline'The printer is offlineCheck power, connection, and whether another device holds it
status.reasons shows paper/jam/doorA hardware conditionFix it on the device and reset the panel
Stuck in printingThe queue is stalledCancel that job from the console Jobs page and check the panel

4. Were the options downgraded?

Validate before submitting rather than finding out after:

const check = await client.compose({ queueId }).paper('A3').addPdf(bytes).validate();
console.log(check.requested);   // what you asked for
console.log(check.effective);   // what will be used
console.log(check.warnings);    // the difference

Common warnings are listed under print options.

If the output is too small, cropped or misplaced, see image placement and size and the paper setting. Washed-out, grainy photos usually mean the media type is wrong.

5. Still wrong? Export a log bundle

The bundle records how the options were resolved step by step, the render and spool path, and the capability reads — far more detail than an error code. See logs & log bundle.

Quick lookup

SymptomMost likely cause
The page connects but nothing printsMissing permission, or the printer is offline
Asked to authorise, but the user says they approvedConfirm they approved on the same computer; confirm the site is not paused
A LAN terminal cannot connectFirewall, source allow-list, or browser mixed content — see LAN print workstation
One invoice printed twiceA double click; use an idempotency key, see print
Preview looks right, the print does notConfirm you printed from that same preview session (printing from the preview does not re-render)
The queue fills with jobsCheck for a print() loop; use one compose() instead
Other people's jobs are in the queueCheck ownership with getJob; do not clear the queue to cancel a job

When you need help

  1. Note the error code and the time it happened;
  2. Export a log bundle;
  3. The bundle contains no document content or tokens, so it can be shared per your organisation's policy.

See also

On this page