Chrome DevTools detects device only when device is plugged out/disconnected
Asked Answered
D

1

9

Short summary:

Chrome DevTools doesn't detect my device (Google Pixel 7 Pro) when device is plugged in. The interesting thing is that the device is recognized when I disconnect it from the cable. When that happens, I am able to see pages opened in a browser on my device for a short period of time (5 seconds) before they disappear. Of course, in that scenario pages are not interactive, so If you click "Inspect" option before it dissapear nothing will happen.

Some useful information:

  • Chrome DevTools and device detection worked for me in the past. Therefore, I am not trying this for the very first time.
  • USB debugging is enabled on the phone
  • I tried setting USB preferences to "File transfer", "MIDI", "No data transfer", etc. It behaves the same for every mode.
  • I am able to see my device from File explorer. I can copy photos from the phone to laptop, etc.
  • When I run adb devices command my device is recognized (and it is not in the offline mode)
  • I followed the troubleshooting instructions from the official page. My device is connected to the machine directly, I tried unplugging the USB cable multiple times and USB cable definitely works.
  • I tried to install OEM USB driver manually, but I am not allowed to replace the driver. This happens after I choose a new driver location enter image description here
  • Chrome DevTools recognize a device from my college. So, the problem is probably somehow related to specific device model, not to machine settings. In my case the device is Google Pixel 7 Pro

Any ideas?

Deneb answered 21/11, 2023 at 15:0 Comment(7)
You might want to follow my answer regarding adb and ChromeDevTools, but the fact that there is some connection is odd.Expunge
@MorrisonChang I am aware that Android Studio's adb can interfere with Chrome Remote Debugging, so I always follow what is suggested and that is not the problem in my case.Deneb
One suggestion is to use adb over WiFi to check the logcat AFTER the disconnect to see if there are any messages of note.Expunge
It must be a recent change because I am in the exact same position as you, it worked fine before and now it only acknowledges it upon disconnection. For reference, mine is the Pixel 6Endurant
I experience the same issue on Pixel 8 Pro and Ubuntu 23.10. It also works after restarting my phone, but fails again after unplugging and reconnecting USB.Cess
I'm facing the same problem with a Pixel 8, I wonder if it's because of the phone. Did you have to install Android SDK on your computer?Gerstein
I don't know if it's a bug or somethings with Pixels (I'm experiencing the same problem with the Pixel 8), but I've found out that closing the chrome://inspect tab, and reloading it, without touching the phone (just connected and on "Just charge" mode with USB debugging enabled), seems to work. It does took like 40 seconds or something to let you inspect the tabs, but they do appear kinda straightforward.Gerstein
E
0

The following steps result in something usable for me but it's not clear to me yet why this particular sequence seems to work:

  1. go to chrome://inspect/#devices on your desktop
  2. turn off "USB debugging" in the Android settings
  3. run "Revoke USB Debugging Authorizations" in the Android settings
  4. turn on USB debugging
  5. switch to Chrome and accept the request
  6. run "Revoke USB Debugging Authorizations" again
  7. switch to Chrome and accept the request again
Endurant answered 9/1 at 2:51 Comment(1)
Didn't help :( But restarting the phone fixed an issue.Socrates

© 2022 - 2024 — McMap. All rights reserved.