Call for help: maintenance of the musescore snap

Hi all! I’m the maintainer of the musescore snap, but right now I don’t have any free time to maintain it.
The code for the snap is on this repo:

There’s a new release of musescore (3.6), but the latest version I was able to compile was 3.5, and that doesn’t seem to work anymore since the latest updates to snapcraft.

If somebody is willing to make PRs to the repo I can test & approve them, but I think that it would be better to transfer the snap to the snapcrafters group, refine it, and then try to upstream it, but they didn’t seem very interested last time I tried:

ping @thomasbonte

Thanks for your help!

Thanks for the notice @pachulo! I forwarded the message on the MuseScore developer chat on Telegram.

If somebody is willing to make PRs to the repo I can test & approve them

Here you go for now, that gets 3.6 going:

As a musescore user I’d love to take a look, but I’m unsure how continuously I’ll find time. Also I’m probably using only 1/20th of the functions - so I might not be a good tester.

For the time being - to check how things work out - you can ping me on GH if needed and I’ll try to provide PRs for you. If we really at some point want to move it over I’m probably ok, but would like to have a talk about what steps you usually take after building a .snap to publish it.

And in the long run I agree, if the upstream Dev’s would pick it up that would be even better. I could still be pinged and try to help them just as much.

Thanks @cpaelzer!

Version 3.6 is on the beta/edge channel for anyone to try!

Hi, folks, I’m probably saying this in the wrong place and maybe in the wrong way, but I found this thread when I was searching for the right place to report that the MuseScore snap is broken.

Below I’ve appended the output of “snap info musescore” on my system. Despite supposedly getting the “latest/stable” version I got a version of 3.6.1 that seems to call itself “unstable” and is named “MuseScore3Developer” instead of “MuseScore3”. And when I tried to run it, it didn’t inherit any of the configuration or setup I had done on the prior version. That’s a major time sink for me; I just want to use the program, not spend a lot of time doing sysadmin work.

Did I do something wrong, or is the snap broken? How can I avoid problems like this? Is there some way to configure snap so I don’t get unstable and developer versions?

I would like to gently propose channeling this effort into a proper package that can be managed with apt, dpkg, etc. because snap seems very problematic for people like me who don’t want to spend all their time doing sysadmin. And even for people who do, it appears to be hard to configure and hard to control.

I think I found (and ran) a command to tell snap to switch me back to the prior version, and that seems like it worked, but based on snap doing things behind my back I’m worried now that it’s going to delete that working version out from under me. How do I prevent that? How do I tell it to always ask before updating anything and never do anything behind my back?

Also, after reverting to the older snap of MuseScore, when I try to run the new one I get a missing DSO:

$ /snap/musescore/190/usr/bin/mscore
/snap/musescore/190/usr/bin/mscore: error while loading shared libraries: libQt5QuickWidgets.so.5: cannot open shared object file: No such file or directory

It seems broken that both versions are taking up space on my machine but I can’t run them side by side to compare.

If I could get the latest stable version of MuseScore via “apt install” that would be ideal; it’s disappointing the version available that way is so old.

What is the correct procedure for reporting problems like this to get good results? I don’t know enough about snap to know whether I’m experiencing multiple independent problems that each need to be reported separately, or if this is fundamentally just one issue that has all these symptoms. I am grateful for everyone’s contribution but it makes me sad when my system breaks automatically and I have to stop working on music to figure out why.

Many thanks!

$ snap info musescore
name: musescore
summary: Create, play and print beautiful sheet music.
publisher: MuseScore✓
store-url: https://snapcraft.io/musescore
contact: https://musescore.org/en/support
license: unset
description: |
MuseScore is the world’s leading free and open-source software for writing
music, with a user-friendly interface and immensely powerful features.
It is free to install on Windows, Mac, and Linux.

Some interfaces need to be connected manually:

  $ sudo snap connect musescore:cups-control
  $ sudo snap connect musescore:network-manager
  $ sudo snap connect musescore:alsa
  $ sudo snap connect musescore:removable-media

But most of the application functionality works without them.
commands:

  • musescore.mscore
    snap-id: GmK6WCOqKsHaWLXKiXq4fPuVIqoI0nFR
    tracking: latest/stable
    refresh-date: today at 12:33 PST
    channels:
    latest/stable: 3.6.1 2021-01-29 (190) 183MB -
    latest/candidate: 3.6.1 2021-01-28 (190) 183MB -
    latest/beta: 3.6.1 2021-01-28 (190) 183MB -
    latest/edge: 3.6.1 2021-01-28 (190) 183MB -
    installed: 3.4.2 (169) 182MB -

