New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 761536 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

Autodiscovered printers not appearing consistently in settings

Project Member Reported by weifangsun@chromium.org, Sep 1 2017

Issue description

This is exhibiting in a few different ways:
- When opening the Printer Selection dialog, the printers that appear under Local Destinations will be different with different times the dialog is opened.
- The initial list of autodiscovered printers in the Settings -> Add Printer workflow is not always detected.

There are a few areas that we should investigate:
- There may be a bug in the mDNS discovery code
- We may need review/clean up the code where we are surfacing auto-discovered printers.
 

Comment 1 by luum@chromium.org, Sep 20 2017

Cc: rjahagir@chromium.org skau@chromium.org ka...@chromium.org luum@chromium.org helenzhang@chromium.org sontis@chromium.org
 Issue 760354  has been merged into this issue.
Cc: pgangishetty@chromium.org
Labels: -M-63 M-62

Comment 4 by skau@chromium.org, Sep 27 2017

Summary: Autodiscovered printers not appearing consistently in settings (was: Autodiscovered printers not appearing consistently)

Comment 5 by skau@chromium.org, Sep 28 2017

Looks like there's a bug in the service_discovery_device_lister.  Even if I request a scan I don't get updated results after a network change.
When you say "after a network change" do you mean after you switch which network you're connected to, or after something appears on the network?

Comment 7 by skau@chromium.org, Sep 29 2017

After switching the network one is connected to.

Comment 8 by skau@chromium.org, Oct 5 2017

Looks like CupsPrintersHandler wasn't observing CupsPrintersManager.  That's not the full fix for this bug but it'll help a little.
Project Member

Comment 9 by bugdroid1@chromium.org, Oct 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0aa24b56e2aab22f820c2f7d218bc923bfb19381

commit 0aa24b56e2aab22f820c2f7d218bc923bfb19381
Author: David Valleau <valleau@chromium.org>
Date: Fri Oct 06 21:58:42 2017

Changed the observer system in CUPS printers manager to 2 step process.

The observes in the Usb and Zeroconf printer detectors have been changed to a
two-step process where observers are first added and then must be started in
order for callback to begin being registered. A new unit test was added to test
this behaviour.

R=dpapad@chromium.org, justincarlson@chromium.org, skau@chromium.org

Bug:  757887 ,  761536 

Change-Id: Ie47876c13609c3528ab23a8fca11057ceb7085e7
Reviewed-on: https://chromium-review.googlesource.com/682958
Reviewed-by: Sean Kau <skau@chromium.org>
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: David Valleau <valleau@chromium.org>
Cr-Commit-Position: refs/heads/master@{#507186}
[modify] https://crrev.com/0aa24b56e2aab22f820c2f7d218bc923bfb19381/chrome/browser/chromeos/BUILD.gn
[modify] https://crrev.com/0aa24b56e2aab22f820c2f7d218bc923bfb19381/chrome/browser/chromeos/printing/cups_printers_manager.cc
[modify] https://crrev.com/0aa24b56e2aab22f820c2f7d218bc923bfb19381/chrome/browser/chromeos/printing/cups_printers_manager.h
[modify] https://crrev.com/0aa24b56e2aab22f820c2f7d218bc923bfb19381/chrome/browser/chromeos/printing/cups_printers_manager_unittest.cc
[modify] https://crrev.com/0aa24b56e2aab22f820c2f7d218bc923bfb19381/chrome/browser/chromeos/printing/printer_detector.h
[add] https://crrev.com/0aa24b56e2aab22f820c2f7d218bc923bfb19381/chrome/browser/chromeos/printing/printer_detector_test_util.h
[modify] https://crrev.com/0aa24b56e2aab22f820c2f7d218bc923bfb19381/chrome/browser/chromeos/printing/usb_printer_detector.cc
[modify] https://crrev.com/0aa24b56e2aab22f820c2f7d218bc923bfb19381/chrome/browser/chromeos/printing/usb_printer_detector.h
[add] https://crrev.com/0aa24b56e2aab22f820c2f7d218bc923bfb19381/chrome/browser/chromeos/printing/usb_printer_detector_unittest.cc
[modify] https://crrev.com/0aa24b56e2aab22f820c2f7d218bc923bfb19381/chrome/browser/chromeos/printing/zeroconf_printer_detector.cc
[add] https://crrev.com/0aa24b56e2aab22f820c2f7d218bc923bfb19381/chrome/browser/chromeos/printing/zeroconf_printer_detector_unittest.cc
[modify] https://crrev.com/0aa24b56e2aab22f820c2f7d218bc923bfb19381/chrome/browser/ui/webui/print_preview/local_printer_handler_chromeos.cc
[modify] https://crrev.com/0aa24b56e2aab22f820c2f7d218bc923bfb19381/chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc
[modify] https://crrev.com/0aa24b56e2aab22f820c2f7d218bc923bfb19381/chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.h

Labels: -M-62 M-65
Owner: justincarlson@chromium.org
Stealing this.  Hoping we can get more insight using https://chromium-review.googlesource.com/c/chromium/src/+/869053 in the relevant scenarios to run down what's going on.
Looks like the powers that be aren't going to settle for less than a full launch process for adding a page exposing debugging information, so giving up on that; it's just not a good use of my time to wrangle that process.  This is unfortunate, but I can understand why they don't want to accept a less format process there.

Getting back to basics on this bug, I'd appreciate it if we could get a little more specific information on what exactly is being seen, and under what circumstances.  I've not had any luck reproducing this on my own devices.

"When opening the Printer Selection dialog, the printers that appear under Local Destinations will be different with different times the dialog is opened."

Can you clarify what this means?

1)  Some printers only appear intermittently?
2)  Some printers change names?
3)  Some combination of 1 & 2/something else?

