Bad device URI "://" on network printers. Printing stopped working between 2.4.19 and 2.4.20
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
Research direction
The bug is in create_local_printer in scheduler/ipp.c, where the device URI was split out of ptr into device_uri_ptr. Check the two places the report names (the httpSeparateURI call and the cupsdSetDeviceURI call) and see which still read ptr instead of device_uri_ptr. Done means a network printer's device URI parses without the :// error and a job can be queued, which you can confirm by reproducing the printer-creation path or running the scheduler's printer tests.
Written by the indexing model from the issue text.
Description
Describe the bug
Printing on a discovered network printer does not spawn jobs anymore and only throws errors in logs, no feedback in any UI (on my system).
This bug was probably introduced in 2.4.20, because a downgrade to 2.4.19 seems to fix my issue.
To Reproduce
- Print a page using firefox, select "print with system dialog".
- Observe that the network printer is listed, but "fetching information..." does not stop.
- Printing does not spawn a job, the web UI of cups does not show any queued, failed or completed jobs.
Some logs:
# lpoptions -p <printername> -l
lpoptions: Unable to get PPD file for <printername>: No such file or directory
# tail /var/log/cups/error_log
E [24/Sep/2026:16:38:46 +0200] [Job 23] Files have gone away.
W [08/Oct/2026:13:26:10 +0200] No limit for Set-Printer-Attributes defined in policy default - using CUPS-Add-Modify-Printers's policy.
W [08/Oct/2026:13:26:10 +0200] No limit for Set-Printer-Attributes defined in policy authenticated - using CUPS-Add-Modify-Printers's policy.
E [08/Oct/2026:13:26:10 +0200] [Job 24] Unable to queue job for destination "<printername>".
E [08/Oct/2026:13:26:10 +0200] [Job 25] Unable to queue job for destination "<printername>".
E [08/Oct/2026:13:26:10 +0200] [Job 26] Unable to queue job for destination "<printername>".
E [09/Oct/2026:15:37:20 +0200] <printername>: Bad device URI "://".
E [09/Oct/2026:15:37:20 +0200] [Client 1125] Returning IPP server-error-device-error for CUPS-Create-Local-Printer (ipps://localhost/printers/<printername>) from localhost.
System Information:
- Arch Linux x86_64 7.2.9-arch1-1
- Firefox
- CUPS version 2.4.20
Guessed Cause:
https://github.com/OpenPrinting/cups/commit/3c86e2f5fc797030aea65f3d6104b1a3d84f4f88
- const char *ptr; /* Pointer into attribute value */
+ const char *ptr, /* Pointer into attribute value */
+ *device_uri_ptr; /* Pointer into device URI value */
In this commit, the variable ptr in function create_local_printer was split into two: ptr and device_uri_ptr.
But two references were forgotten to be updated to device_uri_ptr, such referencing the wrong string:
- httpSeparateURI(HTTP_URI_CODING_ALL, ptr,
+ httpSeparateURI(HTTP_URI_CODING_ALL, device_uri_ptr,
scheme, sizeof(scheme), userpass, sizeof(userpass), host,
sizeof(host), &port, resource, sizeof(resource));
else
- cupsdSetDeviceURI(printer, ptr);
+ cupsdSetDeviceURI(printer, device_uri_ptr);
- Dominant language
- C
- Stars
- 1.8k
- Forks
- 349
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 12
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OpenPrinting/cups
-
bug : find_key() compares kty against "ocy" instead of "oct", breaking kid-less HS256 verificationOpen
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
OpenPrinting/cups#1756 ·
Maintainers usually reply within 1 day
-
Potential integer overflow when using atoi() In cgi-bin/var.cPossibly taken @lynayur claimed this 4 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
OpenPrinting/cups#1748 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
OpenPrinting/cups#1721 ·
Maintainers usually reply within 1 day
-
investigating platform issue printer specific issue
Difficulty 3/5 1-2 days Newbie friendliness 65/100
OpenPrinting/cups#1727 · 4 comments ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
OpenPrinting/cups#1726 ·
Maintainers usually reply within 1 day
All issues in OpenPrinting/cups
Similar issues
-
type: feature
Difficulty 1/5 Under an hour Newbie friendliness 77/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
FujiNetWIFI/fujinet-firmware#1932 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
Maintainers usually reply within 1 day
-
stdlib
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
[LOGO] kairo linuxOpenlogo request
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
fastfetch-cli/fastfetch#2650 ·
Maintainers usually reply within 1 day