Open Bug 2035324 Opened 4 months ago Updated 1 month ago

Web Serial dialog incredibly slow to appear, seems worse after loading and closing and reconnecting usb devices lots of times. Also fails to accept mouse clicks on Allow (DPI windows WSL2 issue?)

Categories

(Core :: DOM: Web Serial, defect, P2)

defect

Tracking

()

UNCONFIRMED

People

(Reporter: tyethgundry, Unassigned, NeedInfo)

References

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36

Steps to reproduce:

You will need:

  1. a windows laptop with external monitor attached in Extended mode (different DPI / text scaling size)
  2. a remote linux machine (raspberry pi 2 zero W) with usb-serial device attached (an ESP32 microcontroller)

Start WSL2 in windows.
Install apt repo for firefox according to docs, then install firefox-nightly:
https://support.mozilla.org/en-US/kb/install-firefox-linux#w_install-firefox-deb-package-for-debian-based-distributions
Build usbip from source according to https://github.com/microsoft/WSL/issues/40259#issuecomment-4324133143

Connect to another machine (phyiscally or remotely) and on that "server" machine then load usbipd, then use usbip bind to bind one of the usb devices to the service, and look up the ip.

ssh pi@rpi-displays
usbipd -D
usbip list -l
usbip bind -b 1.1-1

Back on the WSL2 machine, browse the remote usb bound devices with usbip list --remote 192.168.234 and then attach one with usbip attach --remote 192.168.1.234 -b 1.1-1.
Finally on the wsl2 machine load firefox nightly, it should load on the laptop screen (or primary display). Use windows key + shift + arrow key left, to move to other monitor (possible crash).
Activate about:config, search serial, ensure gated:false, enabled: true, testing: false.
Restart firefox nightly if needed.
Use this url then bring up the serial dialog via connect (may take a while to appear):
https://espressif.github.io/esptool-js/
Clicking allow seems broken, and tab doesn't focus buttons.
Dropdown on page for baud rate opens with mouse and selections visually highlight but are ignored on click. Keyboard altering of dropdowns works fine.

Actual results:

Devices show, but cannot be used. Attempting the same in chromium browser works fine.

Expected results:

Mouse selection should work. Serial device dialog should appear instantly. Allow/Block in serial dialog should allow keyboard focusing.

Component: Untriaged → DOM: Device Interfaces
Product: Firefox → Core

The severity field is not set for this bug.
:cmartin, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(cmartin)
Severity: -- → S3
Flags: needinfo?(cmartin) → needinfo?(gstoll)
Priority: -- → P2

Thanks for the report! Can you get a profile starting before clicking the "Connect" button on that page with the Firefox Profiler?

It also may be worth trying again with the latest Nightly (or Release) build - there have been a few fixes that went in that may have helped this, although I'm not terribly optimistic.

Blocks: webserial
Flags: needinfo?(gstoll) → needinfo?(tyethgundry)
Component: DOM: Device Interfaces → Dom: Web Serial
You need to log in before you can comment on or make changes to this bug.