Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[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 this issue Apr 5, 2024 · 14 comments
Labels
bug Something isn't working

Comments

@VehementHam
Copy link

VehementHam commented Apr 5, 2024

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 VehementHam added the bug Something isn't working label Apr 5, 2024
@ErikReider
Copy link
Owner

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

@VehementHam
Copy link
Author

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
Copy link
Owner

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
Copy link
Author

(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
Copy link
Owner

Seems like you forgot to start swaync. Closing

@VehementHam
Copy link
Author

VehementHam commented Apr 19, 2024

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

@ErikReider
Copy link
Owner

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
Copy link
Author

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 ErikReider reopened this Apr 22, 2024
@ErikReider
Copy link
Owner

ErikReider commented Apr 22, 2024

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

@VehementHam
Copy link
Author

VehementHam commented Apr 22, 2024

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
Copy link
Author

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

@VehementHam
Copy link
Author

VehementHam commented Apr 22, 2024

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

@ErikReider
Copy link
Owner

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
Copy link
Author

It doesn't appear to be.
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants