ErikReider / SwayNotificationCenter

A simple GTK based notification daemon for SwayWM
GNU General Public License v3.0
1.15k stars 58 forks source link

[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... #414

Open VehementHam opened 2 months ago

VehementHam commented 2 months ago

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

ErikReider commented 2 months ago

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

VehementHam commented 2 months ago
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...
ErikReider commented 2 months ago
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?

VehementHam commented 2 months ago
(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
ErikReider commented 2 months ago

Seems like you forgot to start swaync. Closing

VehementHam commented 2 months ago

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

ErikReider commented 2 months ago

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

VehementHam commented 2 months ago

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

ErikReider commented 2 months ago

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

VehementHam commented 2 months ago

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 commented 2 months ago

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

VehementHam commented 2 months ago

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

ErikReider commented 1 month ago

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?

VehementHam commented 1 month ago

It doesn't appear to be. image image