Issue metadata
Sign in to add a comment
|
chrome://inspect cannot authorize USB devices |
||||||||||||||||||||||
Issue descriptionChrome Version: 60.0.3100.0 OS: Chrome OS 9554.2.0 What steps will reproduce the problem? (1) Open chrome://inspect (2) Connect an Android device with USB debugging enabled (3) Acknowledge the authorization prompt on the device, checking the "always trust this device" box. What is the expected result? Device should be listed in chrome://inspect as online. What happens instead? Device remains listed as "pending authorization". This issue is reproducible on both samus and peach_pit. It is not reproducible on Linux (which shares all the same user space logic).
,
May 23 2017
,
May 23 2017
Is it possible to get a narrow bisect? Eugene, could you please take a look?
,
May 23 2017
On the phone, I see an "Allow USB debugging" prompt popping up over and over again. Looking into it.
,
May 23 2017
You will also see numerous log entries in chrome://device-log claiming that it failed to release an interface because the kernel returned an "Invalid argument" error.
,
Jun 16 2017
It would be great if someone can have a look as it currently prevents me to debug web apps running on Android from my chromebook. Thanks in advance. I can provide more logs if needed.
,
Jun 16 2017
,
Jul 10 2017
Any updates? M60 goes stable in 3 weeks.
,
Jul 10 2017
@caseq: mind taking a look. I completely missed this one...
,
Jul 10 2017
reillyg@: I don't think we touched usb-related code between 59 and 60. Any suspects on your side? Or is it plain ChromeOS issue? In case of latter, it needs to go to someone in ChromeOS land for per-revision bisect.
,
Jul 11 2017
I don't have any suspects. The Linux and Chrome OS code are almost entirely the same and I can't reproduce it on my workstation. I've been meaning to add a bunch of debugging to the ADB code to see if I can pinpoint exactly what failure it is encountering.
,
Jul 11 2017
I added some logging and determined that transfers to the device are failing with ESHUTDOWN. On my device with an xHCI controller that shouldn't happen unless the controller has hit an error. I'm recompiling the kernel with xHCI debugging to figure out where that is coming from.
,
Jul 12 2017
Further investigation indicates that the permission broker, in response to an OpenPath request, is detaching the driver that has claimed the device. The problem is that this "driver" is actually Chrome and so it ends up disconnecting itself every time it attempts to probe the device. There are a couple things to investigate: 1) Should permission_broker not detach the driver when it is "usbfs" which indicates a user application like Chrome is accessing the device? 2) Why is Chrome attempting to open devices it already has open?
,
Jul 12 2017
That an external application is detaching Chrome from the device also explains the "Invalid argument" errors from USBDEVFS_RELEASEINTERFACE, as the interface has already been forcibly released. Adding some logging to android_usb_device.cc I see now that the same device is being opened twice in a row, setting up this situation in which there will always be two competing connections to the device.
,
Jul 14 2017
I have a patch to work around this issue: https://chromium-review.googlesource.com/572300
,
Jul 19 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2aeec8604ce03838f45abac42f003f9bbf09c734 commit 2aeec8604ce03838f45abac42f003f9bbf09c734 Author: Reilly Grant <reillyg@chromium.org> Date: Wed Jul 19 23:52:43 2017 Prevent chrome://inspect from creating duplicate USB connections Recently chrome://inspect started to open USB devices multiple times while probing for ADB devices. On Chrome OS this causes a problem because the permission_broker will disconnect the previous connection in favor of the new connection. This caused an endless cycle of connection failures. This patch maintains a list of the devices that are currently open and refused to reopen them during probing until the previous connection is fully closed. Bug: 725320 Change-Id: Id9b01d8d14c55ee2576499e2f1c778fea6c7dedc Reviewed-on: https://chromium-review.googlesource.com/572300 Commit-Queue: Reilly Grant <reillyg@chromium.org> Reviewed-by: Pavel Feldman <pfeldman@chromium.org> Cr-Commit-Position: refs/heads/master@{#488049} [modify] https://crrev.com/2aeec8604ce03838f45abac42f003f9bbf09c734/chrome/browser/devtools/device/usb/android_usb_browsertest.cc [modify] https://crrev.com/2aeec8604ce03838f45abac42f003f9bbf09c734/chrome/browser/devtools/device/usb/android_usb_device.cc
,
Jul 19 2017
Will verify in tomorrow's canary build and request merge.
,
Jul 20 2017
Verified on Chrome OS canary build 9762.0.0.
,
Jul 20 2017
This bug requires manual review: We are only 4 days from stable. Please contact the milestone owner if you have questions. Owners: amineer@(Android), cmasso@(iOS), josafat@(ChromeOS), bustamante@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jul 24 2017
,
Jul 24 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e3f22953244d7f4301a21d94679c2602e393eb7e commit e3f22953244d7f4301a21d94679c2602e393eb7e Author: Reilly Grant <reillyg@chromium.org> Date: Mon Jul 24 18:26:48 2017 Prevent chrome://inspect from creating duplicate USB connections Recently chrome://inspect started to open USB devices multiple times while probing for ADB devices. On Chrome OS this causes a problem because the permission_broker will disconnect the previous connection in favor of the new connection. This caused an endless cycle of connection failures. This patch maintains a list of the devices that are currently open and refused to reopen them during probing until the previous connection is fully closed. TBR=reillyg@chromium.org (cherry picked from commit 2aeec8604ce03838f45abac42f003f9bbf09c734) Bug: 725320 Change-Id: Id9b01d8d14c55ee2576499e2f1c778fea6c7dedc Reviewed-on: https://chromium-review.googlesource.com/572300 Commit-Queue: Reilly Grant <reillyg@chromium.org> Reviewed-by: Pavel Feldman <pfeldman@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#488049} Reviewed-on: https://chromium-review.googlesource.com/583431 Reviewed-by: Reilly Grant <reillyg@chromium.org> Cr-Commit-Position: refs/branch-heads/3112@{#666} Cr-Branched-From: b6460e24cf59f429d69de255538d0fc7a425ccf9-refs/heads/master@{#474897} [modify] https://crrev.com/e3f22953244d7f4301a21d94679c2602e393eb7e/chrome/browser/devtools/device/usb/android_usb_browsertest.cc [modify] https://crrev.com/e3f22953244d7f4301a21d94679c2602e393eb7e/chrome/browser/devtools/device/usb/android_usb_device.cc
,
Jul 24 2017
,
Jul 27 2017
,
Jul 27 2017
Verified on build 9592.71.0 |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by reillyg@chromium.org
, May 23 2017