15 ms·
I used to defend snap with the idea that it makes sense for some apps, i.e. "firefox" where updating firefox while its running is bad news. Except, snap can't
by compsciphd 4y ago
I used to defend snap with the idea that it makes sense for some apps, i.e. "firefox" where updating firefox while its running is bad news.
Except, snap can't update applications while they are running!
i.e. try to do a snap refresh while firefox is running, nothing to update, because its running, quit it wait for all processes to die and then refresh, and it will update and cause you to wait 30-60s while it does it, and then you can restart firefox.
This has to be one of the most idiotic design decision ever made by a containerized application system showing the designers don't understand containerization at all.
one of the primary points of containerization is the ability to have multiple copies of an application running in parallel using different "application images". One should be able to upgrade (i.e. install a new image in parallel to the old one) without disrupting existing execution environments.
Basically all firefox has to do is
1) if a container is running for the current user, execute firefox in its context
2) if no container is running for the current user, create a new container
3) every so often, garbage collect old images that don't have containers running for them.
these concepts are so simple, even docker basically does it!
and that's my rant for the day.
- mxkopy 4y agoI thought it was really funny when I tried to update some stuff with the snap gui, and it threw the error - "Can't update snap-store, the application is running" or something like that
- cgriswald 4y ago> i.e. try to do a snap refresh while firefox is running, nothing to update, because its running, quit it wait for all processes to die and then refresh, and it will update and cause you to wait 30-60s while it does it, and then you can restart firefox. Oh, it's worse than that. When there is an update available but firefox is running you get: > % snap refresh > All snaps up to date. It doesn't even tell you there is an update and that you need to close firefox to get it. In fact, it tells you there isn't one.
- AaronFriel 4y agoThis seems broken, full stop. Can Firefox itself, when installed via Snap, notify the user that it needs security updates? If so, can users effectively do that, or do they have to know this incantation of closing, waiting, running a terminal command, and restarting?
- rbanffy 4y agoThat’s a step backwards. The whole point of package managers is that the system manages software updates and the software itself can be completely oblivious to that. Snap done properly it’d download and install the new version, point launchers to that and prompt the user to restart running snaps.
- a_t48 4y agoThis is what Slack does.
- noasaservice 4y ago> I used to defend snap with the idea that it makes sense for some apps, i.e. "firefox" where updating firefox while its running is bad news. > Except, snap can't update applications while they are running! What's worse is the unblockable notifications. And I just de-snapped my xubuntu 22.04 , and doing so upgraded firefox-snap v113 to their repo v116 ! I mean, I thought the purpose was fully updated. Evidently not. Snap needs to die in a fire. https://haydenjames.io/remove-snap-ubuntu-22-04-lts/ https://haydenjames.io/remove-snap-ubuntu-22-04-lts/
- binwiederhier 4y agoI've been on Ubuntu 22.04 for a few weeks now, and every now and then Firefox will create a popup notification that says "Firefox needs to be closed to update (12 days left)". When I close it and re-open, Firefox is still not updated. Even when I go to the Software Center and update all apps, it apparently doesn't update snaps. I'm not entirely sure if Firefox is updateable via the UI. It's truly awful; and that's coming from an Ubuntu lover.
- hellcow 4y agoYup, you need to shutdown firefox, open a terminal, run ‘sudo snap refresh’, wait for it to complete, then re-open firefox. Agreed that the process sucks :)
- PenguinCoder 4y agoDoes running a standard `apt update/upgrade` update the snap packages, even it they're in use?
- Avshalom 4y agoapt doesn't touch snaps at all afaict
- midoridensha 4y ago>Yup, you need to shutdown firefox, open a terminal, run ‘sudo snap refresh’, wait for it to complete, then re-open firefox. No, you don't need to do this at all. You need to shut down Firefox, open a terminal, run 'sudo snap remove firefox', then 'sudo apt install firefox', wait for it to complete, then re-open Firefox. (I might be missing a step here)
- lern_too_spel 4y agoThe step you're missing is to add the Firefox PPA. Ubuntu's Firefox deb is just a Snap installation script.
- thomaslord 4y agoFirefox is a particularly interesting case because it has a bunch of issues that only exist when it's installed via snap. I just recently ripped out the default snap version and installed via the official PPA, and Firefox seems to be running much smoother now. For basically any app I use that's installed via snap, I eventually run into a gamebreaking issue and have to remove the snap version and find a normal .deb to install from. Whether it's customization issues (setting up custom fonts in VS Code didn't work) or stability issues (the tab bar in Firefox windows freezing up), there always seems to be some kind of problem
- echelon 4y agoSnap makes sense, but it'll take time for the dust to settle. Just like Unity / Wayland. Applications like Firefox, IntelliJ, Chromium, etc. shouldn't be tied to system dependencies managed by apt. They should be entirely monolithic and hermetic. Long term this deb vs snap approach will make sense and be good for Desktop Linux.
- hsbauauvhabzb 4y agoI don’t disagree but that won’t change the fact that snap completely broke my Firefox workflow, and doesn’t gracefully allow me to restart Firefox (rather inconsistently have tabs crash unexpectedly). Snap is immature, and not ready for production deployment. The way Ubuntu/parent company have pushed snap has been damaging to its image.
- HideousKojima 4y agoIf you say so, but I don't see why it should be forced on Ubuntu users by Canonical until then.
- rbanffy 4y agoIt’s just 6 or 7 years. Give them time.
- theamk 4y agoIs snap enough of improvent over deb to replace it? Sometimes yes. Is snap enough of improvement of Flakpak to ignore community standard and deal witb all the user hostile craziness like non-removable updater? No way. I hope it goes the way of the Mir and upstart - replaced with a competitor and silently removed.
- eptcyka 4y ago> one of the primary points of containerization is the ability to have multiple copies of an application running in parallel using different "application images". One should be able to upgrade (i.e. install a new image in parallel to the old one) without disrupting existing execution environments. Would you like to run a completely new Firefox with a completely new profile whenever you update it? You do know that you can't use the same profile even with the same version of Firefox in two separate Firefox instances concurrently, right? If the updater was aware of snap and snap aware of the application it's updating, you could have a graceful update procedure that serializes the current state and reloads the new container, but that's a lot of hoops to jump through, and the jumping must be coordinated between multiple stakeholders.
- Dylan16807 4y agoThey're not asking for multiple uses of the same profile. Assuming one profile, then the old image would keep being used until firefox shuts down entirely, and once that happens the new image would be used the next time firefox is opened. You don't need to serialize or reload anything.
- amluto 4y agoNo, but the issue here seems to be a problem with the underlying snap system, not with the concept. It should be possible to have multiple containers that, when run, access the same persistent data. So the workflow would be: 1. Install and start Firefox. There is one container and one directory full of profiles. 2. Start the upgrade. This creates a second Firefox installation (container) sharing the same profile directory. 3. Try to run Firefox without quitting the old one. Does nothing because the runtime is smart enough to know that the old one is running. Maybe pop up a message suggesting restarting Firefox. 4. Quit Firefox. Start it again. The new one runs. All the data is still there. 5. The old installation goes away. The runtime has plenty of flexibility in how to make this work. There could be multiple containers. There could be one container with multiple parallel versions. There could be one container with a staged upgrade that can swap in essentially instantaneously once the container is idle (although this may fall apart on multi-user systems or where the containerized program regularly has multiple running copies of itself at once, e.g. a program like bash). But the fact that snap apparently has trouble with this seems a bit embarrassing.
- znpy 4y agoin the specific case of firefox, two different instances of firefox (no matter their version) cannot both use the same firefox profile at the same time (i tried). You either have to ask the user to restart firefox (that would be the sane choice) or corrupt user data. But i agree that snap sucks. Snap sucks particularly bad because they also push it where it's not only unnecessary but also detrimental to the user experience. Simple dumb example: i had gnome-calculator in my toolbar. I sometimes need to make basic calculations, it's easy and I keep it handy. I realized that gnome-calculator (a 500k binary) was taking 30 fcking seconds to appear. Turns out it was "updated" to a snap, and now launching it meant for stuff to be mounted around and for snap to do whatever it wanted with my time.
- curt15 4y agoFlatpak updates work pretty much the same way. The new version is installed into a parallel directory and takes effect the next time the application is restarted.
- tetha 4y agoSo I'm not nuts. My work laptop recently changed from Fedora using flatpak to Ubuntu using snap and with flatpak, I'd get a couple notifications "Hey, XYZ was updated" and on the next reboot, it was new. With snap, I have to shutdown the application, update it in a console and relaunch it. Meh.
- sumitgt 4y agoAgreed! Snap can't even update snap-store because it is running in the background. There is no way for a non-tech savvy person to even figure out how to get past that error.
- Jenk 4y agoPolite FYI: When a statement has many examples it is correct to use "e.g.," which is an abbreviation of _exempli gratia_, which in turn is Latin for "for example." For example: There are many emotions a person may feel, e.g., happiness. When a statement has only one logical conclusion it is correct to use "i.e.," which is the abbreviation of _id est_ which in turn is Latin for "that is." For example: It was the same colour as a clear summer's day sky, i.e., blue.
- teekert 4y agoTil, thanx.
- elgenie 4y agoMy mnemonic is "i.e." = "in essence" and "e.g." = "example given". The real phrases being abbreviated are, of course, the Latin ones.
- Brian-Puccio 4y agoMine mnemonic is use e.g. when you could say “for eg-zample” and use i.e. when you could say “that is” — ie to is. Admittedly, the second half isn’t as good as the first. : )
- eagsalazar2 4y agojeeze please stop! e.g. and i.e. both have come to interchangeably and loosely mean "for example" in the very broadest interpretation. Why? Because way back when people who wrote those things did agree on a specific and distinct meaning for each, a lot of other people who didn't share that understanding co-opted those abbreviations to mean "for example". That interpretation has now exploded in popularity. At this point that simple and shared definition for both is overwhelmingly used and understood by the vast majority of the population - which makes it "right". A historically held understanding of how a word, phrase, or abbreviation was commonly used does not mean that historical belief is right today. That's not how language works. It evolves and that is a good thing. Grammar prissiness is both misguided and futile because language will continue to beautifully evolve no matter how much you try to label that evolution as "incorrect".
- xorcist 4y agoIf it was that simple, why wouldn't the deb package work like this? There is no technical reason a new version of a software can't execute in parallel to the previous. Firefox can't do that. The simplest reason being that it is stateful and keeps records of history, bookmarks and whatnot which not only can't be accessed concurrently, but the specific storage model chosen can only be forward migrated. Accessing this data from two different versions of Firefox would inevitably lead to corrupt data, even when concurrency is not an issue. That's just the obvious reason with profiles. But there are also various other issues where Firefox interacts with the plugin system and other external data. All of these could probably be fixed, but it would require a radical redesign of the software which right now no one has stepped up to do. The least problematic method of using Firefox on Linux for most users is probably the official tarball. It's the trivial method of unpacking a software and running it from the destination folder. It has implications for freeness and DRM, and the obvious problems bundled dependencies bring, but Firefox is unusually well maintained software with the manpower to make it work. And containerization or producification on top of Firefox will only make it more complicated and worse supported than upstream is.
- compsciphd 4y agosimple binaries yes, firefox installs a whole lots of dynamically read stuff that is specific to the version installed (was more of an issue in the xul days, but I think still exists). i.e. you install a new firefox, the data on disk (i.e. file xyz) is no longer what the firefox version running expects and bad things happen. It could cache everything in memory (I guess) and never have to read anything from disk, after it starts up (relative to it, cache/cookies in local profile shouldn't matter in regards to disk). so when you update the deb you are replacing file 'xyz' and old xyz no longer exists (as opposed to unlinking and replacing "/usr/bin/firefox" as even though unlinked it will still exist (for paging purposes) until every execution of it terminates and only then will it actually be removed from the file system. this is where containerization can help on a "multi user" system, if everyone ran firefox in a container, every time they started it fresh, they would get the most up to date copy installed (in a non "multi user" setting, its less important, but can still have some value). (quotes because I mean multiple simultaneous desktop graphical desktop users, which if we're honest, most desktop linux users aren't doing).