SwayNotificationCenter icon indicating copy to clipboard operation
SwayNotificationCenter copied to clipboard

[Bug] GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.erikreider.swaync.cc was not provided by any .service files Could not connect to CC service. Will wait for connection...

Open VehementHam opened this issue 1 year ago • 21 comments

Describe the bug

swaync-client returns an error:

GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.erikreider.swaync.cc was not provided by any .service files
Could not connect to CC service. Will wait for connection...

To Reproduce

Steps to reproduce the behavior:

  1. Install swaync on Alpine Linux.
  2. Run swaync.
  3. Do no have any other notification daemons running.
  4. Run a swaync-client command.

Expected behavior

swaync-client -t opens the window.

Error/Log

(process:24265): GLib-GIO-DEBUG: 12:35:23.971: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.erikreider.swaync.cc was not provided by any .service files
Could not connect to CC service. Will wait for connection...

Desktop

  • OS: Alpine Edge
  • Version: swaync 0.10.1

VehementHam avatar Apr 05 '24 17:04 VehementHam

Could you paste the log of swaync when starting with G_MESSAGES_DEBUG=all?

ErikReider avatar Apr 15 '24 21:04 ErikReider

G_MESSAGES_DEBUG=all swaync-client -t
(process:31304): GLib-GIO-DEBUG: 22:01:37.092: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.erikreider.swaync.cc was not provided by any .service files
Could not connect to CC service. Will wait for connection...

VehementHam avatar Apr 18 '24 03:04 VehementHam

G_MESSAGES_DEBUG=all swaync-client -t
(process:31304): GLib-GIO-DEBUG: 22:01:37.092: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.erikreider.swaync.cc was not provided by any .service files
Could not connect to CC service. Will wait for connection...

Not the client, swaync. The swaync executable is the main application while the swaync-client is only used to talk to the application

G_MESSAGES_DEBUG=all swaync

Have you started swaync?

ErikReider avatar Apr 18 '24 07:04 ErikReider

(swaync:14441): GLib-GIO-DEBUG: 19:18:13.856: _g_io_module_get_default: Found default implementation local (GLocalVfs) for ‘gio-vfs’
(swaync:14441): GLib-GIO-DEBUG: 19:18:13.856: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
(swaync:14441): GLib-GIO-DEBUG: 19:18:13.856: _g_io_module_get_default: Found default implementation keyfile (GKeyfileSettingsBackend) for ‘gsettings-backend’
(swaync:14441): Gdk-DEBUG: 19:18:13.865: Compositor prefers decoration mode 'server'
(swaync:14441): GLib-DEBUG: 19:18:13.866: unsetenv() is not thread-safe and should not be used after threads are created
** INFO: 19:18:13.920: functions.vala:180: Looking for config file in these directories:
	- /home/vehementham/.config/swaync/config.json
	- /etc/xdg/swaync/config.json
	- /usr/local/etc/xdg/swaync/config.json
** INFO: 19:18:13.920: functions.vala:180: Looking for config file in these directories:
	- /home/vehementham/.config/swaync/config.json
	- /home/vehementham/.config/swaync/config.json
	- /etc/xdg/swaync/config.json
	- /usr/local/etc/xdg/swaync/config.json
** Message: 19:18:13.920: configModel.vala:289: Loading Config: "/home/vehementham/.config/swaync/config.json"
** (swaync:14441): DEBUG: 19:18:13.921: configModel.vala:314: {
  "positionX" : "right",
  "positionY" : "top",
  "layer" : "overlay",
  "layer-shell" : true,
  "cssPriority" : "application",
  "timeout" : 10,
  "timeout-low" : 5,
  "timeout-critical" : 0,
  "transition-time" : 200,
  "keyboard-shortcuts" : true,
  "image-visibility" : "when-available",
  "notification-window-width" : 500,
  "hide-on-clear" : false,
  "hide-on-action" : true,
  "control-center-positionX" : "none",
  "control-center-positionY" : "none",
  "control-center-margin-top" : 0,
  "control-center-margin-bottom" : 0,
  "control-center-margin-left" : 0,
  "control-center-margin-right" : 0,
  "control-center-layer" : "top",
  "control-center-exclusive-zone" : true,
  "categories-settings" : {  },
  "notification-visibility" : {
    "example-name" : {
      "app-name" : "Spotify",
      "urgency" : "Low",
      "state" : "muted",
      "override-urgency" : "unset"
    }
  },
  "scripts" : {
    "example-script" : {
      "urgency" : "Normal",
      "exec" : "echo 'Do something...'",
      "run-on" : "receive"
    },
    "example-action-script" : {
      "urgency" : "Normal",
      "exec" : "echo 'Do something actionable!'",
      "run-on" : "action"
    }
  },
  "script-fail-notify" : true,
  "fit-to-screen" : true,
  "relative-timestamps" : true,
  "control-center-height" : 600,
  "control-center-width" : 500,
  "notification-2fa-action" : true,
  "notification-inline-replies" : false,
  "notification-icon-size" : 64,
  "notification-body-image-height" : 100,
  "notification-body-image-width" : 200,
  "widgets" : [
    "inhibitors",
    "title",
    "dnd",
    "notifications"
  ],
  "widget-config" : {
    "inhibitors" : {
      "text" : "Inhibitors",
      "button-text" : "Clear All",
      "clear-all-button" : true
    },
    "title" : {
      "text" : "Notifications",
      "clear-all-button" : true,
      "button-text" : "Clear All"
    },
    "dnd" : {
      "text" : "Do Not Disturb"
    },
    "label" : {
      "max-lines" : 5,
      "text" : "Label Text"
    },
    "mpris" : {
      "image-size" : 96,
      "image-radius" : 12
    },
    "buttons-grid" : {
      "actions" : [
        {
          "label" : "直",
          "type" : "toggle",
          "active" : true,
          "command" : "sh -c '[[ $SWAYNC_TOGGLE_STATE == true ]] && nmcli radio wifi on || nmcli radio wifi off'",
          "update_command" : "sh -c '[[ $(nmcli radio wifi) == \"enabled\" ]] && echo true || echo false'"
        }
      ]
    }
  }
}
** INFO: 19:18:13.921: functions.vala:138: Looking for CSS file in these directories:
	- /etc/xdg/swaync/style.css
	- /usr/local/etc/xdg/swaync/style.css
** Message: 19:18:13.921: functions.vala:86: Loading CSS: "/etc/xdg/swaync/style.css"
** INFO: 19:18:13.925: functions.vala:138: Looking for CSS file in these directories:
	- /home/vehementham/.config/swaync/style.css
	- /etc/xdg/swaync/style.css
	- /usr/local/etc/xdg/swaync/style.css
** Message: 19:18:13.925: functions.vala:100: Loading CSS: "/home/vehementham/.config/swaync/style.css"
** Message: 19:18:13.942: factory.vala:44: Loading widget: inhibitors
** Message: 19:18:13.942: factory.vala:44: Loading widget: title
** Message: 19:18:13.942: factory.vala:44: Loading widget: dnd

VehementHam avatar Apr 19 '24 00:04 VehementHam

Seems like you forgot to start swaync. Closing

ErikReider avatar Apr 19 '24 07:04 ErikReider

What do you mean? I told you the steps I took. This is a bug that needs to be fixed.

VehementHam avatar Apr 19 '24 15:04 VehementHam

What do you mean? I told you the steps I took. This is a bug that needs to be fixed.

The error is caused by the swaync executable not being started. You need to start swaync first before you can run swaync-client

ErikReider avatar Apr 21 '24 15:04 ErikReider

What do you mean? I told you the steps I took. This is a bug that needs to be fixed.

The error is caused by the swaync executable not being started. You need to start swaync first before you can run swaync-client

That is what I did. I ran swaync in one terminal, and then I ran swaync-client in another terminal. I can show you a screenshot: image

VehementHam avatar Apr 21 '24 22:04 VehementHam

Oh sorry for the misunderstanding. Haven't really encountered this issue before... Is DBUS correctly setup?

ErikReider avatar Apr 22 '24 00:04 ErikReider

I think so.

$ rc-service dbus status
 * status: started
$ echo "$DBUS_SESSION_BUS_ADDRESS\t $DBUS_SESSION_BUS_PID"
unix:path=/tmp/dbus-GSWLykM5Gc,guid=a99f9c65b9ddcd7860b4ac106625d3d3	26047

Not sure what exactly constitutes "correctly," but the service is running and $(dbus-launch) is automatically exported at the start of every shell session.

VehementHam avatar Apr 22 '24 03:04 VehementHam

The file /usr/share/dbus-1/services/org.erikreider.swaync.service exists.

VehementHam avatar Apr 22 '24 03:04 VehementHam

Look at src/client.vala. It seems to have some code relivent to checking for the service.

VehementHam avatar Apr 22 '24 03:04 VehementHam

This is the first time this issue has come up, so my guess would be that it's something up with your dbus... Can you check if the swaync service is alive with qdbusviewer-qt5?

ErikReider avatar May 03 '24 19:05 ErikReider

It doesn't appear to be. image image

VehementHam avatar May 05 '24 00:05 VehementHam

Also occurs with NixOS Unstable + Hyprland + Home Manager

donovanglover avatar Jul 11 '24 17:07 donovanglover

Seems to be fixed if I don't use the mpris widget with swaync

donovanglover avatar Jul 19 '24 16:07 donovanglover

It doesn't appear to be. image image

My session bus section is full of services while yours is empty. So my guess would be that your DBus isn't setup correctly? I'm on Fedora so never had to mess with setting up DBus before, so I'd be of no help here

ErikReider avatar Jul 28 '24 13:07 ErikReider