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

[Problem/Bug]: Method ICoreWebView2.Print() don't work if using page ranges #4671

Open
MLAEO02 opened this issue Jul 9, 2024 · 6 comments
Open
Assignees
Labels
bug Something isn't working regression Something used to work but doesn't anymore tracked We are tracking this work internally.

Comments

@MLAEO02
Copy link

MLAEO02 commented Jul 9, 2024

What happened?

In my company we use the Print() method to print documents. The problem arises when we set a page range in the ICoreWebView2PringSettings class that starts with 4 or higher. For example:

  • Range "1": work
  • Range "1-10": work
  • Range "4-10": don't work
  • Range "5": don't work

When we send the print with a "problematic" range, the document is not printed. Furthermore, if we open a new instance of WebView2, it remains gray without showing any sign of life.
From the task management detail, we see a msedgewebview2.exe process that was started with the "--utility-sub-type=network.mojom.PrintService" parameter and which remains active even after starting printing.
As long as it is not killed manually, the WebView2 component is no longer instantiated and, for this reason, subsequent startups remain gray.
Once killed manually, after 2-3 minutes other msedgewebview2.exe processes automatically die. Subsequently, the behavior becomes correct again: the WebView2 component can be instantiated again and allows us to correctly view the documents.

What could be the problem?

Importance

Important. My app's user experience is significantly compromised.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

126.0.2592.87

SDK Version

4.6.01055

Framework

Other

Operating System

Windows 10

OS Version

No response

Repro steps

  1. Set any printer in ICoreWebView2PrintSettings class
  2. Set a range of pages in the ICoreWebView2PrintSettings class: the range must have a starting value equal to or greater than 4
  3. Send the printing of any document via the CoreWebView2 16.Print() method

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

Regression in newer Runtime

Last working version (if regression)

Before 126.0.2592.87

AB#52577196

@MLAEO02 MLAEO02 added the bug Something isn't working label Jul 9, 2024
@github-actions github-actions bot added the regression Something used to work but doesn't anymore label Jul 9, 2024
@vbryh-msft vbryh-msft assigned monica-ch and unassigned lflores-ms Jul 9, 2024
@victorhuangwq
Copy link
Collaborator

@MLAEO02 do you have an idea of what's a previously working version?

@MLAEO02
Copy link
Author

MLAEO02 commented Jul 16, 2024

Hi @victorhuangwq, sorry but no, I have no idea. We encountered this problem recently, so I don't know how long this problem has been around.

@victorhuangwq
Copy link
Collaborator

@MLAEO02 the reason I asked was because you mentioned in the report that this is a regression - meaning that at some point in time, this was working. Is that true?

@monica-ch monica-ch added the tracked We are tracking this work internally. label Jul 16, 2024
@monica-ch
Copy link
Contributor

Thank you for reporting the issue. I’ve successfully reproduced it locally and added it to our backlog. We'll investigate and provide updates in this thread once the fix is ready

@MLAEO02
Copy link
Author

MLAEO02 commented Jul 17, 2024

@victorhuangwq yes, the problem was reported to us only recently, by a user using the 126.0.2592.87 version. I personally tried the feature a while ago and it worked, but I don't remember which version i used.
@monica-ch good! Thank you so much! Keep me updated if you can, please

@victorhuangwq victorhuangwq added tracked We are tracking this work internally. and removed tracked We are tracking this work internally. labels Jul 18, 2024
@champnic
Copy link
Member

✅ Successfully linked to Azure Boards work item(s):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working regression Something used to work but doesn't anymore tracked We are tracking this work internally.
Projects
None yet
Development

No branches or pull requests

6 participants