PrintBase
  • Product
  • Pricing
  • Docs
  • Resources
PrintBase/Guides/Printing troubleshooting

The print agent keeps going offline

AGENT_OFFLINE means the computer's agent is not connected. Sleep, network, and a stopped process are the usual causes. The printer itself is a different code.

For Operators whose jobs sit in AGENT_OFFLINE

Overview

The dispatcher marks a job with AGENT_OFFLINE when the computer that owns the printer is not connected. PRINTER_OFFLINE is the other case: the computer is connected and the printer is not ready. Reading the reason code tells you which box to walk to.

The agent holds an outbound WebSocket. Sleep, a closed laptop lid, a killed process, or a firewall that blocks outbound HTTPS will drop it. There is no inbound port to open. Restart the agent and confirm it shows connected before you reprint.

A failed job does not automatically print when the agent returns. Submit again with a new Idempotency-Key if the previous attempt reached a terminal failure. A job still queued may proceed when the agent reconnects. Check the status instead of assuming.

Integration steps

  1. 01

    Read the reason code

    AGENT_OFFLINE is the PC. PRINTER_OFFLINE is the device. Use POST /v1/print-jobs with Authorization: Bearer and the printer_code from GET /v1/printers.

  2. 02

    Wake the computer and the agent

    A test page from the OS proves the printer. A connected agent proves the path.

  3. 03

    Confirm outbound HTTPS

    The agent must reach the API host you selected, global or cn.api.printbase.cloud.

  4. 04

    Reprint only if the last job failed

    Use a new key for a new physical copy. Use POST /v1/print-jobs with Authorization: Bearer and the printer_code from GET /v1/printers.

Node.js — read job status

// Read status after a disconnect
const created = await fetch('https://api.printbase.cloud/v1/print-jobs', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.PRINTBASE_API_KEY}`,
    'Content-Type': 'application/json',
    'Idempotency-Key': jobKey,
  },
  body: JSON.stringify({
    printer_code: Number(process.env.PRINTER_CODE),
    content_type: 'raw',
    content: Buffer.from(payload).toString('base64'),
    copies: 1,
  }),
}).then(async (res) => {
  if (!res.ok) throw new Error(await res.text());
  return res.json();
});

const status = await fetch(`https://api.printbase.cloud/v1/print-jobs/${created.id}`, {
  headers: { Authorization: `Bearer ${process.env.PRINTBASE_API_KEY}` },
}).then((res) => res.json());
// status.status moves queued -> dispatched -> printing -> completed

Details for this setup

Queued versus failed

While the agent is briefly gone, a job can stay queued with an offline reason and wait. A terminal failure is the one you must resubmit.

One computer on the free plan

The free plan is one computer. A second PC will not be a free spare agent. The agent prints only what you send; it does not fetch the document from the platform for you.

Questions

Does opening port 443 inbound help?

No. The agent connects out. The call is still POST /v1/print-jobs with a Bearer API key, and HTTP 201 means queued rather than printed.

VPN required?

Not for the agent. A VPN that blocks its outbound call will look like offline.

Multiple agents on one printer?

Install one. Two agents do not create failover in this product.

How fast is the status?

Poll GET /v1/print-jobs/{id}. Paid webhooks fire on completed and failed, not on every offline blip.

Related guides

  • How to know a print job actually printed

    HTTP 201 means the job was queued. Completed means the agent reported success. Poll the job, or use a paid-plan webhook for the terminal events.

  • Print to a USB printer from another network

    A USB printer stays on its computer. That computer runs the agent. Other networks send a job. They never see the USB port.

  • Print from AWS to a printer behind a firewall

    A server on AWS does not need a path to the printer's private IP. The office agent connects outbound and your server posts a job.

  • Print from a cloud app to an office without a VPN

    An app on AWS or Azure can print to a branch office by posting a job. The office runs the agent. You do not merge the networks for printing.

Free plan: 100 jobs a month on one computer, no card.

Create a free accountRead the API docs
PrintBase

PrintBase connects your applications to physical printers anywhere - securely, reliably, and in real time.

Product
Receipt PrintingLabel PrintingDashboardDevicesWebhooks
Resources
DocsBlogStatusAPI ReferenceDownloadPrintBase vs PrintNodePrintNode PricingFAQ
Guides
All guidesIntegrationsPrintersCode samplesComparisonsUse casesTroubleshooting
Company
ContactSecurityPrivacy

© 2026 Aveniq Technologies OÜ. All rights reserved. PrintBase is a service of Aveniq Technologies OÜ.

PrivacyTermsRefunds