Mobile device recognised by ADB or by Chrome dev tools but not by both

My android device can be recognised by adb but not by Chrome development tools. If I keel the adb server, then the device is recognised by Chrome dev tools. I cannot use Chrome for remote debugging
ADB was installed through Android Studio
My Mac environment:
ADB: Android Debug Bridge version 1.0.39
Version 0.0.1-4500957
Installed as /Users/xxx/Library/Android/sdk/platform-tools/adb
Chrome: Version 66.0.3359.181 (Official Build) (64-bit)
Through adb kill-server the device is visible in Chrome
Whenever execute adb start-server, and then adb devices the result is:
List of devices attached
ECPBBCB6C3105088 device

I’m struggling with this for some time. Any suggestions?

App unable to make requests to localhost though port forwarding is working

I’m trying to debug my Android app built with cordova over USB.

My device is showing up in adb and chrome://inspect and I’ve port forwarded the device to connect to localhost:9000.
I have confirmed that the port forwarding is working, since I can access localhost:9000 from Chrome on the device.

However when the app tries tp make a request to localhost:9000, I get a 404 (Not Found) error.
I can copy the same address the app is trying to access and it opens correctly in Chrome on the device and also through the address bar of the webview inspector in Chrome devtools on my dev machine.

Why is my app unable to connect to localhost when Chrome can?

Getting chrome developer tools to work with Android webview over USB

I’m having serious trouble getting chrome developer tools (Chrome 63, on Windows) to connect to an android phone to debug a webview. Here’s what I have:

  • The USB driver is correctly installed.
  • The device has authorized the host PC, so when I plug it in, adb devices lists it as available: MPIUUS4170723000660 device. I can interact with it using Android Studio, upload and run programs, etc.
  • The application I’m installing is a Cordova app, which is built in debug mode.
  • When I open Chrome developer tools, initially it isn’t listed in the “devices” list.
  • Running adb kill-server causes it to become listed, but the description is:

    Offline #MPIUUS4170723000660
    Pending authentication: please accept debugging session on the device.
  • Despite the “please accept debugging session” prompt, there is no request for accepting the session visible on the device.

  • If I disconnect and reconnect the device, adb automatically restarts, and the device disappears from Chrome’s list. Running adb kill-server again, the device briefly appears as online, but after about a second returns to the Offline/Pending authentication state.

What do I need to do to get this connected up to the device?