you are calling it wrong … use what you find in /snap/bin or use the snap run ... command, do never call binaries in a snap directly …

i.e. for musescore:

/snap/bin/musescore.mscore

or

snap run musescore.mscore

normally /snap/bin should also be in your path so you should be able to just call musescore.mscore

Thanks for your help!

How do I run a different version from the “installed” one, though? The commands you give seem as if they will run the installed version. I want a command to run version 190 when version 169 is “installed”.

Note that 190 is on my machine, and was “installed” before I did a revert to switch back to the older version.

Are you trying to just switch to an older version or are you trying to have multiple versions installed at the same time?

Thanks for your reply!

Unfortunately I don’t understand the question because it seems the snap community uses the term “installed” as a kind of specialized internal lingo rather than the everyday meaning it has to most sysadmins.

So I’ll try to answer your question by describing what I really want. The list is bigger than just an answer to your question, but the list does contain my answer to your question, which is that when a binary that I’ve received via snap exists unpacked on my machine in executable form, I should be able to run it without reconfiguring my machine. So, for example, both versions 169 and 190 of the MuseScore snap are on my machine right now. Does this mean they are “installed?” I don’t know. But at least one of them is installed. Without changing what’s installed on my machine, I should be able to run both of those binaries (different versions of MuseScore) simultaneously, side by side on the machine. I think this is my answer to your question.

  1. Before changing any software on my machine, I want snap to present me with a list of proposed updates and let me decide whether to accept each one and choose when the updates are applied. In other words, I want it to act like apt can act when configured the way I prefer.

  2. I want to be confident that snap will not delete the version of MuseScore that I’m currently using because the new version seems to be broken.

  3. I want new versions of software installed with snap to inherit configuration / preferences / etc. from old versions that they are supposed to supplant or supersede.

  4. I want a snap containing a good (stable, non-developer, correctly configured build of) the latest version of MuseScore (3.6.1).

That’s several things, but I hope none of them are too crazy. It just seems like basic normal sysadmin stuff to me, but somehow (the current situation which includes) snap has taken all those basic things away, and when I google around for how to control snap I find only threads complaining about how it’s basically impossible to control properly because almost all its configuration is baked in, and what little configuration can be done at runtime is almost completely undocumented. :frowning:

Thanks again for helping!

just do a snap refresh musescore if you want to move forward again …

Thanks for that info!

How can I know when there’s a new version that I might want to move forward to?

well, you did call snap revert ... so you know you reverted from a newer installed version to the older installed one … refresh just rolls you forward to the lastest installed one again …

beyond this, it is all in the hands of the snap publisher, when she pushes out an update to a channel or track your are tracking and you are not currently rolled back, you will recieve it automatically.

to influence the automatic behaviour you have several options described on:

(there are special cases where snap publishers use the automatic self-test functionality of snaps where snaps roll back themselves automatically if the self test fails during upgrade, but thats (sadly) rarely used for desktop snaps and more typical for server snaps or apps on IoT devices)

Thanks for the pointer to that documentation. Unfortunately it confirms several perceptions that I had about snap that I feel are bugs.

To choose just one example, I can’t meaningfully query snap to see what the current setup is. If I do, I get empty information, like this:
$ sudo snap get system
Key Value
refresh {…}
seed {…}
$

And pretty much every item in that documentation explains some way in which snap will intentionally violate even the minimal configuration that I’m permitted to give it. Example: “After a refresh, the next refresh can be delayed by up to 60 days, after which a refresh will be performed regardless of the refresh.hold value.”

Additionally, the documentation itself has gaps that seem serious to me. One example is that, although that document explains that on my system the default behavior is to keep two versions of each snap, there is no information about what happens if I have reverted to the older version on my system and a new version becomes available. Am I forced off the old version which I had selected explicitly? If so, which of the newer versions becomes the “installed” one? Or does the newer version, the un-selected one in the case where I had reverted, get deleted in favor of adding the new one while retaining the one to which I had reverted explicitly? When such an update occurs, does my revert get undone so that I’m now using the new version, or does my revert still hold? Or if I revert, does it stop all automatic updates to that snap?

