Question: Classic Snap works in 20.04 but not in 21.04 (glibc and webkit2gtk error)

Hey snapcrafters,

I discovered a problem with my snap “soundux”. It works under 20.04 LTS but not under 21.04 which seems strange.
I think it has something to with the fact that it is a classic snap.

We use webkit2gtk and the window shows up but it’s blank and I get this in the terminal:

/snap/core20/current/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so)
Failed to load module: /usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so
/snap/core20/current/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /usr/lib/x86_64-linux-gnu/gvfs/libgvfscommon.so)
Failed to load module: /usr/lib/x86_64-linux-gnu/gio/modules/libgioremote-volume-monitor.so
Received invalid message: 'NetworkProcess_SetFraudPreventionValuesForTesting'

The GitHub repo containing the snapcraft.yaml is: https://github.com/Soundux/soundux-snap

I’m not sure what I can do about it. Any help is appreciated!

Hmm this looks like a process using core20 base attempts to load gio plugins (I guess it’s the usual behavior of gio) from a host system location. However those system modules were built with a newer libc. Makes sense why it fails.

Ideally, that snap should ship those gio plugins and set up gio module search path such that only modules from the snap get loaded. Looking at GIO docs GIO_MODULE_DIR make be a good candidate.

I added gvfs to the stage-packages and

environment:
      GIO_MODULE_DIR: /snap/core20/current/lib/x86_64-linux-gnu/gio/modules

to the app and the 2 gio related errors went away but the

Received invalid message: 'NetworkProcess_SetFraudPreventionValuesForTesting'

is still there and it’s still a blank window. So I guess it isn’t that critical for this issue.

Additional information: On a Debian 10 VM I get:

Received invalid message: 'WebProcess_InitializeWebProcess'

Another unrelated question I have: I added youtube-dl and ffmpeg to the stage-packages but for the program they are not available in the path. What is the correct way to add them?

Bump. We would like to offer our app as a snap, but this is still a problem. I would really appreciate any advice.

Publishing as a classic snap, notwithstanding the requirements for approval from the store admins, is a very complicated approach with many issues that you’ve started to discover. It is advisable to only use classic as a very last resort.

I would suggest you try making your snap strict and apply the desktop-3-38 extension.

1 Like