[remote-dbg-next] Add message or indicator in sidebar to show if USB scanning is enabled

RESOLVED FIXED in Firefox 64

Status

enhancement
P1
normal
RESOLVED FIXED
10 months ago
9 months ago

People

(Reporter: jdescottes, Assigned: jdescottes)

Tracking

(Blocks 1 bug)

unspecified
Firefox 64
Dependency tree / graph

Firefox Tracking Flags

(firefox64 fixed)

Details

Attachments

(5 attachments)

At the moment there is no indicator in about:debugging that USB device scanning is enabled. We will have a widget in the Connect page via https://bugzilla.mozilla.org/show_bug.cgi?id=1488506 but it feels wrong to force users to go to another screen to check status.

I think we can have a simple message for now in the sidebar, above the list of devices, to show the status of the USB scanner, and do a UX review in m2 before shipping. But I think we need something sooner rather than later.

+---------------------+
|                     |
|  This Firefox       |
|                     |
|  Connect            |
|                     |
| ------------------- |
| (USB scan disabled) |
|                     |
|  Network device 1   |
|                     |
|  Network device 2   |
|                     |
|       [ ... ]       |
|                     |
|  Network device N   |
|                     |
+---------------------+

+---------------------+
|                     |
|  This Firefox       |
|                     |
|  Connect            |
|                     |
| ------------------- |
| (USB scan enabled)  |
|                     |
|  USB device 1       |
|                     |
|  Network device 2   |
|                     |
|       [ ... ]       |
|                     |
|  Network device N   |
|                     |
+---------------------+

Or maybe we could have this message at the bottom of the sidebar?
See Also: → 1494552
It makes sense. I was leaning towards a scaled down version of what we have in the main panel, i.e. 'USB' plus a toggle switch.

But I guess we don't want folks to enable/disable from the sidebar?

If we have something saying "USB disabled" would clicking it take you to the page where you can enable it?
Once we have a way to disable/enable USB runtimes from the connect page, having a link in the message makes sense (Bug 1488506). For now let's just have a message.
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Priority: P2 → P1
We discussed this yesterday and this new message can be confusing, especially when we already show the "No Devices discovered". One suggestion from Harald is to have a different design based on  https://design.firefox.com/photon/components/message-bars.html. We could also make this message show only when USB devices scanning is disabled (with a link to the connect page?).

I think this deserves more discussions and experimentation so I would like to move forward with a simple version and have a follow up to decide on a better "temporary" design (before someone with actual UX skills can spend time on this :) )
Maybe we want to land the simplest solution for now and discuss
quickly how to style the message to reduce confusion in a follow up?
Depends on D8334.
In this changeset we also change the way we are reading the preferences
in adb-addon.js to avoid caching the value of the preference the first
time the module is loaded.

This allows the module to follow updates of said preferences without
having to restart Firefox.
Blocks: 1498279
Blocks: 1498469
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0d7e2a4ad360
Show USB devices status in sidebar;r=ladybenko
https://hg.mozilla.org/integration/autoland/rev/3e89e661031c
Add a mochitest test for status message;r=ladybenko
https://hg.mozilla.org/integration/autoland/rev/e9abf60db23b
Wait until ADB started in USB status sidebar test;r=daisuke
Backed out for OSX devtools failures.

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&searchStr=os,x,10.10,opt,mochitests,with,e10s,test-macosx64%2Fopt-mochitest-devtools-chrome-e10s-6,m-e10s(dt6)&fromchange=d5cc1ab5bb162464e4be7593e6a71d330faf3b51&tochange=1c6fa266a661d9cb37816e46537fb5664b9702c3&selectedJob=205742020

Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=205742020&repo=autoland&lineNumber=1064

Backout link: https://hg.mozilla.org/integration/autoland/rev/1c6fa266a661d9cb37816e46537fb5664b9702c3

