Unable to inspect Android device via Chrome://inspect
Asked Answered
N

8

23

I am developing an app for a new Android device (on all other I've never had this issue).

It's running 4.2.2 I have enabled developer mode and allowed usb debugging (I receive the status notification that usb debugging enabled)

However, in chrome://inspect the screen keeps alternating between the below two messages, seems it can't make up it's mind!

  1. ratech72_wet_rlk_lca #0123456789ABCDEF
  2. Offline #00180123456789ABCDEF Pending authentication: please accept debugging session on the device.

I've tried unplugging and restarting everything to no avail

When I plug in the device I see the following status messages on the device systray, in this order

  1. Connected as USB Storage
  2. USB Debugging Connected
  3. USB Connected

How can I access chrome inspect on this device? I am using logcat for now but it's far less powerful than chrome dev tools.

Nostrum answered 14/9, 2015 at 21:28 Comment(3)
are you debugging an application with a Webview or are you debugging a website on mobile?Earthwork
It's a Cordova application... so an application with a WebviewNostrum
Ah, i think your issue is 4.2.2 then not the actual device from the guidelines "For app debugging: Android 4.4+ and a WebView configured for debugging." developer.chrome.com/devtools/docs/remote-debuggingEarthwork
O
36

This is a known issue.

The answer in the link (changing USB mode from MTP to PTP) did work for me for some time, however others have had less success, and my setup has now regressed to the erratic connection you are seeing.

Personally, I just try to play quick draw and click on the device when it's listed before it disconnects again, which after a bit of practice doesn't take too long, and once you've done that, the actual inspect tools don't have the same erratic connect/disconnect problem so you should be fine until you physically disconnect the device.

This should be resolved in a future version of Chrome.

Oly answered 14/9, 2015 at 23:2 Comment(2)
Sadly, this is still a problem. It works sometimes, but I've been playing quick draw for 20 minutes now!Dickens
saved my day +1 - for me it seems not a chrome problem. for the connection acception did not appear with MTP enabled. After switching to PTP it came up and Remote Inspection start working on Chrome and Firefox.Alienee
A
28

I know this is an old question, but nonetheless, this is what helped me:

  • while in Chrome chrome://inspect/#devices page is opened
  • turn off USB Debugging,
  • turn on USB Debugging again

The phone will ask me if I trust the connection...

Adjuvant answered 3/3, 2021 at 16:58 Comment(1)
After confirm "allow usb debugging" popup on android, the inspect page still says: Pending authentication: please accept debugging session on the device.Bondswoman
D
9

This is what I did in Android 10 (Oneplus 7t pro), to make it to work(in addition to @gordan.sikic answer).

  1. While in Chrome, keep chrome://inspect/#devices page opened
  2. Click and accept, Android Phone -> Settings -> Developer Options -> Revoke USB debugging authorizations
  3. Turn off USB debugging
  4. Turn on USB debugging, accept Allow USB debugging.

Then you 'll see Always allow from this computer Notification

Dragline answered 7/9, 2021 at 14:28 Comment(0)
E
5

You will need to check out the Facebook Stetho debugging tool:

http://facebook.github.io/stetho/

It is pretty easy to get up and running. And it works well if you are using OkHttp developed by square to debug networking tools.

add to gradle:

dependencies { 
  implementation 'com.facebook.stetho:stetho:1.5.0' 
} 

then in your application class:

  Stetho.initializeWithDefaults(this);

and then go to chrome://inspect in your browser and you should see your device

Earthwork answered 14/9, 2015 at 21:40 Comment(2)
I've used Chrome dev tools for countless other Android apps developed in exactly the same fashion; same hardware, same software, same apps even... only difference is this phone itself. I know there are many other ways to debug but I'd much rather get my preferred method to workNostrum
@JoshuaOhana i would at least give it a try to see if an alternate method works. Then you know that your method needs to be changed for this device and that you can use the chrome tools for it.Earthwork
O
2

In the virtual Device Manager I selected Wipe Data from the Actions. Then I started the virtual device. Then I ran the app and it worked in the emulator.

Oiler answered 12/8, 2019 at 6:4 Comment(0)
C
1

I ran into this issue and none of the suggestions helped me. I found that the cause in my case was:

The phone was attached to the computer indirectly - via docking station. Once I attached the cable directly to the computer, the problem was gone.

Calcutta answered 5/10, 2023 at 16:6 Comment(0)
H
0

In my case I had the USB mode set to "no data connection", setting it to PTP, helped.

Hosanna answered 16/6 at 15:15 Comment(0)
A
-1

I found that sometimes I am unable to inspect Android device via Chrome://inspect because I'm in some other country and connecting to US server on both the mobile device and the dev machine via VPN fixes the problem.

Aney answered 26/1, 2023 at 15:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.