When you see this, how is your device connected to the network?  Wireless/wired/both?  Are any of the connections to the network changing when things go wrong, or is this reproducible with no (obvious) network state changes?

Is there any sort of time-dependent factor in evidence?  In other words, if you open the nearby printers dialog quickly twice in a row, is it more likely to have wrong output than if you space it out?  Is triggering this dependent on opening the dialog soon after waking up or booting the device?

Any additional information you can provide will be most appreciated!  This is a bit of a doozy to track down.


Project Member

Comment 13 by bugdroid1@chromium.org, Feb 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8c6fd10001315b2192c4d536ea2e51d578b5e3b6

commit 8c6fd10001315b2192c4d536ea2e51d578b5e3b6
Author: Justin Carlson <justincarlson@chromium.org>
Date: Fri Feb 09 16:25:35 2018

Update ZeroconfPrinterDetector.

Add flushing semantics consistent with (some) other device lister
users.  This involved relatively intrusive changes, because we have to
track *which* service a given entry came from, and, to be correct, we
have to keep overridden entries around in case the overriding entry
disappears.

Also add substantial unit tests, which are sort of hairy and
complicated.  Sorry.  For the hairiness.  Not the tests.  Mostly.

Bug:  761536 
Change-Id: I694119edc85e8e4486b1b53e04dce643e95baaf5
Reviewed-on: https://chromium-review.googlesource.com/905474
Commit-Queue: Justin Carlson <justincarlson@chromium.org>
Reviewed-by: Sean Kau <skau@chromium.org>
Cr-Commit-Position: refs/heads/master@{#535729}
[modify] https://crrev.com/8c6fd10001315b2192c4d536ea2e51d578b5e3b6/chrome/browser/chromeos/BUILD.gn
[modify] https://crrev.com/8c6fd10001315b2192c4d536ea2e51d578b5e3b6/chrome/browser/chromeos/printing/cups_printers_manager.cc
[modify] https://crrev.com/8c6fd10001315b2192c4d536ea2e51d578b5e3b6/chrome/browser/chromeos/printing/zeroconf_printer_detector.cc
[modify] https://crrev.com/8c6fd10001315b2192c4d536ea2e51d578b5e3b6/chrome/browser/chromeos/printing/zeroconf_printer_detector.h
[add] https://crrev.com/8c6fd10001315b2192c4d536ea2e51d578b5e3b6/chrome/browser/chromeos/printing/zeroconf_printer_detector_unittest.cc

Status: Fixed (was: Assigned)
I believe this is fixed in ToT, please re-open if you continue to encounter this.

Sign in to add a comment