Chrome private network access and localhost printing
A public HTTPS page calling a localhost printer bridge is what private-network rules restrict. Printing from your server avoids that browser call.
For Developers whose localhost print bridge broke
Overview
Chrome has been restricting public sites from calling private and loopback addresses. Printer helpers that bind 127.0.0.1 from a cloud-hosted origin are in that category. The symptom is a failed request in the console, not a bug in the printer.
PrintBase does not need the page to call the printer. The page calls your API on the public origin. Your API calls api.printbase.cloud. The agent calls out from the shop. None of those hops is a public site fetching localhost.
If you still run a local helper for a kiosk, serve the kiosk page from localhost or keep it on a vendor host that the helper allow-lists. Do not ask cashiers to disable browser security.
Integration steps
- 01
Confirm the failure is the browser
The blocked URL is 127.0.0.1 or a private LAN address from an HTTPS shop.
- 02
Move the print call to the server
The browser stops touching the printer port. Use POST /v1/print-jobs with Authorization: Bearer and the printer_code from GET /v1/printers.
- 03
Install the agent on the shop PC
The OS queue remains the way paper comes out. Use POST /v1/print-jobs with Authorization: Bearer and the printer_code from GET /v1/printers.
- 04
Retire the localhost SDK if nothing else needs it
DYMO, Zebra Browser Print, and similar helpers can stay for other apps. They are not required for this path.
Node.js
// Server call that replaces a localhost fetch
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: 'pdf',
content: pdf.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
This is not a PrintBase error code
INVALID_CONTENT and AGENT_OFFLINE are API results. A CORS or private-network error happens before your server is involved.
Do not document a Chrome flag as the fix
Flags change and are unsafe as a deployment step. The agent prints only what you send; it does not fetch the document from the platform for you.
Questions
Did PrintBase disable the bridge?
No. The browser restricts the page. The API never needed that request.
Our admin is also on HTTPS.
Good. It should call your HTTPS API, not the printer. The call is still POST /v1/print-jobs with a Bearer API key, and HTTP 201 means queued rather than printed.
Intranet HTTP pages?
Some browsers treat them differently. Do not bet a rollout on that. Use the server path.
Local agent port from our admin?
Only if the admin origin is allow-listed. A custom admin domain is not.
Free plan: 100 jobs a month on one computer, no card.