New issue
Advanced search Search tips

Issue 793340 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

USB connected Printer model shows twice in 'Add a Nearby Printer' list

Project Member Reported by ka...@chromium.org, Dec 8 2017

Issue description

Screenshot: https://screenshot.googleplex.com/g3LJ3Bj89Rh

After printer is added, it shows correctly in the settings page and in Print dialog.
 

Comment 1 by skau@chromium.org, Dec 8 2017

Labels: -Pri-3 Pri-2
Owner: justincarlson@chromium.org
Status: Assigned (was: Untriaged)
That definitely looks like a bug.

Format is:
Foo Printer (USB) Foo Printer
That's...interesting.  I'll take a look.
So I spent some time looking at this today.  There's no obvious source of the problem in the code itself.

On a hunch I looked over the translation strings involved, because a bad translation could show up this way, but AFACT they look sane.  Do you happen to know what locale was being used when the screenshot was taken?

Comment 4 by skau@chromium.org, Dec 13 2017

I'm fairly certain it was en-us

Comment 5 by skau@chromium.org, Dec 13 2017

Is it possible we're building the string twice for some reason?

Comment 6 by ka...@chromium.org, Dec 13 2017

There was no locale specified, so defaults for the geolocation should have applied. I guess it should be en_US.
skau@:

If so, I'm not seeing it.  We don't *build* that string incrementally at all, which is what makes it confusing -- if we did, it would make more sense.

The relevant places that we initially set the display name when we first see the device from the usb subsystem is here:

https://cs.chromium.org/chromium/src/chrome/browser/chromeos/printing/usb_printer_util.cc?rcl=3b89bbaa924ae6450dacdd0d5c9c5e174c1fb019&l=166


Comment 8 by skau@chromium.org, Dec 14 2017

I see what you mean.  kalin@ was the screenshot from M65 or something older?

Comment 9 by ka...@chromium.org, Dec 14 2017

Labels: M-64
The top M-64 build for the day on cyan board. I think 	10176.7.0 / 64.0.3282.14.
Will confirm tomorrow as I keep the same build on the device at desk.
Cc: ka...@chromium.org
kalin@ can you confirm the build you saw this on?
One other left-field question -- was this actually *connected* via USB when you were using it?  If the printer advertises "(USB)" in its name but we're connecting to it via a different interface, we're looking in the wrong place in the code for this.

Comment 12 by ka...@chromium.org, Jan 25 2018

I believe the version was R64-10176.7.0 / 64.0.3282.14	
The crash I reported that happened that same day was about that build.

Yes, it was USB connected and it was the only one in the list in nearby Nearby Printer, after connecting via USB. It happened to all printers I connected via USB that day.

Even now I am having the same issue at desk with R65-10323.1.0 / 65.0.3325.9
Screenshot: https://screenshot.googleplex.com/c6uJasLajHq


Comment 13 by ka...@chromium.org, Jan 25 2018

Summary: USB connected Printer model shows twice in 'Add a Nearby Printer' list (was: Auto-discovered (USB) Printer model shows twice in 'Add a Nearby Printer' list)
Labels: -M-64 M-65
Owner: valleau@chromium.org
Punting to valleau@ so we can hopefully work on the ground to see a repo and track this down.
Project Member

Comment 16 by bugdroid1@chromium.org, Feb 2 2018

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

commit 0b609ebac014b1cad5afefe276aa3423e73a2784
Author: David Valleau <valleau@chromium.org>
Date: Fri Feb 02 20:48:20 2018

Removing display of printer model from add-printer-list tag

The construction of the printer's display name already contains the
model, so displaying it again was redundant.

R=hcarmona@chromium.org, xdai@chromium.org

Bug:  793340 
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I8ce04994f762b23d44dd2d30a31c4f2f90afbbf5
Reviewed-on: https://chromium-review.googlesource.com/896364
Reviewed-by: Xiaoqian Dai <xdai@chromium.org>
Reviewed-by: Hector Carmona <hcarmona@chromium.org>
Commit-Queue: David Valleau <valleau@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534144}
[modify] https://crrev.com/0b609ebac014b1cad5afefe276aa3423e73a2784/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog_util.html

Comment 17 by skau@chromium.org, Feb 5 2018

Labels: -M-65 M-6
Status: Fixed (was: Assigned)
Labels: -M-6 M-66

Sign in to add a comment