Print preview disappears when clicked on [Change] destination button. |
||||||||||
Issue descriptionChrome Version: 69.0.3447.3 OS: Windows 10 What steps will reproduce the problem? (1) Install and launch Chrome Canary (2) Enable "Enable network service" flag from "About://flags" (3) Relaunch Chrome (4) Visit any webpage or open a PDF and try to print using "Ctrl + P" (5) On print preview dialog click [Change] on destination section. What is the expected result? Should bring up select a Destination dialog should be shown to user. What happens instead? Instead the whole print preview dialog disappears, intern results in no printing. Did this work with Enable network service flag disable? Yes How frequent was the bug reproducible? 100% of times.
,
Jun 7 2018
,
Jun 7 2018
,
Jun 8 2018
,
Jun 28 2018
,
Jun 28 2018
Running this in a debug build locally shows the following message: Terminating renderer for bad IPC message, reason 185 Tracking it back confirmed my suspicion that this is related to Print Preview requesting printers from cloud print. Specifically, termination is triggered by this condition: https://cs.chromium.org/chromium/src/content/browser/webui/web_ui_url_loader_factory.cc?l=249-255 The request that is triggering the renderer termination is the cloud print search request that gets sent by print preview whenever the user opens the destinations dialog for the first time. So chrome://print is sending a request with URL https://www.google.com/cloudprint/[other parameters], which fails the scheme check. See also https://crbug.com/829414. As noted there, all the cloud print communication code currently lives in the Print Preview Javascript and should probably be moved to the handler. If that needs to be bumped up in priority based on the priority of this bug, please let us know. What is the target milestone for turning this flag on by default?
,
Jun 28 2018
we are trying to get a canary with network service turned on before M69 branch (7/19).
,
Jun 28 2018
Marking this blocked on 829414, since it is the same issue. M69 branch is probably too early to do the full fix for this, since it requires rewriting the cloud print interface and changing a bunch of logic in both the C++ and JS side of print preview. We can try to get this done for M70. A smaller change that might improve the state for M69 Canary would be to check the value of the network service flag in print preview and avoid making any requests to cloud print if it is on. That would prevent the dialog crashing when the destinations dialog is opened, but cloud printers would not be accessible in print preview for users with the network service flag enabled (i.e. they would not appear in the dialog). Do you think that would that be worth doing as a temporary improvement?
,
Jul 3
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ea795e02c92ad9b476b3996600b2c5acbf716645 commit ea795e02c92ad9b476b3996600b2c5acbf716645 Author: rbpotter <rbpotter@chromium.org> Date: Tue Jul 03 01:21:31 2018 Print Preview: Disable cloud print when network service is enabled Cloud print requests cannot be made from the Print Preview WebUI when the network service is enabled. Avoid making these requests when the flag is enabled, and add a (currently empty) CloudPrintHandler class that implements the PrinterHandler interface, and will generate these requests in future. Bug: 829414, 848987 Cq-Include-Trybots: luci.chromium.try:closure_compilation Change-Id: Icec152b4687a325758a67fcf6562b913a8657073 Reviewed-on: https://chromium-review.googlesource.com/1120873 Commit-Queue: Rebekah Potter <rbpotter@chromium.org> Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/master@{#572068} [modify] https://crrev.com/ea795e02c92ad9b476b3996600b2c5acbf716645/chrome/browser/resources/print_preview/data/destination_store.js [modify] https://crrev.com/ea795e02c92ad9b476b3996600b2c5acbf716645/chrome/browser/resources/print_preview/native_layer.js [modify] https://crrev.com/ea795e02c92ad9b476b3996600b2c5acbf716645/chrome/browser/ui/BUILD.gn [add] https://crrev.com/ea795e02c92ad9b476b3996600b2c5acbf716645/chrome/browser/ui/webui/print_preview/cloud_printer_handler.cc [add] https://crrev.com/ea795e02c92ad9b476b3996600b2c5acbf716645/chrome/browser/ui/webui/print_preview/cloud_printer_handler.h [modify] https://crrev.com/ea795e02c92ad9b476b3996600b2c5acbf716645/chrome/browser/ui/webui/print_preview/print_preview_handler.cc [modify] https://crrev.com/ea795e02c92ad9b476b3996600b2c5acbf716645/chrome/browser/ui/webui/print_preview/print_preview_handler.h [modify] https://crrev.com/ea795e02c92ad9b476b3996600b2c5acbf716645/chrome/browser/ui/webui/print_preview/print_preview_ui.cc [modify] https://crrev.com/ea795e02c92ad9b476b3996600b2c5acbf716645/chrome/browser/ui/webui/print_preview/printer_handler.cc [modify] https://crrev.com/ea795e02c92ad9b476b3996600b2c5acbf716645/chrome/browser/ui/webui/print_preview/printer_handler.h
,
Jul 3
Verified the fix on Mac 10.13.1, Windows-10 and Ubuntu 14.04 using Chrome version #69.0.3480.0 as per the comment #0. Attaching screen cast for reference. Observed that print preview dialogue stayed after clicking "change". Hence, the fix is working as expected. Adding the verified labels. Note: Able to reproduce the issue on chrome version 69.0.3447.3 Thanks...!!
,
Jul 3
Please note that while the crash should be fixed as verified in comment 10, the current fix is to disable cloud printing when the network service flag is on, which prevents Print Preview from making the problematic network requests. So cloud printers will not be available in Print Preview when the network service flag is enabled, until we create a new implementation that performs the cloud print network requests on the C++ handler side.
,
Jul 9
rbpotter@ pointed out that the usage of cloud print vs local print is captured in this UMA: https://uma.googleplex.com/histograms?endDate=latest&dayCount=7&histograms=PrintPreview.UserAction&fixupData=true&showMax=true&filters=channel%2Ceq%2C1%2Cisofficial%2Ceq%2CTrue&implicitFilters=isofficial
,
Jul 10
I think we will need this for canary; we missed 69 which is ok. @rbpotter: How much work do you estimate it is to fix 829414? You mentioned above that it could be prioritized; it would be great if so, thanks.
,
Jul 11
It's going to be a good amount of work - I would guess it will take a few weeks. We have to re-implement all communication with the cloud print server in C++ (more or less this entire file: https://cs.chromium.org/chromium/src/chrome/browser/resources/print_preview/cloud_print_interface.js) and then rework the logic and some tests on both the C++ and JS side to use the new path. The Print Preview UI is also currently forked, so the logic needs to be updated in both implementations of the UI. I bumped up the priority of that bug, and we are targeting fixing it for M70.
,
Jul 11
,
Jul 11
I'll add a workaround to make this work. for the few WebUIs that are making network requests, i'll maintain the old behavior.
,
Jul 12
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/04bfa853ac261c316e0ef799e7c10ae05dece8c1 commit 04bfa853ac261c316e0ef799e7c10ae05dece8c1 Author: John Abd-El-Malek <jam@chromium.org> Date: Thu Jul 12 05:28:22 2018 Add workaround for WebUIs that make network requests when running with the network service. Currently with the network service, renderers that have WebUI bindings are not allowed to make requests over the internet. This is to improve security in case the response hijacks the renderer. However there are a couple of WebUIs that are doing this now, so temporarily allow them. Bug: 848987 , 829412 Change-Id: I34c1b66e63fd1b7c2960cc867709c065329cf489 Reviewed-on: https://chromium-review.googlesource.com/1134412 Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org> Reviewed-by: Ken Rockot <rockot@chromium.org> Commit-Queue: John Abd-El-Malek <jam@chromium.org> Cr-Commit-Position: refs/heads/master@{#574490} [modify] https://crrev.com/04bfa853ac261c316e0ef799e7c10ae05dece8c1/chrome/browser/chrome_content_browser_client.cc [modify] https://crrev.com/04bfa853ac261c316e0ef799e7c10ae05dece8c1/chrome/browser/chrome_content_browser_client.h [modify] https://crrev.com/04bfa853ac261c316e0ef799e7c10ae05dece8c1/chrome/browser/extensions/chrome_extensions_browser_client.cc [modify] https://crrev.com/04bfa853ac261c316e0ef799e7c10ae05dece8c1/chrome/browser/extensions/chrome_extensions_browser_client.h [modify] https://crrev.com/04bfa853ac261c316e0ef799e7c10ae05dece8c1/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc [modify] https://crrev.com/04bfa853ac261c316e0ef799e7c10ae05dece8c1/chrome/browser/ui/webui/chrome_web_ui_controller_factory.h [modify] https://crrev.com/04bfa853ac261c316e0ef799e7c10ae05dece8c1/content/browser/frame_host/render_frame_host_impl.cc [modify] https://crrev.com/04bfa853ac261c316e0ef799e7c10ae05dece8c1/content/public/browser/content_browser_client.cc [modify] https://crrev.com/04bfa853ac261c316e0ef799e7c10ae05dece8c1/content/public/browser/content_browser_client.h [modify] https://crrev.com/04bfa853ac261c316e0ef799e7c10ae05dece8c1/extensions/browser/api/web_request/web_request_permissions.cc [modify] https://crrev.com/04bfa853ac261c316e0ef799e7c10ae05dece8c1/extensions/browser/extensions_browser_client.cc [modify] https://crrev.com/04bfa853ac261c316e0ef799e7c10ae05dece8c1/extensions/browser/extensions_browser_client.h
,
Jul 12
,
Jul 16
Tested this issue on Windows 10, Mac 10.13.5 & Debian Rodate using chrome-69.0.3493.0 as per C#0. Able to view print preview successfully when we clicked on 'Change' [destination] button.Seems it is working as intended,hence adding TE Verified labels. Please find the attached screencast for reference. Thanks..! |
||||||||||
►
Sign in to add a comment |
||||||||||
Comment 1 by pbomm...@chromium.org
, Jun 2 20182.2 MB
2.2 MB View Download