VLC Snap does not support Chromecast

Hi,

Posting this here for some insight as although the VLC Snap is maintained upstream, the community here might be able to spot the issue more rapidly and I can see about notifying the devs.

The Snapcraft.yaml for VLC is here.

Issue
Chromecast support is broken in the current VLC Snap.

Expected behaviour
When navigating to “Playback > Renderer” inside VLC, it should find Chromecast-type devices on the local subnet.

Actual behaviour
No Chromecast devices show up in the GUI but no error is visible there.

In a terminal, VLC complains about the lack of avahi daemon.

Output of snap run vlc when opening the “Playback > Renderer” menu:

[00007f12b8432d70] avahi renderer discovery error: failed to create avahi client: Daemon not running
[00007f12b8432d70] main renderer discovery error: no suitable renderer discovery module for 'avahi_renderer'

In contrast, the Flatpak version of VLC seems to work just fine.

The Snapcraft.yaml installs libavahi-client-dev as part of the build-packages stanza so I don’t think this is a case of Avahi support not being built into the final binary.

Is this just a case of VLC missing the :avahi-control interface?

snappy-debug suggests:

Log: apparmor="DENIED" operation="dbus_method_call"  bus="system" path="/" interface="org.freedesktop.DBus.Peer" member="Ping" mask="send" name="org.freedesktop.Avahi" pid=10211 label="snap.vlc.vlc" peer_pid=2047 peer_label="unconfined"
DBus access
Suggestion:
* try adding 'avahi-control' to 'plugs'
2 Likes

Good catch!

Unfortunately, since that plug isn’t declared in the upstream Snapcraft.yaml file, I can’t add it manually.

$ sudo snap connect vlc:avahi-control
error: snap "vlc" has no plug named "avahi-control"

I guess it is down to the upstream developers to fix this one in that case. I will file a bug on their bugtracker.

Edit: Done and posted here on the bugtracker.

1 Like

A quick debugging note is that if you want to try adding to an upstream snaps’ plugs, you can try this:

  1. Downloading the snap with snap download

  2. Unpack the snap with unsquashfs from the squashfs-tools package

  3. In the directory squashfs-tools/meta you will find a snap.yaml file

  4. Edit the snap.yaml file to add the plug you want

  5. try the snap with snap try squashfs-root

  6. Connect all the interfaces manually with snap connect (since the autoconnections will not process when installing in this mode)

HTH

3 Likes