Zebra Browser Print certificate error on https://localhost:9101
Zebra Browser Print listens on local ports 9100 and 9101. A certificate warning on https://localhost:9101 comes from that local helper, not from the PrintBase API.
For People debugging Zebra Browser Print
Overview
Zebra's Browser Print user guide says the helper uses ports 9100 and 9101 and cannot run if another program holds them. The HTTPS listener is the one that produces a certificate warning, because it is a certificate on localhost, not a public name.
Trusting that certificate, or switching the page to the HTTP port, is a Browser Print setup step described by Zebra's materials and by integrators. It does not configure PrintBase. If the warning is blocking you, the alternative is to stop calling Browser Print and POST ZPL to the API.
The agent does not listen on 9100 or 9101. A certificate error on 9101 is not fixed by rotating a PrintBase API key.
Integration steps
- 01
See which port failed
9101 is the HTTPS listener associated with Browser Print. The print API is https://api.printbase.cloud.
- 02
Decide whether you still need Browser Print
If the page must talk to a local Zebra, follow Zebra's guide. If the server can send ZPL, use the API.
- 03
Send ZPL as raw
Base64 the same label. Set printer_code to the OS queue. Use POST /v1/print-jobs with Authorization: Bearer and the printer_code from GET /v1/printers.
- 04
Leave 9100 and 9101 free
The user guide says Browser Print cannot share those ports. The agent does not need them.
Node.js
// ZPL via the API instead of https://localhost:9101
const res = 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': idempotencyKey,
},
body: JSON.stringify({
printer_code: Number(process.env.PRINTER_CODE),
content_type: 'raw',
content: Buffer.from(zpl,'utf8').toString('base64'),
copies: 1,
}),
});
if (!res.ok) throw new Error(`PrintBase ${res.status}: ${await res.text()}`);
const job = await res.json();
// { id: "job_abc", status: "queued" }
Details for this setup
Source
Zebra Browser Print user guide, ports 9100 and 9101, ZPL II, USB and network. The agent prints only what you send; it does not fetch the document from the platform for you.
INVALID_CONTENT
If you later send a PDF as raw to PrintBase, that is a different error. ZPL should not start with %PDF-.
Questions
Should I add an exception for 9101?
Only if you keep using Browser Print. It does not help the cloud API.
Does the agent use a self-signed port?
The local print port is optional and is HTTP on 127.0.0.1:17891, with an origin allow-list. It is not port 9101.
Can both run?
Not if both want port 9100. The agent does not bind 9100. Browser Print does, per Zebra's guide.
The printer prints from the driver but not from the browser.
That is a reason to use the driver queue via the agent. The call is still POST /v1/print-jobs with a Bearer API key, and HTTP 201 means queued rather than printed.
Free plan: 100 jobs a month on one computer, no card.