[Desktop-packages] [Bug 1890365] Re: [snap] Web Serial fails to access local device

2021-03-23 Thread edward sternin
Confirm resolved, after a system update, under snapd 2.49.1, the default
acees is "rwk" and WebUSB device access works.

Thanks, Olivier!

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to chromium-browser in Ubuntu.
https://bugs.launchpad.net/bugs/1890365

Title:
  [snap] Web Serial fails to access local device

Status in chromium-browser package in Ubuntu:
  Fix Released

Bug description:
  A javascript-based web page works fine when accessed through Chrome,
  fails to recognize that any devices exist when accessed from Chromium
  on the same Unubtu 20.04 platform.

  The code includes the following snippet:

  const requestOptions = {
  filters: [{ usbVendorId: 0x1881 }]
};
port = await navigator.serial.requestPort(requestOptions);
await port.open({ baudrate: 9600 });
writer = port.writable.getWriter();
reader = port.readable.getReader();

  Under Chrome 84.0.4147.105 (Official Build) (64-bit), ttyACM0 device
  is listed in the pop-up, is selectable, and can communicate.  Under
  Chromium 84.0.4147.105 (Official Build) snap (64-bit), the pop-up
  contains only "No compatible devices found" message.

  Experimental Web Features flag is enabled in both browsers.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1890365/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1890365] Re: [snap] Web Serial fails to access local device

2020-11-11 Thread edward sternin
Adding
  @{PROC}/tty/drivers r,
to /var/lib/snapd/apparmor/profiles/snap.chromium.chromium did the trick.

The file actually had rwk permissions set to TTY*, and ACM* (mine is one
of those), according to the comments in the file.

There was no output in journalctl.

This can be considered a fix, and a return to normal operation for
chromium. It should probably be changed for the distribution, not sure
who can do that.

Thanks.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to chromium-browser in Ubuntu.
https://bugs.launchpad.net/bugs/1890365

Title:
  [snap] Web Serial fails to access local device

Status in chromium-browser package in Ubuntu:
  New

Bug description:
  A javascript-based web page works fine when accessed through Chrome,
  fails to recognize that any devices exist when accessed from Chromium
  on the same Unubtu 20.04 platform.

  The code includes the following snippet:

  const requestOptions = {
  filters: [{ usbVendorId: 0x1881 }]
};
port = await navigator.serial.requestPort(requestOptions);
await port.open({ baudrate: 9600 });
writer = port.writable.getWriter();
reader = port.readable.getReader();

  Under Chrome 84.0.4147.105 (Official Build) (64-bit), ttyACM0 device
  is listed in the pop-up, is selectable, and can communicate.  Under
  Chromium 84.0.4147.105 (Official Build) snap (64-bit), the pop-up
  contains only "No compatible devices found" message.

  Experimental Web Features flag is enabled in both browsers.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1890365/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1890365] Re: [snap] Web Serial fails to access local device

2020-11-05 Thread edward sternin
'''
$ snap connections chromium | grep usb
raw-usb   chromium:raw-usb   :raw-usb manual
$ journalctl -f | grep chromium
Nov 05 18:41:42 XX audit[80101]: AVC apparmor="DENIED" operation="open" 
profile="snap.chromium.chromium" name="/proc/tty/drivers" pid=80101 
comm="ThreadPoolForeg" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0

... repeated several times 

Nov 05 18:42:05 XX polkitd(authority=local)[1133]: Operator of 
unix-session:c2 successfully authenticated as unix-user:X to gain TEMPORARY 
authorization for action io.snapcraft.snapd.manage-interfaces for 
unix-process:80462:133089573 [snap connect chromium:raw-usb] (owned by 
unix-user:X)
'''

The alert dialog reports "No compatible devices found"

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to chromium-browser in Ubuntu.
https://bugs.launchpad.net/bugs/1890365

Title:
  [snap] Web Serial fails to access local device

Status in chromium-browser package in Ubuntu:
  New

