New issue
Advanced search Search tips

Issue 693020 link

Starred by 2 users

Issue metadata

Status: Duplicate
Merged: issue 658288
Owner:
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

The /json/list or /json API does not give the active tab as the first element for chrome 55+ over adb

Reported by yohanmar...@gmail.com, Feb 16 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.37 Safari/537.36

Steps to reproduce the problem:
1. Make sure the chrome version on android is 55+ 
2. Connect the device to the machine and do the adb port forwarding (eg:- adb forward tcp:8000 localabstract:chrome_devtools_remote)
3. Now navigate to localhost:8000/json or localhost:8000/json/list
4. Open multiple tabs on the device and keep switching the tabs.

What is the expected behavior?
The list should show the active tab as the first element in the list (ie. it should sort the list by last activity time).

What went wrong?
The list is not sorted by the activity time and as a consequence, the active page does not appear as the first element in the list. 

Did this work before? N/A 

Chrome version: 57.0.2987.37  Channel: n/a
OS Version: OS X 10.11.4
Flash Version: Shockwave Flash 24.0 r0

Moreover, there is no way to check which page is active from the list!

 

Comment 1 by l...@chromium.org, Feb 18 2017

Cc: l...@chromium.org
Owner: dgozman@chromium.org
Status: Assigned (was: Unconfirmed)
Thank you for the request.  Tabs from a remote device are not listed in their last used order, but in their tab order.  It simply gets all WebContents without sorting by last active time.

Could you please explain your use case for needing the last active tab?
Comment #1: I am afraid that was not the behavior till chrome 55 released for android. Till 54, it always showed the list as per the activity time. 
Moreover, I tested on chrome 58 Dev on android, and it gave the results in last used(activity time) order. Hence, the ordering logic changed in version 55 up to 57 but it is back to the activity time sorting logic in chrome 58 Dev.

Also, I found this line of code which, I believe, handles the sorting of the list.

https://cs.chromium.org/chromium/src/content/browser/devtools/devtools_http_handler.cc?l=615

My use case is pretty simple. I need to fetch current active tab and make the WS/WSS connection. This should also work when tabs are switched.

Mergedinto: 658288
Status: Duplicate (was: Assigned)
Indeed, we regressed this behavior. Fortunately, it was fixed recently (see  issue 658288 ). Thank you for filing the bug!

Comment 4 by l...@chromium.org, Feb 21 2017

Whoops, I was wrong!  Thanks for finding the duplicate bug dgozman@

Sign in to add a comment