Skip to content
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

[Bug]: Print fails with message 'Print job failed' if the user cancels the saving to PDF #36084

Closed
3 tasks done
Hedwig188 opened this issue Oct 19, 2022 · 14 comments · Fixed by #43337
Closed
3 tasks done
Assignees
Labels
21-x-y bug 🪲 component/printing platform/windows status/confirmed A maintainer reproduced the bug or agreed with the feature

Comments

@Hedwig188
Copy link

Preflight Checklist

Electron Version

21.1.0

What operating system are you using?

Windows

Operating System Version

Windows 10

What arch are you using?

x64

Last Known Working Electron version

Unknown

Expected Behavior

If the user cancels the printing, treat it as success or at least log the cancel message on both local and remote printers so applications can catch that and suppress the error message accordingly.

Actual Behavior

Inconsistent behavior when printing to local and remote printers (as least for PDF printer, haven't tested out on any physical printers). The print job returns failure message "Print job failed" from local printer and "success" from the remote printer which caused some confusion to the end user.

Testcase Gist URL

https://gist.github.com/d43cee547b874cbecd32a17bda9ad904

Additional Information

Run the above code and select "Microsoft Print to PDF" local printer on the window's default print dialog. Once the file explore opens, cancel the saving to the PDF file. See the console outputs "Print job failed". However, if you select any PDF printer from the remote session and cancel the saving, the print job returns success instead.

@Hedwig188
Copy link
Author

Likely new with this PR.

@codebytere
Copy link
Member

I'm unable to reproduce this using the steps above - when selecting "Microsoft Print to PDF" local printer on the window's default print dialog and then cancelling i see "Print job canceled"

@codebytere codebytere added blocked/need-repro Needs a test case to reproduce the bug platform/windows labels Oct 26, 2022
@Hedwig188
Copy link
Author

I'm unable to reproduce this using the steps above - when selecting "Microsoft Print to PDF" local printer on the window's default print dialog and then cancelling i see "Print job canceled"

I reproduced this with Electron v21.1.0 on Windows 10 Enterprise with OS build 19044.2130. Not sure if that makes any difference.

@github-actions github-actions bot removed the blocked/need-repro Needs a test case to reproduce the bug label Jan 10, 2023
@github-actions
Copy link
Contributor

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

@github-actions github-actions bot added the stale label Apr 11, 2023
@Hedwig188
Copy link
Author

Still reproducible in v22.

@github-actions github-actions bot removed the stale label Apr 12, 2023
@github-actions
Copy link
Contributor

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

@github-actions github-actions bot added the stale label Jul 11, 2023
@Hedwig188
Copy link
Author

Hedwig188 commented Jul 11, 2023 via email

@github-actions github-actions bot removed the stale label Jul 12, 2023
@dominic-simplan
Copy link

Same (?) issue here.
Cancelling the print system dialog rejects with message "Print job canceled" (correct)
Selecting "Print" for the "Microsoft Print to PDF" printer in the print system dialog and then cancelling the Save dialog for the PDF rejects with message "Print job failed". (unexpected?)

Using Electron 20.1.4 on Windows 11.

@electron-issue-triage
Copy link

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

@Hedwig188
Copy link
Author

Hedwig188 commented Nov 24, 2023 via email

@electron-issue-triage
Copy link

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

@Hedwig188
Copy link
Author

Hedwig188 commented Feb 24, 2024 via email

@electron-issue-triage
Copy link

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

@pushkin-
Copy link

repros with v30.0.8

@codebytere codebytere removed the stale label May 29, 2024
@codebytere codebytere added the status/confirmed A maintainer reproduced the bug or agreed with the feature label May 29, 2024
@codebytere codebytere self-assigned this Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
21-x-y bug 🪲 component/printing platform/windows status/confirmed A maintainer reproduced the bug or agreed with the feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants