Android Chrome crashing while inspecting over USB with nodejs library (chrome-remote-interface)
Reported by
kunalaut...@gmail.com,
Mar 22 2018
|
|||
Issue descriptionSteps to reproduce the problem: 1. Connect mobile to PC/Mac with ADB port forwarding to 9222 2. Try accessing "http://localhost:9222/json/protocol" 3. This is crashing chrome in mobile What is the expected behavior? This should fetch protocol What went wrong? Well actual use case is to established a connection using nodejs library (chrome-remote-interface). Further discussion over Github issue lead to this observation. Please see below link https://github.com/cyrus-and/chrome-remote-interface/issues/332 Did this work before? N/A Chrome version: 65.0.3325.109 Channel: stable OS Version: 7.1.1 Flash Version: I can confirm this is not working with android chrome version 63 & 64 also.
,
May 7 2018
I wasn't able to repro this locally. Could you provide more details please? - How do you setup port forwarding? - Do you run desktop chrome (or any other) with --remote-debugging-port? - Do you enter the url to a desktop or mobile chrome? - What is the exact version of desktop Chrome and mobile Chrome?
,
May 7 2018
I'm not the OP but I'm able to reproduce this.
- How do you setup port forwarding?
adb forward tcp:9222 localabstract:chrome_devtools_remote
- Do you run desktop chrome (or any other) with --remote-debugging-port?
No, in fact there's no desktop Chrome instance running.
- Do you enter the url to a desktop or mobile chrome?
No, I simply run:
$ curl http://localhost:9222/json/protocol
curl: (52) Empty reply from server
- What is the exact version of desktop Chrome and mobile Chrome?
Mobile: 66.0.3359.126
Desktop: 66.0.3359.139 (but not used)
---
In short this is enough to reproduce this issue:
1. attach the phone via the USB cable to the PC (this assuming that the USB debugging is enabled);
2. unlock the phone and open Chrome;
3. in a terminal run: adb forward tcp:9222 localabstract:chrome_devtools_remote
4. in a terminal run: curl http://localhost:9222/json/protocol
On the phone appears the message: "Unfortunately, Chrome has stopped."
,
May 7 2018
Thanks for following up! I'll try to repro locally. Note that "this should fetch protocol" won't happen - we do not bundle protocol on the mobile device. I can fix the crash though :) Do you really need to fetch protocol from a mobile device? Perhaps, working around through browser version and git commit hash is fine?
,
May 7 2018
> Note that "this should fetch protocol" won't happen - we do not bundle protocol on the mobile device. Oh, this is new to me. > Do you really need to fetch protocol from a mobile device? Well the rationale is the same as being able to fetch the protocol from a desktop Chrome, that is to make sure that the client (e.g., chrome-remote-interface) knows what features are available in the instrumented Chrome. There's really no differences from this point of view IMO. > Perhaps, working around through browser version and git commit hash is fine? What is an *easy* way for users to manually fetch the proper protocol given the version and/or hash? chrome-remote-interface comes with a bundled version which is fetched from time to time from the ChromeDevTools/devtools-protocol repo, but there's no guarantee that it will work fine with the Chrome version at hand. |
|||
►
Sign in to add a comment |
|||
Comment 1 by eostroukhov@chromium.org
, Mar 22 2018Status: Assigned (was: Unconfirmed)