Open Bug 1075175 Opened 7 years ago Updated 1 year ago

"Operation failed: connecting to runtime: PROTOCOL_ERROR" with multiple Android / FxOS devices plugged in

Categories

(DevTools :: about:debugging, defect, P3)

x86
macOS
defect

Tracking

(Not tracked)

People

(Reporter: myk, Unassigned)

References

(Blocks 2 open bugs)

Details

Attempting to connect to an FxOS (Flame) device while an Android (Nexus 5) device is also plugged into my computer via USB results in a yellow notification bar warning: "Operation failed: connecting to runtime: PROTOCOL_ERROR", although the "Select Runtime" menu label gets replaced by the name of the FxOS device.

The Browser Console shows only:

> "Operation failed: connecting to runtime: PROTOCOL_ERROR" webide.js:269
> "PROTOCOL_ERROR" webide.js:253

The workaround is to unplug the Android device first, after which it's possible to connect to the FxOS device.  At that point, you can replug the Android device without busting the connection to the FxOS device.
The root cause here is that the ADB Helper add-on doesn't currently target its messages to a particular device, so everything fails if you have more than one plugged in.

It looks like replacing all instances of "host:" with "host-serial:<serial number>:" would fix this.
Summary: "Operation failed: connecting to runtime: PROTOCOL_ERROR" with both FxOS and Android devices plugged in → "Operation failed: connecting to runtime: PROTOCOL_ERROR" with multiple Android / FxOS devices plugged in
I've a similar error with WebIDE "Operation failed: connecting to runtime Firefox OS X.X" with all the version of simulator with the firefox developer edition.
Also with the app manager the simulator window is opened but is black and from the app manager result not connected.
(In reply to Daniele "Mte90" Scasciafratte from comment #2)
> I've a similar error with WebIDE "Operation failed: connecting to runtime
> Firefox OS X.X" with all the version of simulator with the firefox developer
> edition.
> Also with the app manager the simulator window is opened but is black and
> from the app manager result not connected.

These are two distinct issues.  Please file separate bugs for them.  Also, neither one is the same as this bug.  This is about connecting to multiple USB devices.
mwu has worked on adding this support in his branch[1].  I have not looked closely to see how complete it might be, but it could be a good start at least.

[1]: https://github.com/mozilla/adbhelper/compare/master...michaelwu:fix-multiple-devices
Component: Developer Tools: WebIDE → Developer Tools: about:debugging
About:debugging bug triage. Filter on TRIAGE-JD201705

Temporarily setting P3 to bugs migrated from webide to cleanup the triage for about:debugging.
Priority: -- → P3
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.