8000 [Bug]: navigator.serial.getPorts() returns an empty list if device is unplugged and replugged · Issue #29366 · electron/electron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[Bug]: navigator.serial.getPorts() returns an empty list if device is unplugged and replugged #29366
Closed
@gniezen

Description

@gniezen

Preflight Checklist

Electron Version

12.0.7

What operating system are you using?

Ubuntu

Operating System Version

5.4.0-73-generic #82~18.04.1-Ubuntu

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

const existingPermissions = await navigator.serial.getPorts(); should return a list of serial ports for which permission has already been granted, even when a device has been unplugged and plugged back in again.

Actual Behavior

The list is empty, even when the same code works in the browser (Chromium v90.0.4430.93).

Testcase Gist URL

https://gist.github.com/gniezen/34950a5fa84dcf000e2b55a8d599ecd6

Additional Information

To reproduce using gist:

  • Replace usbVendorId and usbProductId with that of your test device.
  • Click the Connect button. It should show up in the port list on the main console.
  • Click the Get Ports button. It should show the existing permission in the developer console.
  • Unplug and re-plug the device.
  • Click the Get Ports button. It should show the existing permissions, but returns an empty list.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0