New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: check printer list when no default printers #25515
Conversation
99aa054
to
d1f03ef
Compare
Only failure is arm64 which is unrelated and caused by a CircleCI image upgrade. |
Release Notes Persisted
|
I was unable to backport this PR to "10-x-y" cleanly; |
I was unable to backport this PR to "9-x-y" cleanly; |
I have automatically backported this PR to "11-x-y", please check out #25562 |
@codebytere has manually backported this PR to "10-x-y", please check out #25606 |
@codebytere has manually backported this PR to "9-x-y", please check out #25607 |
Description of Change
Closes #25498.
It's possible for it to be the case on some operating systems that no default is selected, yet valid printers are available. In this case, we should check for available printers and default to the first available printer of those available on the system. Chromium will fail to print if no device name is provided at all, so this reduces the number of potential failure cases.
Tested with https://gist.github.com/35c5067af8ec104f86bd0cdd4a95b1f5
cc @jkleinsc @deepak1556 @zcbenz
Checklist
npm test
passesRelease Notes
Notes: Fixed an issue where an error would be displayed when using
webContents.print()
if no default was set and no device name provided.