Bug 395744 - MPRIS dataengine fails to add spotifyd as a MediaPlayer
Summary: MPRIS dataengine fails to add spotifyd as a MediaPlayer
Status: RESOLVED UPSTREAM
Alias: None
Product: plasmashell
Classification: Plasma
Component: Media Player (show other bugs)
Version: 5.13.0
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Kai Uwe Broulik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-22 11:27 UTC by Jagannathan Tiruvallur Eachambadi
Modified: 2018-08-04 01:54 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
journalctl log for plasmashell (5.09 KB, text/plain)
2018-06-25 11:36 UTC, Jagannathan Tiruvallur Eachambadi
Details
dbus-monitor output (14.59 KB, text/plain)
2018-06-25 12:58 UTC, Jagannathan Tiruvallur Eachambadi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jagannathan Tiruvallur Eachambadi 2018-06-22 11:27:10 UTC
During discovery plasma logs the following,

> kde.dataengine.mpris: "org.mpris.MediaPlayer2.spotifyd" does not implement org.freedesktop.DBus.Properties correctly Error message was "org.freedesktop.DBus.Error.NoReply" "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."

Both qtbus-qt5 and dbus-send work with org.mpris.MediPlayer2.PlayPause. Further down I found error coming from https://cgit.kde.org/plasma-workspace.git/tree/dataengines/mpris2/mpris2engine.cpp#n136 

Thanks for frinring for helping me narrow it down.
Comment 1 David Edmundson 2018-06-25 07:23:11 UTC
> Error message was "org.freedesktop.DBus.Error.NoReply" 

This means spotifyd simply didn't reply to our message. That's almost certainly spotifyd at fault.

>Both qtbus-qt5 and dbus-send work with org.mpris.MediPlayer2.PlayPause.

We know it was querying "org.freedesktop.DBus.Properties" at the time

So the relevant question is does that call work with dbus-send?
Comment 2 Jagannathan Tiruvallur Eachambadi 2018-06-25 11:36:59 UTC
Created attachment 113552 [details]
journalctl log for plasmashell

Can you please what call is that. FWIW I have seen more error messages and partial information on the plasmoid. I will upload a log.

Looking at the relevant file, it looks the QML file is able to read some of the data but is not able to determine whether it can control the player or not.
Comment 3 David Edmundson 2018-06-25 11:49:34 UTC
> kde.dataengine.mpris: "org.mpris.MediaPlayer2.mpv" does not implement org.freedesktop.DBus.Properties correctly 

This is the only line that matters

Can you run

qdbus org.mpris.MediaPlayer2.mpv /org/mpris/MediaPlayer2  org.freedesktop.DBus.Properties.GetAll org.mpris.MediaPlayer2

and

qdbus org.mpris.MediaPlayer2.mpv /org/mpris/MediaPlayer2  org.freedesktop.DBus.Properties.GetAll org.mpris.MediaPlayer2.Player
Comment 4 Jagannathan Tiruvallur Eachambadi 2018-06-25 12:02:46 UTC
Both commands work:
qdbus org.mpris.MediaPlayer2.spotifyd /org/mpris/MediaPlayer2  org.freedesktop.DBus.Properties.GetAll org.mpris.MediaPlayer2

CanQuit: true
CanRaise: false
HasTrackList: false
Identity: Spotifyd
SupportedUriSchemes: Spotify

qdbus org.mpris.MediaPlayer2.spotifyd /org/mpris/MediaPlayer2  org.freedesktop.DBus.Properties.GetAll org.mpris.MediaPlayer2.Player

CanControl: true
CanPause: true
CanPlay: true
CanSeek: true
LoopStatus: None
MaximumRate: 1
Metadata: mpris:length: 232078
xesam:album: Easier to Fade
xesam:artists: qdbus: I don't know how to display an argument of type '(ss)', run with --literal.
xesam:title: Easier to Fade
MinimumRate: 1
PlaybackStatus: Playing
Position: 156035
Rate: 1
Comment 5 David Edmundson 2018-06-25 12:46:28 UTC
Didn't expect that. It definitely failed when plasma tried.

Please can you get a log with dbus-monitor (or bustle) of plasma failing to interact wtih spotifyd.
Comment 6 Jagannathan Tiruvallur Eachambadi 2018-06-25 12:58:35 UTC
Created attachment 113554 [details]
dbus-monitor output

I restarted the spotifyd.service to get this output.
Comment 7 David Edmundson 2018-06-25 13:15:00 UTC
In that log:

We call GetAll

method call time=1529931340.671868 sender=:1.20 -> destination=org.mpris.MediaPlayer2.spotifyd serial=468 path=/org/mpris/MediaPlayer2; interface=org.freedesktop.DBus.Properties; member=GetAll
   string "org.mpris.MediaPlayer2"
method call time=1529931340.671957 sender=:1.20 -> destination=org.mpris.MediaPlayer2.spotifyd serial=469 path=/org/mpris/MediaPlayer2; interface=org.freedesktop.DBus.Properties; member=GetAll
   string "org.mpris.MediaPlayer2.Player"

There is no reply. (search for reply_serial=469)

I don't know why it gave you stuff from qdbus that one time, but it's clearly giving anything here. 

You'll need to take this up with spotifyd people.
Comment 8 David Edmundson 2018-06-25 13:24:20 UTC
*it's clearly not giving anything here
Comment 9 Jagannathan Tiruvallur Eachambadi 2018-06-25 15:03:36 UTC
Thanks for debugging this :) I will report it again, my last report was closed since they thought it worked with playerctl and qdbus.
Comment 10 David Edmundson 2018-06-25 15:05:09 UTC
can you link it here
Comment 11 Jagannathan Tiruvallur Eachambadi 2018-06-25 15:15:54 UTC
https://github.com/Spotifyd/spotifyd/issues/153