Bug description:
  A javascript-based web page works fine when accessed through Chrome,
  fails to recognize that any devices exist when accessed from Chromium
  on the same Unubtu 20.04 platform.

  The code includes the following snippet:

  const requestOptions = {
  filters: [{ usbVendorId: 0x1881 }]
};
port = await navigator.serial.requestPort(requestOptions);
await port.open({ baudrate: 9600 });
writer = port.writable.getWriter();
reader = port.readable.getReader();

  Under Chrome 84.0.4147.105 (Official Build) (64-bit), ttyACM0 device
  is listed in the pop-up, is selectable, and can communicate.  Under
  Chromium 84.0.4147.105 (Official Build) snap (64-bit), the pop-up
  contains only "No compatible devices found" message.

  Experimental Web Features flag is enabled in both browsers.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1890365/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


Re: [Desktop-packages] [Bug 1890365] Re: [snap] Web Serial fails to access local device

2020-11-05 Thread edward sternin
I do not understand your comment, perhaps because I do not understand
snap.

/etc/udev/rules.d for this device configure it to be 666, and it works 
fine under other browsers, so you are not talking about actual device 
access, you are talking about the mapping of this real device onto some 
virtual "raw-usb" device of the snap's sandbox ?

I did what you suggested, tried from the command line before and after 
launching chromium.  I had previously also turned off apparmor for 
chromium altogether (comment #4). None of these affected the outcome.

So, please explain how I "ensure that said interface is connected" for 
the purposes of the snap sandbox.

I can use chromium successfully for accessing the device under RedHat, 
so this is specifically a Ubuntu/Chromium bug/misfeature.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to chromium-browser in Ubuntu.
https://bugs.launchpad.net/bugs/1890365

Title:
  [snap] Web Serial fails to access local device

Status in chromium-browser package in Ubuntu:
  New

Bug description:
  A javascript-based web page works fine when accessed through Chrome,
  fails to recognize that any devices exist when accessed from Chromium
  on the same Unubtu 20.04 platform.

  The code includes the following snippet:

  const requestOptions = {
  filters: [{ usbVendorId: 0x1881 }]
};
port = await navigator.serial.requestPort(requestOptions);
await port.open({ baudrate: 9600 });
writer = port.writable.getWriter();
reader = port.readable.getReader();

  Under Chrome 84.0.4147.105 (Official Build) (64-bit), ttyACM0 device
  is listed in the pop-up, is selectable, and can communicate.  Under
  Chromium 84.0.4147.105 (Official Build) snap (64-bit), the pop-up
  contains only "No compatible devices found" message.

  Experimental Web Features flag is enabled in both browsers.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1890365/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


Re: [Desktop-packages] [Bug 1890365] Re: [snap] Web Serial fails to access local device

2020-11-03 Thread edward sternin
Made no difference.  Tried before or after launching the browser.

By the way, this bug is not there in edge.  Only Chromium.

On 10/30/20 12:27 PM, Olivier Tilloy wrote:
> Does the following help?
>
>  sudo snap connect chromium:raw-usb
>
> ** Changed in: chromium-browser (Ubuntu)
> Status: Expired => New
>
-- 
---------
Edward Sternin, Physics Department, Brock U, St.Catharines, Ontario, L2S 3A1
   http://www.physics.brocku.ca/People/Faculty/Sternin/
voice: (905)688-5550x3414  FAX:(905)984-4857  email: edward.ster...@brocku.ca

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to chromium-browser in Ubuntu.
https://bugs.launchpad.net/bugs/1890365

Title:
  [snap] Web Serial fails to access local device

Status in chromium-browser package in Ubuntu:
  New

Bug description:
  A javascript-based web page works fine when accessed through Chrome,
  fails to recognize that any devices exist when accessed from Chromium
  on the same Unubtu 20.04 platform.

  The code includes the following snippet:

  const requestOptions = {
  filters: [{ usbVendorId: 0x1881 }]
};
port = await navigator.serial.requestPort(requestOptions);
await port.open({ baudrate: 9600 });
writer = port.writable.getWriter();
reader = port.readable.getReader();

  Under Chrome 84.0.4147.105 (Official Build) (64-bit), ttyACM0 device
  is listed in the pop-up, is selectable, and can communicate.  Under
  Chromium 84.0.4147.105 (Official Build) snap (64-bit), the pop-up
  contains only "No compatible devices found" message.

  Experimental Web Features flag is enabled in both browsers.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1890365/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1890365] Re: [snap] Web Serial fails to access local device

