Call for testing: chromium-browser deb to snap transition

Here is a real-life example of app developers concerned about the limitations of traditional linux packaging that I recently bumped into:

https://github.com/rstudio/rstudio/issues/3079

No matter whether they decide to go with snap, flatpak, appimage or whatever (although snap seems to have the winning hand), it’s obvious how pressing the issue is for them:

we are currently building no fewer than five different versions of RStudio Desktop for Linux:

Despite this somewhat cumbersome matrix we still don’t support many platforms and distributions.

I know this is a bit OT, but so are all sort digressions in this thread that I’m attempting to partially answer to by means of an example.

3 Likes

Ubuntu 19.10 user here, got the snap. Most things work fine (I had to snap connect chromium:password-manager-service manually to get my passwords back, the automated migration did not work).

There’s one bug I hadn’t seen mentioned before. I used to be able to pause/resume playback of YouTube videos by pushing the button on my Bluetooth headset. This no longer works. I’ve filed bug 1849105 about this.

I think it’s caused by the apparmor policy denying Chromium access to the MPRIS DBUS API:

dbus-daemon[4473]: apparmor=“DENIED” operation=“dbus_bind” bus=“session” name=“org.mpris.MediaPlayer2.chromium.instance5306” mask=“bind” pid=5306 label=“snap.chromium.chromium”
chromium_chromium.desktop[4596]: [5306:5650:1019/150035.747129:ERROR:bus.cc(555)] Failed to get the ownership of org.mpris.MediaPlayer2.chromium.instance5306: Connection “:1.116” is not allowed to own the service “org.mpris.MediaPlayer2.chromium.instance5306” due to AppArmor policy

I’d be happy to test workarounds for this if somebody told me where the apparmor files live so I could try updating them.

3 Likes

Thanks for the report Marius. You nailed it, it’s the MPRIS D-Bus API that requires an additional slot. I’ve added it and snaps are rebuilding now, you can expect the fix to be available tomorrow in the candidate channel.

2 Likes

Snap and Flatpak are completely different technologies with different goals. In no way is Flatpak “a standard.”

Anyway, initial versions of both Snap and Flatpak were released around the same time (Flatpak was then called xdg-app), with the difference of Snap having ancestors in Click packages from the Ubuntu Touch era (around 2013).

Both were heavily inspired by application image system called Klik.

Anyway, this thread really isn’t for discussion about what you like - read the title. Ubuntu forum is the right destination for your opinions on Snaps and Canonical.

3 Likes

You are free to have your opinion but this discourse is not a forum, it’s a work and collaboration place so please find another platform to post such messages.

Can we get this post withdrawed or deleted, it’s off topic and derailing the technical discussion happening.

3 Likes

as someone who worked on the initial snap implementation back then (still python based when we started snaps in 2014) i can tell you that we did neither look at nor know about “klik” at that time :slight_smile:

but all your other historical statements are 100% correct …

flatpak came to existence in 2016 (or rather the idling xdg-app development got picked up under new name), about a week after we announced desktop support for snaps (cli, daemon and server snap packages for IoT had existed for about two years at that time already)

5 Likes

Really? That’s interesting, I always thought Klik was an inspiration. I stand corrected than, thank you!

I have just upgraded my raspberry pi 4 on arm64 from 19.04 to 19.10.
The latest chromium-browser worked on 19.04
After the upgrade the snap chromium gives a title but black window
I have purged both chromium-browser and snapd then installed again.
from the command line I have
Failed to load module “canberra-gtk-module”
Draw call returned invalid argument. Expect corruption.

I installed libcanberra-gtk-module but no change
As my VSCODE relies on it, I am a bit stuck
What can I try to help diagnose further?

On Ubuntu 19.04,

web.whatsapp.com does not work in the snap, only in the apt package.

4 Likes

Has anyone had any problems with printing? Chromium from the snap won’t let me select the right printer. Firefox (no snap) works fine.

Details: I’ve like five or six printers in my system (because autodiscovery is a thing and coworkers’ laptops tend to advertise their home printers for some reason), but most of them are stopped to avoid being a distraction. There are two printers that are relevant to me:

  • the office printer
  • my home printer

I was trying to print a PDF from Google Drive at work today, and Chromium gave me only one option: my home printer (plus save to disk/google drive, but let’s ignore those). Actually, it’s even more interesting: Ctrl+Shift+P gave me the GTK print dialog with only that option, but a regular Ctrl+P gave me this native-looking Chromium dropdown that showed my office printer as an option but wouldn’t let me select it, automatically switching back to the home printer.

In case it matters, the home printer was selected as default in the system printers dialog. But nothing changed after I set the work printer as default and reloaded the Chromium tab.

I truly get it, but i don’t think creating an update script that detects deprecated debs and reinstalls them as snaps is that hard to do. It’s still intrusive but it turns out to be much more coherent in a long term.

You’ve just described what the apt package is doing.

Hi, I just upgrade for Ubuntu 19.10 and Chromium via snap.
Well, I lose all passwords that was saved in my Chromium browser.
Is there a way to restore those password ?

I am very interested in how you managed to access other partitions than $HOME. I think it is very limiting and unnecessary to introduce the restriction to $HOME and no other partitions and I don’t see how that really affects security.

@uniomni
If you do a search back you can see whatever I learnt about it in this thread (it was many months ago when snaps were introduced). It’ll point you to Bug #1832711 “[snap] chromium-browser accessing files outside /m...” : Bugs : chromium-browser package : Ubuntu

where Olivier (oSoMoN) states

If you connect the removable-media plug, you should be able to access files and directories mounted under /mnt and /media. That won’t resolve your issue with NFS shares seamlessly, but maybe you can mount them there?

Looking at that bug report I ran

snap connect chromium:removable-media

then I reported that drag&drop worked like it did before switch to snap.

I didn’t change my mounts as I didn’t want to, but I added an extra mount entry in /etc/fstab to load a my share in /mnt/ for the directories (NFS for me) that I wanted to be able to access in chromium. After that I had no issues (as this was 13-June-2019 my memory is a little faded… but what I did works for me equally well on my now Ubuntu 20.04).

Yes, you can regain access to all stored passwords if you allow the snap to access your password manager service with

snap connect chromium:password-manager-service

on the command line.

Alternatively you can do that from the Software Center: find Chromium, click the Permissions button and enable access to the password manager service.

1 Like

The keyring issue is https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1849160 which has a fix waiting for SRU review

2 Likes

Thank you very much, it’s works now.

Printing works for me today. I’m not sure what changed – snap autorefreshed the chromium snap yesterday in the background (causing another lost browsing session for me today, this is annoying, please fix that).

2 Likes

One question @oSoMoN: does the CVE-2019-13720 affects the Chromium snap too?
http://chromereleases.googleblog.com/2019/10/stable-channel-update-for-desktop_31.html
It seems that there are exploits in the wild for it

This move from deb to snap has broken a number of things that I would normally do with Chromium. I frequently use Chromium to navigate my system’s file hierarchy when doing web development, etc., and that’s no longer possible for files outside of $HOME, or inside dotted folders inside $HOME.

In addition, Jupyter relies on the browser being able to open a file in $HOME/.local/share/jupyter to open a session nicely in a browser.

This is enough of a problem for me to take the time to switch to Debian as my primary development environment, which is a shame, because Ubuntu has made some nice advances recently - this isn’t one of them.

1 Like