02:04:08     INFO - TEST-INFO | Main app process: exit 0
02:04:08     INFO - runtests.py | Application ran for: 0:03:00.451776
02:04:08     INFO - zombiecheck | Reading PID log: /var/folders/4k/zy3xts4568l3gynvm4q9lms000000w/T/tmpLPprNapidlog
02:04:08     INFO - ==> process 861 launched child process 863
02:04:08     INFO - ==> process 861 launched child process 864
02:04:08     INFO - zombiecheck | Checking for orphan process with PID: 864
02:04:08     INFO - zombiecheck | Checking for orphan process with PID: 863
02:04:08     INFO -  Traceback (most recent call last):
02:04:08     INFO -    File "/Users/cltbld/tasks/task_1539677370/build/tests/mochitest/runtests.py", line 2819, in doTests
02:04:08     INFO -      marionette_args=marionette_args,
02:04:08     INFO -    File "/Users/cltbld/tasks/task_1539677370/build/tests/mochitest/runtests.py", line 2257, in runApp
02:04:08     INFO -      self.marionette.start_session()
02:04:08     INFO -    File "/Users/cltbld/tasks/task_1539677370/build/venv/lib/python2.7/site-packages/marionette_driver/decorators.py", line 36, in _
02:04:08     INFO -      m._handle_socket_failure()
02:04:08     INFO -    File "/Users/cltbld/tasks/task_1539677370/build/venv/lib/python2.7/site-packages/marionette_driver/marionette.py", line 814, in _handle_socket_failure
02:04:08     INFO -      reraise(exc, val, tb)
02:04:08     INFO -    File "/Users/cltbld/tasks/task_1539677370/build/venv/lib/python2.7/site-packages/marionette_driver/decorators.py", line 26, in _
02:04:08     INFO -      return func(*args, **kwargs)
02:04:08     INFO -    File "/Users/cltbld/tasks/task_1539677370/build/venv/lib/python2.7/site-packages/marionette_driver/marionette.py", line 1270, in start_session
02:04:08     INFO -      self.raise_for_port(timeout=timeout)
02:04:08     INFO -    File "/Users/cltbld/tasks/task_1539677370/build/venv/lib/python2.7/site-packages/marionette_driver/marionette.py", line 733, in raise_for_port
02:04:08     INFO -      self.host, self.port))
02:04:08     INFO -  timeout: Timed out waiting for connection on 127.0.0.1:2828!
02:04:08    ERROR - Automation Error: Received unexpected exception while running application
02:04:08    ERROR - 
02:04:08     INFO - Stopping web server
02:04:08     INFO - Stopping web socket server
02:04:08     INFO - Stopping ssltunnel
02:04:08  WARNING - leakcheck | refcount logging is off, so leaks can't be detected!
02:04:08     INFO - runtests.py | Running tests: end.
02:04:08     INFO - Buffered messages finished
02:04:08     INFO - Running manifest: devtools/client/inspector/test/browser.ini
02:04:08     INFO - The following extra prefs will be set:
02:04:08     INFO -   dom.animations-api.core.enabled=true
02:04:08     INFO -   dom.animations-api.timelines.enabled=true
02:04:08     INFO -  pk12util: PKCS12 IMPORT SUCCESSFUL
02:04:08     INFO - MochitestServer : launching [u'/Users/cltbld/tasks/task_1539677370/build/tests/bin/xpcshell', '-g', '/Users/cltbld/tasks/task_1539677370/build/application/Firefox Nightly.app/Contents/Resources', '-f', '/Users/cltbld/tasks/task_1539677370/build/tests/bin/components/httpd.js', '-e', "const _PROFILE_PATH = '/var/folders/4k/zy3xts4568l3gynvm4q9lms000000w/T/tmpVO4daS.mozrunner'; const _SERVER_PORT = '8888'; const _SERVER_ADDR = '127.0.0.1'; const _TEST_PREFIX = undefined; const _DISPLAY_RESULTS = false;", '-f', '/Users/cltbld/tasks/task_1539677370/build/tests/mochitest/server.js']
02:04:08     INFO - runtests.py | Server pid: 875
02:04:08     INFO - runtests.py | Websocket server pid: 876
02:04:08     INFO - runtests.py | SSL tunnel pid: 877
02:04:08     INFO - runtests.py | Running with e10s: True
02:04:08     INFO - runtests.py | Running with serviceworker_e10s: False
02:04:08     INFO - runtests.py | Running tests: start.
Flags: needinfo?(jdescottes)
Killing ADB after the test ends seems to fix the issue on try for me :https://treeherder.mozilla.org/#/jobs?repo=try&selectedJob=206019693&revision=caa11ed067a72c98fb455cdc0dff51ea2350cc38
Flags: needinfo?(jdescottes)
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bff7126ddd3f
Show USB devices status in sidebar;r=ladybenko
https://hg.mozilla.org/integration/autoland/rev/7c62247314d7
Add a mochitest test for status message;r=ladybenko
https://hg.mozilla.org/integration/autoland/rev/5729da1055e8
Wait until ADB started in USB status sidebar test;r=daisuke
Looks like the adb addon fails to open on Linux 32 for some reason. WebIDE has similar failures in its test suite, however since it is a chrome mochitest instead of a browser mochitest, the failure isn't picked up by the test harness. 

See https://taskcluster-artifacts.net/S7LwZoPyQbu_uDMT1dBheg/0/public/logs/live_backing.log 

[task 2018-10-17T07:59:20.563Z] 07:59:20     INFO - TEST-START | devtools/client/webide/test/test_addons.html
[task 2018-10-17T07:59:21.853Z] 07:59:21     INFO - WebIDE open
[task 2018-10-17T07:59:21.951Z] 07:59:21     INFO - TEST-PASS | devtools/client/webide/test/test_addons.html | ADB extension has been auto-installed 
[task 2018-10-17T07:59:21.968Z] 07:59:21     INFO - TEST-PASS | devtools/client/webide/test/test_addons.html | Warning about missing ADB hidden 
[task 2018-10-17T07:59:22.010Z] 07:59:22     INFO - TEST-PASS | devtools/client/webide/test/test_addons.html | No usb runtime listed 
[task 2018-10-17T07:59:22.014Z] 07:59:22     INFO - TEST-PASS | devtools/client/webide/test/test_addons.html | Warning about missing ADB present 
[task 2018-10-17T07:59:22.014Z] 07:59:22     INFO - Closing WebIDE
[task 2018-10-17T07:59:22.030Z] 07:59:22     INFO - WebIDE closed
[task 2018-10-17T07:59:22.047Z] 07:59:22     INFO - GECKO(4196) | MEMORY STAT vsizeMaxContiguous not supported in this build configuration.
[task 2018-10-17T07:59:22.048Z] 07:59:22     INFO - GECKO(4196) | MEMORY STAT | vsize 563MB | residentFast 258MB | heapAllocated 103MB
[task 2018-10-17T07:59:22.050Z] 07:59:22     INFO - GECKO(4196) | JavaScript error: resource://devtools/shared/base-loader.js -> resource://devtools/shared/adb/adb.js, line 104: NS_ERROR_ILLEGAL_VALUE: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIProcess.init]

So I propose to disable the tests for new aboutdebugging on linux32 until we can investigate this.
Flags: needinfo?(jdescottes)
Blocks: 1499638
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0fc18d6f9732
Show USB devices status in sidebar;r=ladybenko
https://hg.mozilla.org/integration/autoland/rev/8bdb7699a04c
Add a mochitest test for status message;r=ladybenko
https://hg.mozilla.org/integration/autoland/rev/51bea90a7500
Wait until ADB started in USB status sidebar test;r=daisuke
https://hg.mozilla.org/integration/autoland/rev/177dda6727fa
Disable new aboutdebugging tests on Linux 32;r=ladybenko
You need to log in before you can comment on or make changes to this bug.