2020-08-05 Thread edward sternin
Disabling apparmor for chromium

$ sudo ln -s /etc/apparmor.d/usr.bin.chromium-browser  /etc/apparmor.d/disable/
$ sudo apparmor_parser -R /etc/apparmor.d/disable/usr.bin.chromium-browser

had no effect.

Adding "/dev/tty* rw"  right below the line for "/dev/null rw" in
/etc/apparmor.d/disable/usr.bin.chromium-browser and removing/re-adding
the profile had no effect.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to chromium-browser in Ubuntu.
https://bugs.launchpad.net/bugs/1890365

Title:
  [snap] Web Serial fails to access local device

Status in chromium-browser package in Ubuntu:
  Incomplete

Bug description:
  A javascript-based web page works fine when accessed through Chrome,
  fails to recognize that any devices exist when accessed from Chromium
  on the same Unubtu 20.04 platform.

  The code includes the following snippet:

  const requestOptions = {
  filters: [{ usbVendorId: 0x1881 }]
};
port = await navigator.serial.requestPort(requestOptions);
await port.open({ baudrate: 9600 });
writer = port.writable.getWriter();
reader = port.readable.getReader();

  Under Chrome 84.0.4147.105 (Official Build) (64-bit), ttyACM0 device
  is listed in the pop-up, is selectable, and can communicate.  Under
  Chromium 84.0.4147.105 (Official Build) snap (64-bit), the pop-up
  contains only "No compatible devices found" message.

  Experimental Web Features flag is enabled in both browsers.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1890365/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1890365] Re: [snap] Web Serial fails to access local device

2020-08-05 Thread edward sternin
Also: it is chroME that is installed as a snap package, chroMIUM is
installed through apt-get, and it works just fine:

$ journalctl -f | grep chrome
Aug 05 15:26:57 slon dbus-daemon[782]: [system] Activating via systemd: service 
name='org.bluez' unit='dbus-org.bluez.service' requested by ':1.80' (uid=1000 
pid=3623 comm="/home/opt/google/chrome/chrome " label="unconfined")

and no additional messages as the "connect" button is clicked and the
serial device accessed.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to chromium-browser in Ubuntu.
https://bugs.launchpad.net/bugs/1890365

Title:
  [snap] Web Serial fails to access local device

Status in chromium-browser package in Ubuntu:
  Incomplete

Bug description:
  A javascript-based web page works fine when accessed through Chrome,
  fails to recognize that any devices exist when accessed from Chromium
  on the same Unubtu 20.04 platform.

  The code includes the following snippet:

  const requestOptions = {
  filters: [{ usbVendorId: 0x1881 }]
};
port = await navigator.serial.requestPort(requestOptions);
await port.open({ baudrate: 9600 });
writer = port.writable.getWriter();
reader = port.readable.getReader();

  Under Chrome 84.0.4147.105 (Official Build) (64-bit), ttyACM0 device
  is listed in the pop-up, is selectable, and can communicate.  Under
  Chromium 84.0.4147.105 (Official Build) snap (64-bit), the pop-up
  contains only "No compatible devices found" message.

  Experimental Web Features flag is enabled in both browsers.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1890365/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1890365] Re: [snap] Web Serial fails to access local device

2020-08-05 Thread edward sternin
The output is shown.  Please note that no additional lines show up when
I load the page that has that javascript code, or on clicking the button
that causes the connect attempt.  All of that output is already there.

$ journalctl -f | grep chromium
Aug 05 15:21:33 slon dbus-daemon[1410]: apparmor="DENIED" 
operation="dbus_method_call"  bus="session" 
path="/org/freedesktop/PowerManagement/Inhibit" 
interface="org.freedesktop.PowerManagement.Inhibit" member="Inhibit" 
mask="send" name="org.freedesktop.PowerManagement" pid=2802 
label="snap.chromium.chromium" peer_pid=2397 peer_label="unconfined"
Aug 05 15:21:34 slon dbus-daemon[1410]: apparmor="DENIED" 
operation="dbus_method_call"  bus="session" 
path="/org/freedesktop/PowerManagement/Inhibit" 
interface="org.freedesktop.PowerManagement.Inhibit" member="Inhibit" 
mask="send" name="org.freedesktop.PowerManagement" pid=2802 
label="snap.chromium.chromium" peer_pid=2397 peer_label="unconfined"
Aug 05 15:21:38 slon dbus-daemon[1410]: apparmor="DENIED" 
operation="dbus_method_call"  bus="session" 
path="/org/freedesktop/PowerManagement/Inhibit" 
interface="org.freedesktop.PowerManagement.Inhibit" member="Inhibit" 
mask="send" name="org.freedesktop.PowerManagement" pid=2802 
label="snap.chromium.chromium" peer_pid=2397 peer_label="unconfined"
Aug 05 15:21:43 slon dbus-daemon[1410]: apparmor="DENIED" 
operation="dbus_method_call"  bus="session" 
path="/org/freedesktop/PowerManagement/Inhibit" 
interface="org.freedesktop.PowerManagement.Inhibit" member="Inhibit" 
mask="send" name="org.freedesktop.PowerManagement" pid=2802 
label="snap.chromium.chromium" peer_pid=2397 peer_label="unconfined"
Aug 05 15:21:44 slon dbus-daemon[1410]: apparmor="DENIED" 
operation="dbus_method_call"  bus="session" 
path="/org/freedesktop/PowerManagement/Inhibit" 
interface="org.freedesktop.PowerManagement.Inhibit" member="Inhibit" 
mask="send" name="org.freedesktop.PowerManagement" pid=2802 
label="snap.chromium.chromium" peer_pid=2397 peer_label="unconfined"
Aug 05 15:21:44 slon dbus-daemon[1410]: apparmor="DENIED" 
operation="dbus_method_call"  bus="session" 
path="/org/freedesktop/PowerManagement/Inhibit" 
interface="org.freedesktop.PowerManagement.Inhibit" member="Inhibit" 
mask="send" name="org.freedesktop.PowerManagement" pid=2802 
label="snap.chromium.chromium" peer_pid=2397 peer_label="unconfined"
Aug 05 15:21:44 slon dbus-daemon[1410]: apparmor="DENIED" 
operation="dbus_method_call"  bus="session" 
path="/org/freedesktop/PowerManagement/Inhibit" 
interface="org.freedesktop.PowerManagement.Inhibit" member="Inhibit" 
mask="send" name="org.freedesktop.PowerManagement" pid=2802 
label="snap.chromium.chromium" peer_pid=2397 peer_label="unconfined"
Aug 05 15:21:46 slon dbus-daemon[1410]: apparmor="DENIED" 
operation="dbus_method_call"  bus="session" 
path="/org/freedesktop/PowerManagement/Inhibit" 
interface="org.freedesktop.PowerManagement.Inhibit" member="Inhibit" 
mask="send" name="org.freedesktop.PowerManagement" pid=2802 
label="snap.chromium.chromium" peer_pid=2397 peer_label="unconfined"
Aug 05 15:21:46 slon dbus-daemon[1410]: apparmor="DENIED" 
operation="dbus_method_call"  bus="session" 
path="/org/freedesktop/PowerManagement/Inhibit" 
interface="org.freedesktop.PowerManagement.Inhibit" member="Inhibit" 
mask="send" name="org.freedesktop.PowerManagement" pid=2802 
label="snap.chromium.chromium" peer_pid=2397 peer_label="unconfined"
Aug 05 15:21:46 slon dbus-daemon[1410]: apparmor="DENIED" 
operation="dbus_method_call"  bus="session" 
path="/org/freedesktop/PowerManagement/Inhibit" 
interface="org.freedesktop.PowerManagement.Inhibit" member="Inhibit" 
mask="send" name="org.freedesktop.PowerManagement" pid=2802 
label="snap.chromium.chromium" peer_pid=2397 peer_label="unconfined"
Aug 05 15:22:22 slon audit[2802]: AVC apparmor="DENIED" operation="open" 
profile="snap.chromium.chromium" name="/run/udev/data/c166:0" pid=2802 
comm="ThreadPoolForeg" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Aug 05 15:22:22 slon kernel: audit: type=1400 audit(1596655342.601:44): 
apparmor="DENIED" operation="open" profile="snap.chromium.chromium" 
name="/run/udev/data/c166:0" pid=2802 comm="ThreadPoolForeg" requested_mask="r" 
denied_mask="r" fsuid=1000 ouid=0
Aug 05 15:22:45 slon audit[782]: USER_AVC pid=782 uid=103 auid=4294967295 
ses=4294967295 msg='apparmor="DENIED" operation="dbus_method_call"  
bus="system" path="/" interface="org.freedesktop.DBus.ObjectManager" 
member="GetManagedObjects" mask="send" name="org.bluez" pid=3305 
label="snap.chromium.chromium"
Aug 05 15:22:45 slon kernel: audit: type=1107 audit(1596655365.450:45): pid=782 
uid=103 auid=4294967295 ses=4294967295 msg='apparmor="DENIED" 
operation="dbus_method_call"  bus="system" path="/" 
interface="org.freedesktop.DBus.ObjectManager" member="GetManagedObjects" 
mask="send" name="org.bluez" pid=3305 label="snap.chromium.chromium"

-- 
You received this bug notification because you are a member of Desktop
Packages, 

[Desktop-packages] [Bug 1890365] [NEW] Web Serial fails to access local device

2020-08-04 Thread edward sternin
Public bug reported:

A javascript-based web page works fine when accessed through Chrome,
fails to recognize that any devices exist when accessed from Chromium on
the same Unubtu 20.04 platform.

The code includes the following snippet:

const requestOptions = {
filters: [{ usbVendorId: 0x1881 }]
  };
  port = await navigator.serial.requestPort(requestOptions);
  await port.open({ baudrate: 9600 });
  writer = port.writable.getWriter();
  reader = port.readable.getReader();

Under Chrome 84.0.4147.105 (Official Build) (64-bit), ttyACM0 device is
listed in the pop-up, is selectable, and can communicate.  Under
Chromium 84.0.4147.105 (Official Build) snap (64-bit), the pop-up
contains only "No compatible devices found" message.

Experimental Web Features flag is enabled in both browsers.

** Affects: chromium-browser (Ubuntu)
 Importance: Undecided
 Status: New

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to chromium-browser in Ubuntu.
https://bugs.launchpad.net/bugs/1890365

Title:
  Web Serial fails to access local device

Status in chromium-browser package in Ubuntu:
  New

Bug description:
  A javascript-based web page works fine when accessed through Chrome,
  fails to recognize that any devices exist when accessed from Chromium
  on the same Unubtu 20.04 platform.

  The code includes the following snippet:

  const requestOptions = {
  filters: [{ usbVendorId: 0x1881 }]
};
port = await navigator.serial.requestPort(requestOptions);
await port.open({ baudrate: 9600 });
writer = port.writable.getWriter();
reader = port.readable.getReader();

  Under Chrome 84.0.4147.105 (Official Build) (64-bit), ttyACM0 device
  is listed in the pop-up, is selectable, and can communicate.  Under
  Chromium 84.0.4147.105 (Official Build) snap (64-bit), the pop-up
  contains only "No compatible devices found" message.

  Experimental Web Features flag is enabled in both browsers.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1890365/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp