eonpatapon / mpDris2

MPRIS V2.1 support for mpd
GNU General Public License v3.0
211 stars 46 forks source link

Dbus error when starting mpDris2 #45

Closed sanjayankur31 closed 4 years ago

sanjayankur31 commented 11 years ago

I'm using the xdg autostart method to start mpDris2. It always crashes at login. Here's what I collected in logs by modifying the autostart command to include debug output. It looks like two logins. In one, mpd hadn't started yet (I'm using systemd --user to start mpd). In the other, it looks like the notifications daemon, or dbus object or something hadn't yet come up? I'm not quite sure. Any hints?

2005-01-07 13:58:02,352 mpDris2 INFO: Using file:///mnt/Miscellaneous/Music as music library path.
2005-01-07 13:58:02,359 mpDris2 ERROR: Could not connect to MPD: [Errno 111] Connection refused
2005-01-07 13:58:07,343 mpDris2 DEBUG: Sending command 'commands' (during idle? False)
2005-01-07 13:58:07,344 mpDris2 DEBUG: Sending command 'urlhandlers' (during idle? False)
Traceback (most recent call last):
  File "/usr/bin/mpDris2", line 266, in my_connect
    notification.rnotify(identity, _('Reconnected'))
  File "/usr/bin/mpDris2", line 612, in rnotify
    self._notification.show()
glib.GError: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface `org.freedesktop.Notifications' on object at path /org/freedesktop/Notifications
mpDris2: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.
2005-01-07 20:37:08,523 mpDris2 INFO: Using file:///mnt/Miscellaneous/Music as music library path.
2005-01-07 20:37:08,684 mpDris2 DEBUG: Sending command 'commands' (during idle? False)
2005-01-07 20:37:08,686 mpDris2 DEBUG: Sending command 'urlhandlers' (during idle? False)
2005-01-07 20:37:08,686 mpDris2 DEBUG: Connected to MPD server.
2005-01-07 20:37:08,687 mpDris2 DEBUG: Sending command 'status' (during idle? False)
2005-01-07 20:37:08,688 mpDris2 DEBUG: Sending command 'currentsong' (during idle? False)
2005-01-07 20:37:08,689 mpDris2 DEBUG: Sending command 'status' (during idle? False)
2005-01-07 20:37:08,690 mpDris2 DEBUG: Updated property: PlaybackStatus = Paused
2005-01-07 20:37:08,690 mpDris2 DEBUG: Updated property: Metadata = dbus.Dictionary({'xesam:album': 'Absolute Hair Metal Vol. 5', 'xesam:title': "Damned If We Do, Damned If We Don't", 'xesam:trackNumber': 6, 'xesam:contentCreated': '2006', 'mpris:trackid': dbus.ObjectPath('/org/mpris/MediaPlayer2/Track/66'), 'mpris:length': 230000000L, 'xesam:artist': ['Sleeze Beez'], 'xesam:url': "file:///mnt/Miscellaneous/Music/Discographies/Absolute Hair Metal Vol. 01-55/Absolute Hair Metal Vol. 05/06 Sleeze Beez - Damned If We Do, Damned If We Don't.mp3"}, signature=dbus.Signature('sv'))
Traceback (most recent call last):
  File "/usr/bin/mpDris2", line 1168, in <module>
    mpd_wrapper.run()
  File "/usr/bin/mpDris2", line 236, in run
    if self.my_connect():
  File "/usr/bin/mpDris2", line 297, in my_connect
    self.timer_callback()
  File "/usr/bin/mpDris2", line 379, in timer_callback
    self._update_properties()
  File "/usr/bin/mpDris2", line 482, in _update_properties
    notification.notify(title, _('by %s') % artist, uri)
  File "/usr/bin/mpDris2", line 606, in notify
    self._notification.show()
glib.GError: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface `org.freedesktop.Notifications' on object at path /org/freedesktop/Notifications
sanjayankur31 commented 11 years ago

After I've logged in, I can run mpDris2 & from a terminal, and that works just fine. I'm using version 0.4.