Those are important questions and I am disappointed that no answers seem available in the documentation, and that a system that seems somewhat immature (and also seems to be aimed against my goals as a sysadmin and user – so more maturity might make it worse, not better) has taken an uncomfortably large amount of control over the configuration of my machine without any good alternative.

Finally, there appears to be no way to get snap to do updates interactively, by which I mean that I would like a setup where it alerts me that updates are available and waits (an unlimited amount of time, possibly forever) until I say go ahead before installing them.

Aside from my concerns about snap UX in general, do you think anyone is likely to try to address the breakage of version 190 of the MuseScore snap?

Thanks again.

i personally report bugs usually via the contact link that is in the snap info output to get them fixed :wink:

Thanks, but I tried that. Their response was that they do not build snaps of MuseScore, that someone else does that and they are not responsible. They seem to share many of my concerns about snap and they seemed to hint that maybe I should try to avoid using it.

I don’t know why the “snap info” contact link is pointing to developers who do not support snap builds of their software.

well, looking at the snapcraft.yaml of this snap, the snap seems to just build the source from https://github.com/musescore/MuseScore from the latest stable tag and does not seem to patch it in any way and https://musescore.org/en/download says:

The latest stable version is 3.6.1

whatever makes it show “MuseScore3Developer” for you must have been added by the musescore developers …

What we would say about your machine is that you have multiple revisions of the MuseScore snap installed on your system, but only one of them is active right now. You can switch which revision is active amongst the revisions you have on your system using snap revert musescore --revision.

Parallel to all this, you can have multiple instances of a single snap, which are active and independent from each other. This means you would enable the parallel installs feature (which is still experimental actually), and then you could do this:

snap install musescore
snap install musescore_edge --edge

where edge there is the instance key, identifying a separate instance of the installation of musescore. Now you can run musescore or musescore_alt, and you can revert one of them to the older revision, etc. and keep one newer, etc. and they are independent instances of each other, with separate configuration, etc. This is the closest analog to what you expressed wanting with this quote:

That functionality is called parallel installs, and it only works when you have multiple parallel instances of a snap. Just having multiple revisions isn’t enough since you need to have multiple active revisions, and a single snap instance can have exactly one active revision.

Sorry that we don’t have this documented better, but I can explain to you the behavior:

  • If you have not used snap revert, then the older revisions go away as you upgrade
  • If you did use snap revert, the revision you reverted away from is marked as not usable and snapd will not refresh you to that revision, and that revision will be marked for garbage collection at some point. What happens then when a new refresh comes along, you will skip over the revision you reverted away from to the newest revision, and the revision you reverted away from should be garbage collected at this point if you are setup to only keep 2 revisions of each snap.

Snap data stored in certain directories such as $SNAP_DATA and $SNAP_USER_DATA is migrated forward to revisions, but not backwards to ensure that if the new version of the snap you upgraded to broke things in those directories, you can revert back and still have a working snap.

This will not happen as long as the revision you are using is active. After you refresh to another revision, it is marked inactive and will be garbage collected eventually when the number of revisions increases beyond the configured number of snaps that are retained (2 by default)

Thank you, that’s a lot of great information and indeed it seems to tell me how to do several things I was hoping would be possible.

One place where I’m confused is about the instance key. What is an instance key, and how do I find it? In the command “snap install musescore_edge --edge” you said “edge” is the instance key, so I presume I replace both occurrences of “edge” with the instance key in that command? I find that a little surprising but I guess it could work.

the “Instance Key” is simply the suffix to the name, you cant have an app called “musescore” twice on the system. the instance key is there to tell them apart, the --edge is only to show you can install the second one from a different channel:

snap install musescore_instancekey --edge

(you run the second installed version as “musescore_instancekey” instead of just “musescore” so the OS knows which one you want to start right now (they will happily run side by side))

Hi @RobertKennedy! And sorry for this late response. I will try to solve all the doubts I have answers for.

This is just some problem with the naming. If you take the git commit that it’s shown there, you will see that it’s the one for the stable release.

That, I don’t have an answer why. I’m sorry I can’t help more, but I don’t use MuseScore anymore, so my testing of new versions t it’s quite superficial.

Yep, that was me. I did this in my free time and with good faith, but this is official in a way, or at least one member of musescore was aware at the time and gave me permissions to publish snaps. That’s what I said that this should be moved to snapcrafters, that would make it clearer.

I can’t avoid problems from happening, but I’m sorry for your bad experience.