Closed Bug 2038644 Opened 4 months ago Closed 3 months ago

Add helpful dev console message if Firefox doesn't have permission to access serial ports

Categories

(Core :: DOM: Web Serial, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
153 Branch
Tracking Status
firefox153 --- fixed

People

(Reporter: gstoll, Assigned: gstoll)

References

Details

Attachments

(1 file)

This can be a common problem on Linux, especially for Snap/Flatpak.

I assume to make this work we will want to look at what udev returns and see if we get failures to call open() with errno=13 (permission denied). However, in a log that did succeed in opening some ports, we still get some errno=13 errors for things like /dev/tty0.

So I want to make sure that

  • we do show this message if we only get permission denied errors
  • we do not show this message if the user has permission but there are no devices attached to any serial ports

Unfortunately I'm having a hard time reproducing the "not working" functionality on my linux system; installing a snap I built locally works fine (but an official beta snap does not). So I think I'm just going to add some logging for now in a dependent bug, wait for that to make its way to a real release, and reevaluate then.

Depends on: 2039060
See Also: → 2038075

I tested this on my Linux machine and verified that the message shows up
if I remove my permission to access /dev/ttyS0, etc.

Assignee: nobody → gstoll
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 153 Branch
Regressions: 2047275
QA Whiteboard: [qa-triage-done-c154/b153]
Component: DOM: Device Interfaces → Dom: Web Serial
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: