Plexamp mpris bug

I’m using debian bullseye, with i3, and a desktop bar called i3status-rust that enables a block in the bar to “interact” with clients that implement like Plexamp the mpris interface.

I can for instance, while watching a youtube video in chrome, use the middle whell button of my mouse to advance the movie : under the hood the command would be :

busctl --user call org.mpris.MediaPlayer2.chromium.instance2962464 /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player Seek x 100

Should I want to do the same on the plexamp client, I would do the following, and it unfortunately crashes, see the trace:

❯ busctl --user call org.mpris.MediaPlayer2.Plexamp /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player Seek x 100
Call failed: Service error: The service threw an error.
TypeError: p.toNumber is not a function
    at F.value (/tmp/.mount_PlexamWiaGm0/resources/app.asar/main.js:2:339342)
    at handleMessage (/tmp/.mount_PlexamWiaGm0/resources/app.asar/node_modules/dbus-next/lib/service/handlers.js:305:28)
    at handleMessage (/tmp/.mount_PlexamWiaGm0/resources/app.asar/node_modules/dbus-next/lib/bus.js:100:14)
    at EventEmitter.<anonymous> (/tmp/.mount_PlexamWiaGm0/resources/app.asar/node_modules/dbus-next/lib/bus.js:110:9)
    at EventEmitter.emit (node:events:526:28)
    at /tmp/.mount_PlexamWiaGm0/resources/app.asar/node_modules/dbus-next/lib/connection.js:102:14
    at Socket.<anonymous> (/tmp/.mount_PlexamWiaGm0/resources/app.asar/node_modules/dbus-next/lib/message.js:55:9)
    at Socket.emit (node:events:526:28)
    at emitReadable_ (node:internal/streams/readable:578:12)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)

You could try using playerctl.

I have also noticed that Plexamp’s MPRIS controls do not work consistently in KDE, although they’re fine in XFCE… Playerctl to the rescue. :wink:

yes but it is the very same error, that doesnt do it since the client fails at implementing correctly mpris :wink:

❯ playerctl position 5+
Could not execute command: GDBus.Error:com.github.dbus_next.ServiceError: Service error: The service threw an error.
TypeError: p.toNumber is not a function
    at F.value (/tmp/.mount_PlexamWiaGm0/resources/app.asar/main.js:2:339342)
    at handleMessage (/tmp/.mount_PlexamWiaGm0/resources/app.asar/node_modules/dbus-next/lib/service/handlers.js:305:28)
    at handleMessage (/tmp/.mount_PlexamWiaGm0/resources/app.asar/node_modules/dbus-next/lib/bus.js:100:14)
    at EventEmitter.<anonymous> (/tmp/.mount_PlexamWiaGm0/resources/app.asar/node_modules/dbus-next/lib/bus.js:110:9)
    at EventEmitter.emit (node:events:526:28)
    at /tmp/.mount_PlexamWiaGm0/resources/app.asar/node_modules/dbus-next/lib/connection.js:102:14
    at Socket.<anonymous> (/tmp/.mount_PlexamWiaGm0/resources/app.asar/node_modules/dbus-next/lib/message.js:55:9)
    at Socket.emit (node:events:526:28)
    at emitReadable_ (node:internal/streams/readable:578:12)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)

Looks like we weren’t implementing the Seek action over MPRIS. This should be resolved in the next release. Thanks for the detailed report!

2 Likes

Thanks for the fast solving @aubrey.wodonga !

2 Likes

greetings @aubrey.wodonga I just tested 4.6.2 and it seems it has not the issue fixed, at least for me:

❯ busctl --user call org.mpris.MediaPlayer2.Plexamp /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player Seek x 100

Call failed: Service error: The service threw an error.
TypeError: p.toNumber is not a function
    at F.value (/tmp/.mount_PlexamEbwaw7/resources/app.asar/main.js:2:343120)
    at handleMessage (/tmp/.mount_PlexamEbwaw7/resources/app.asar/node_modules/dbus-next/lib/service/handlers.js:305:28)
    at handleMessage (/tmp/.mount_PlexamEbwaw7/resources/app.asar/node_modules/dbus-next/lib/bus.js:100:14)
    at EventEmitter.<anonymous> (/tmp/.mount_PlexamEbwaw7/resources/app.asar/node_modules/dbus-next/lib/bus.js:110:9)
    at EventEmitter.emit (node:events:526:28)
    at /tmp/.mount_PlexamEbwaw7/resources/app.asar/node_modules/dbus-next/lib/connection.js:102:14
    at Socket.<anonymous> (/tmp/.mount_PlexamEbwaw7/resources/app.asar/node_modules/dbus-next/lib/message.js:55:9)
    at Socket.emit (node:events:526:28)
    at emitReadable_ (node:internal/streams/readable:578:12)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)

Huh, that’s disappointing. It seems to be working fine on my end, but I’ve got a few ideas.

Leave it with me and I’ll look into it. Apologies for getting your hopes up prematurely :sweat_smile:

1 Like

hehe no worries, let me know you need me to send logs, whatever you’ll find useful !

greetings @aubrey.wodonga ! any news on this ? thanks :slight_smile:

4.7.0 still has the issue @aubrey.wodonga

Apologies for the delay, I haven’t forgotten. It turns out the proper solution is non-trivial and requires some more work to unblock. Hoping to have a solution soon :crossed_fingers:

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.