Following official docs for cups results in invalid plug warnings


Following @alexmurray’s suggestion, we switched from using cups-control to cups in Brave.

We used code from the official documentation and now snap reports a warning saying

snap “brave” has bad plugs or slots: content (content plug must contain target path)

What should we do about that?

@soumyaDghosh suggested replacing the target with a different path. We can of course do that, but if that’s indeed what we should do, then the official docs would also require updating.

I assume the warning doesn’t break anything, but we definitely want to fix it.


I wonder if this is perhaps either an issue with the documentation or with snapd itself - @till.kamppeter @degville @pedronis perhaps you can comment?

I can reproduce this - it appears to work fine however:

[amurray:~] $ snap info brave
name:      brave
summary:   Browse faster and safer with Brave.
publisher: Brave Software (brave✓)
license:   GPL-2.0+ OR MPL-2.0
description: |
  The new Brave browser automatically blocks ads and trackers, making it
  faster and safer than your current browser. This package is official.
snap-id: uE3hSmGE91m9MpbDEnUWi2vpeumH6gmv
  latest/stable:    1.57.57 2023-08-30 (270) 165MB -
  latest/candidate: 1.57.57 2023-08-30 (270) 165MB -
  latest/beta:      1.57.57 2023-08-30 (270) 165MB -
  latest/edge:      1.57.57 2023-08-30 (270) 165MB -
[amurray:~] 2s $ sudo snap install brave
[sudo] password for amurray: 
2023-08-31T10:26:47+09:30 INFO snap "brave" has bad plugs or slots: content (content plug
must contain target path)
2023-08-31T10:26:49+09:30 INFO snap "brave" has bad plugs or slots: content (content plug
must contain target path)
brave 1.57.57 from Brave Software (brave✓) installed
WARNING: There is 1 new warning. See 'snap warnings'.
[amurray:~] 40s $ snap connections brave
Interface                 Plug                            Slot                            Notes
audio-playback            brave:audio-playback            :audio-playback                 -
audio-record              brave:audio-record              -                               -
bluez                     brave:bluez                     -                               -
browser-support           brave:browser-sandbox           :browser-support                -
camera                    brave:camera                    :camera                         -
content                   brave:foo-install-cups          -                               -
content[gnome-42-2204]    brave:gnome-42-2204             gnome-42-2204:gnome-42-2204     -
content[gtk-3-themes]     brave:gtk-3-themes              gtk-common-themes:gtk-3-themes  -
content[icon-themes]      brave:icon-themes               gtk-common-themes:icon-themes   -
content[sound-themes]     brave:sound-themes              gtk-common-themes:sound-themes  -
cups                      brave:cups                      cups:cups                       -
desktop                   brave:desktop                   :desktop                        -
desktop-legacy            brave:desktop-legacy            :desktop-legacy                 -
gsettings                 brave:gsettings                 :gsettings                      -
home                      brave:home                      :home                           -
joystick                  brave:joystick                  -                               -
mount-observe             brave:mount-observe             -                               -
mpris                     -                               brave:mpris                     -
network                   brave:network                   :network                        -
network-bind              brave:network-bind              :network-bind                   -
network-manager           brave:network-manager           -                               -
opengl                    brave:opengl                    :opengl                         -
password-manager-service  brave:password-manager-service  -                               -
pulseaudio                brave:pulseaudio                :pulseaudio                     -
raw-usb                   brave:raw-usb                   -                               -
removable-media           brave:removable-media           :removable-media                -
screen-inhibit-control    brave:screen-inhibit-control    :screen-inhibit-control         -
system-packages-doc       brave:system-packages-doc       -                               -
u2f-devices               brave:u2f-devices               :u2f-devices                    -
unity7                    brave:unity7                    :unity7                         -
upower-observe            brave:upower-observe            :upower-observe                 -
wayland                   brave:wayland                   :wayland                        -
x11                       brave:x11                       :x11                            -
WARNING: There is 1 new warning. See 'snap warnings'.

What is odd about this is I don’t get the same warning if I install the chromium snap, which defines the same plug…

I, as the creator of the official documentation, never have seen such a warning and learned about its existence only by this thread.

So if you have a way to improve the current solution so that the warning goes away, please tell.

Alright, so it seems like there’s a bug, or at least an issue with the docs. What now? Is there an issue for this I can follow? I can file a bug report, if one doesn’t exist yet, if that helps.

In any case, we still need a solution - something to resolve the warning and prevent others from running into the same thing with their snaps.

@alexmurray @till.kamppeter please advise, or tag someone who can, it’s been 2 weeks and users are reporting this

Whilst I could reproduce this, I couldn’t see any obvious cause - I am hoping @pedronis may be able to provide some guidance here.

2 months have passed with no hint of a solution, so we reverted from cups to cups-control. I assume the auto-connection we had will still apply. If not, please re-instate it.