Giter Club home page Giter Club logo

Comments (18)

maru-sama avatar maru-sama commented on August 30, 2024

If i pause the track, I also see the pause symbol....
image

It looks like it is not showing anything as soon as it start playing.

from sp-tray.

esenliyim avatar esenliyim commented on August 30, 2024

Someone else reported something similar with the latest build on flatpak. Could you please tell me your Spotify version number?

from sp-tray.

maru-sama avatar maru-sama commented on August 30, 2024

Apparently the most recent snap
image

from sp-tray.

esenliyim avatar esenliyim commented on August 30, 2024

Right. Version 1.1.80 is working fine on Gnome 42. Considering the other report, I'm gonna assume .84 broke something for now. I'll start investigating as soon as I can, but in the meantime I'd appreciate it if you could check your gnome-shell logs and tell me what you see related to the extension, if anything. Any errors?

In case you're not sure how to do that, on Ubuntu you can use the command journalctl -f | grep gnome-shell.

from sp-tray.

maru-sama avatar maru-sama commented on August 30, 2024

Ok,

When I start up spotify this spams the logs

Apr 30 07:38:24 arthur gnome-shell[47609]: Object .SpTrayButton (0x5591f3e83070), has been already disposed — impossible to set any property on it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
Apr 30 07:38:24 arthur gnome-shell[47609]: == Stack trace for context 0x5591f018c4b0 ==
Apr 30 07:38:24 arthur gnome-shell[47609]: #0   5591f2320818 i   /home/maru/.local/share/gnome-shell/extensions/[email protected]/panelButton.js:234 (10f7843f81f0 @ 568)
Apr 30 07:38:24 arthur gnome-shell[47609]: #1   7ffcbdc68f20 b   self-hosted:1181 (34fc528b0a10 @ 492)

furthre down the logs this changes somewhat to

Apr 30 07:44:09 arthur gnome-shell[47609]: Object .SpTrayButton (0x5591f40a7d20), has been already disposed — impossible to set any property on it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
Apr 30 07:44:09 arthur gnome-shell[47609]: Object .SpTrayButton (0x5591f40a7d20), has been already disposed — impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
Apr 30 07:44:09 arthur gnome-shell[47609]: == Stack trace for context 0x5591f018c4b0 ==
Apr 30 07:44:09 arthur gnome-shell[47609]: #0   7ffcbdc68880 b   /home/maru/.local/share/gnome-shell/extensions/[email protected]/panelButton.js:234 (10f7843f81f0 @ 568)
Apr 30 07:44:09 arthur gnome-shell[47609]: #1   7ffcbdc68f20 b   self-hosted:1181 (34fc528b0a10 @ 492)
Apr 30 07:44:09 arthur gnome-shell[47609]: == Stack trace for context 0x5591f018c4b0 ==
Apr 30 07:44:09 arthur gnome-shell[47609]: #0   5591f2320818 i   resource:///org/gnome/shell/ui/panelMenu.js:145 (8da32282650 @ 19)
Apr 30 07:44:09 arthur gnome-shell[47609]: #1   7ffcbdc68880 b   /home/maru/.local/share/gnome-shell/extensions/[email protected]/panelButton.js:234 (10f7843f81f0 @ 568)
Apr 30 07:44:09 arthur gnome-shell[47609]: #2   7ffcbdc68f20 b   self-hosted:1181 (34fc528b0a10 @ 492)
Apr 30 07:44:09 arthur gnome-shell[47609]: Object .SpTrayButton (0x5591f1851550), has been already disposed — impossible to set any property on it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
Apr 30 07:44:09 arthur gnome-shell[47609]: == Stack trace for context 0x5591f018c4b0 ==
Apr 30 07:44:09 arthur gnome-shell[47609]: #0   7ffcbdc68e30 b   /home/maru/.local/share/gnome-shell/extensions/[email protected]/panelButton.js:234 (10f7843f81f0 @ 568)
Apr 30 07:44:09 arthur gnome-shell[47609]: #1   7ffcbdc68f20 b   self-hosted:1181 (34fc528b0a10 @ 492)
Apr 30 07:44:09 arthur gnome-shell[47609]: == Stack trace for context 0x5591f018c4b0 ==
Apr 30 07:44:09 arthur gnome-shell[47609]: #0   5591f2320818 i   resource:///org/gnome/shell/ui/panelMenu.js:145 (8da32282650 @ 19)
Apr 30 07:44:09 arthur gnome-shell[47609]: #1   7ffcbdc68e30 b   /home/maru/.local/share/gnome-shell/extensions/[email protected]/panelButton.js:234 (10f7843f81f0 @ 568)
Apr 30 07:44:09 arthur gnome-shell[47609]: #2   7ffcbdc68f20 b   self-hosted:1181 (34fc528b0a10 @ 492)
Apr 30 07:44:09 arthur gnome-shell[47609]: Object .SpTrayButton (0x5591f1851550), has been already disposed — impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
Apr 30 07:44:09 arthur gnome-shell[47609]: Object .SpTrayButton (0x5591f05068b0), has been already disposed — impossible to set any property on it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
Apr 30 07:44:09 arthur gnome-shell[47609]: Object .SpTrayButton (0x5591f05068b0), has been already disposed — impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
Apr 30 07:44:11 arthur gnome-shell[47609]: Object .SpTrayButton (0x5591f3e83070), has been already disposed — impossible to get any property from it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
Apr 30 07:44:11 arthur gnome-shell[47609]: Object .SpTrayButton (0x5591f3e83070), has been already disposed — impossible to set any property on it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
Apr 30 07:44:11 arthur gnome-shell[47609]: == Stack trace for context 0x5591f018c4b0 ==
Apr 30 07:44:11 arthur gnome-shell[47609]: #0   5591f2320818 i   /home/maru/.local/share/gnome-shell/extensions/[email protected]/panelButton.js:225 (10f7843f81f0 @ 389)
Apr 30 07:44:11 arthur gnome-shell[47609]: #1   7ffcbdc68f20 b   self-hosted:1181 (34fc528b0a10 @ 492)
Apr 30 07:44:11 arthur gnome-shell[47609]: == Stack trace for context 0x5591f018c4b0 ==
Apr 30 07:44:11 arthur gnome-shell[47609]: #0   5591f2320818 i   /home/maru/.local/share/gnome-shell/extensions/[email protected]/panelButton.js:226 (10f7843f81f0 @ 409)
Apr 30 07:44:11 arthur gnome-shell[47609]: #1   7ffcbdc68f20 b   self-hosted:1181 (34fc528b0a10 @ 492)
Apr 30 07:44:11 arthur gnome-shell[47609]: == Stack trace for context 0x5591f018c4b0 ==
Apr 30 07:44:11 arthur gnome-shell[47609]: #0   5591f2320818 i   /home/maru/.local/share/gnome-shell/extensions/[email protected]/panelButton.js:228 (10f7843f81f0 @ 455)
Apr 30 07:44:11 arthur gnome-shell[47609]: #1   7ffcbdc68f20 b   self-hosted:1181 (34fc528b0a10 @ 492)
Apr 30 07:44:11 arthur gnome-shell[47609]: Object St.Label (0x5591f0b812b0), has been already disposed — impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
Apr 30 07:44:11 arthur gnome-shell[47609]: == Stack trace for context 0x5591f018c4b0 ==
Apr 30 07:44:11 arthur gnome-shell[47609]: #0   5591f2320818 i   /home/maru/.local/share/gnome-shell/extensions/[email protected]/panelButton.js:225 (10f7843f81f0 @ 389)
Apr 30 07:44:11 arthur gnome-shell[47609]: #1   7ffcbdc68f20 b   self-hosted:1181 (34fc528b0a10 @ 492)
Apr 30 07:44:11 arthur gnome-shell[47609]: == Stack trace for context 0x5591f018c4b0 ==
Apr 30 07:44:11 arthur gnome-shell[47609]: #0   5591f2320818 i   /home/maru/.local/share/gnome-shell/extensions/[email protected]/panelButton.js:226 (10f7843f81f0 @ 409)
Apr 30 07:44:11 arthur gnome-shell[47609]: #1   7ffcbdc68f20 b   self-hosted:1181 (34fc528b0a10 @ 492)
Apr 30 07:44:11 arthur gnome-shell[47609]: == Stack trace for context 0x5591f018c4b0 ==
Apr 30 07:44:11 arthur gnome-shell[47609]: #0   5591f2320818 i   /home/maru/.local/share/gnome-shell/extensions/[email protected]/panelButton.js:228 (10f7843f81f0 @ 455)
Apr 30 07:44:11 arthur gnome-shell[47609]: #1   7ffcbdc68f20 b   self-hosted:1181 (34fc528b0a10 @ 492)
Apr 30 07:44:11 arthur gnome-shell[47609]: clutter_text_get_editable: assertion 'CLUTTER_IS_TEXT (self)' failed
Apr 30 07:44:11 arthur gnome-shell[47609]: == Stack trace for context 0x5591f018c4b0 ==
Apr 30 07:44:11 arthur gnome-shell[47609]: #0   5591f2320818 i   /home/maru/.local/share/gnome-shell/extensions/[email protected]/panelButton.js:225 (10f7843f81f0 @ 389)
Apr 30 07:44:11 arthur gnome-shell[47609]: #1   7ffcbdc68f20 b   self-hosted:1181 (34fc528b0a10 @ 492)
Apr 30 07:44:11 arthur gnome-shell[47609]: == Stack trace for context 0x5591f018c4b0 ==
Apr 30 07:44:11 arthur gnome-shell[47609]: #0   5591f2320818 i   /home/maru/.local/share/gnome-shell/extensions/[email protected]/panelButton.js:226 (10f7843f81f0 @ 409)
Apr 30 07:44:11 arthur gnome-shell[47609]: #1   7ffcbdc68f20 b   self-hosted:1181 (34fc528b0a10 @ 492)
Apr 30 07:44:11 arthur gnome-shell[47609]: == Stack trace for context 0x5591f018c4b0 ==
Apr 30 07:44:11 arthur gnome-shell[47609]: #0   5591f2320818 i   /home/maru/.local/share/gnome-shell/extensions/[email protected]/panelButton.js:228 (10f7843f81f0 @ 455)
Apr 30 07:44:11 arthur gnome-shell[47609]: #1   7ffcbdc68f20 b   self-hosted:1181 (34fc528b0a10 @ 492)
Apr 30 07:44:11 arthur gnome-shell[47609]: clutter_text_get_text: assertion 'CLUTTER_IS_TEXT (self)' failed

Which is repeating.

from sp-tray.

maru-sama avatar maru-sama commented on August 30, 2024

Ignore, my last comment please.
I completely removed the extension restarted the session and now these messages are gone. There is no output now when I start or stop spotify

from sp-tray.

maru-sama avatar maru-sama commented on August 30, 2024

I guess I found the reason, I put a little debug "log" in isReallySpotify and got the following results...

Apr 30 08:08:07 arthur gnome-shell[73164]: {"mpris:trackid":{},"mpris:length":{},"mpris:artUrl":{},"xesam:album":{},"xesam:albumArtist":{},"xesam:artist":{},"xesam:autoRating":{},"xesam:discNumber":{},"xesam:title":{},"xesam:trackNumber":{},"xesam:url":{}}

I get the same regardless of pausing, playing or changing the track. So it is no surprise that the extension hides as soon as playing starts.

from sp-tray.

maru-sama avatar maru-sama commented on August 30, 2024

Listening on the DBus I see the following entries though...

signal time=1651300033.319665 sender=:1.105 -> destination=(null destination) serial=86 path=/org/mpris/MediaPlayer2; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
   string "org.mpris.MediaPlayer2.Player"
   array [
      dict entry(
         string "Metadata"
         variant             array [
               dict entry(
                  string "mpris:trackid"
                  variant                      string "/com/spotify/track/21fjKtDSUc4tjBKNsFFgW3"
               )
               dict entry(
                  string "mpris:length"
                  variant                      uint64 347576000
               )
               dict entry(
                  string "mpris:artUrl"
                  variant                      string "https://i.scdn.co/image/ab67616d0000b273d32dbcd38053981c45eb3b97"
               )
               dict entry(
                  string "xesam:album"
                  variant                      string "Mega Dis - EP"
               )
               dict entry(
                  string "xesam:albumArtist"
                  variant                      array [
                        string "Bomb The Bass"
                     ]
               )
               dict entry(
                  string "xesam:artist"
                  variant                      array [
                        string "Bomb The Bass"
                     ]
               )
               dict entry(
                  string "xesam:autoRating"
                  variant                      double 0.26
               )
               dict entry(
                  string "xesam:discNumber"
                  variant                      int32 1
               )
               dict entry(
                  string "xesam:title"
                  variant                      string "Bug Powder Dust - 2013 Redusted"
               )
               dict entry(
                  string "xesam:trackNumber"
                  variant                      int32 2
               )
               dict entry(
                  string "xesam:url"
                  variant                      string "https://open.spotify.com/track/21fjKtDSUc4tjBKNsFFgW3"
               )
            ]
      )
   ]
   array [
   ]

from sp-tray.

esenliyim avatar esenliyim commented on August 30, 2024

Yeah that'd do it. This is what the trackid field in the dbus reply looks like in version 1.1.80:

dict entry(
    string "mpris:trackid"
    variant                string "spotify:track:1R6b8rKPXRihtAO1iHpQw4"
)

It starts with spotify: which is what I use to check if the reply is coming from Spotify. In your comment the value of that dict entry starts with /com/spotify/. That could be what broke the extension.

The object has already been disposed messages are another issue. Thought I'd fixed that one.

from sp-tray.

maru-sama avatar maru-sama commented on August 30, 2024

But what I do not understand is why metadata is when I do log(Json.stringify(metadata)).

So dbus-monitor shows the values but the code gets an empty result

from sp-tray.

esenliyim avatar esenliyim commented on August 30, 2024

What command did you use to listen on dbus exactly?

And what do you get when you do it with dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:org.mpris.MediaPlayer2.Player string:Metadata

from sp-tray.

maru-sama avatar maru-sama commented on August 30, 2024

Ok, dbus-send looks totally fine

dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:org.mpris.MediaPlayer2.Player string:Metadata
method return time=1651305437.130831 sender=:1.92 -> destination=:1.107 serial=62 reply_serial=2
   variant       array [
         dict entry(
            string "mpris:trackid"
            variant                string "/com/spotify/track/6zSe7ZKNjb6Zl5AP78y5QN"
         )
         dict entry(
            string "mpris:length"
            variant                uint64 278600000
         )
         dict entry(
            string "mpris:artUrl"
            variant                string "https://i.scdn.co/image/ab67616d0000b27329f78a4b85ca5abc839b96e2"
         )
         dict entry(
            string "xesam:album"
            variant                string "Streetsoul"
         )
         dict entry(
            string "xesam:albumArtist"
            variant                array [
                  string "Guru's Jazzmatazz"
               ]
         )
         dict entry(
            string "xesam:artist"
            variant                array [
                  string "Guru's Jazzmatazz"
               ]
         )
         dict entry(
            string "xesam:autoRating"
            variant                double 0.43
         )
         dict entry(
            string "xesam:discNumber"
            variant                int32 1
         )
         dict entry(
            string "xesam:title"
            variant                string "Plenty"
         )
         dict entry(
            string "xesam:trackNumber"
            variant                int32 6
         )
         dict entry(
            string "xesam:url"
            variant                string "https://open.spotify.com/track/6zSe7ZKNjb6Zl5AP78y5QN"
         )
      ]

In the code I did the following:

              //spotify is active and returning dbus thingamajigs
                let metadata = this.spotifyProxy.Metadata;
                log(JSON.stringify(this.spotifyProxy));
                log(JSON.stringify(this.spotifyProxy.Metadata));

and there the result is....

Apr 30 10:00:48 arthur gnome-shell[103146]: {"PlaybackStatus":"Playing","Metadata":{"mpris:trackid":{},"mpris:length":{},"mpris:artUrl":{},"xesam:album":{},"xesam:albumArtist":{},"xesam:artist":{},"xesam:autoRating":{},"xesam:discNumber":{},"xesam:title":{},"xesam:trackNumber":{},"xesam:url":{}}}
Apr 30 10:00:48 arthur gnome-shell[103146]: {"mpris:trackid":{},"mpris:length":{},"mpris:artUrl":{},"xesam:album":{},"xesam:albumArtist":{},"xesam:artist":{},"xesam:autoRating":{},"xesam:discNumber":{},"xesam:title":{},"xesam:trackNumber":{},"xesam:url":{}}

So this comes up emtpy, or is stringify not the correct method here?

from sp-tray.

esenliyim avatar esenliyim commented on August 30, 2024

Yeah, stringify doesn't play very well with dbus replies. It gets the keys of the dict entries but the values look like empty objects. That's not new, always has been that way. I get the same thing when I stringify them, but they still work.

from sp-tray.

maru-sama avatar maru-sama commented on August 30, 2024

I was wanted to reply that stringify does not seem to work. So yes the metadata seems to be all there, just the spotify detection logic is now longer working due to the changed trackid.. it is now

/com/spotify/track....
/com/spotify/episode....

I made a small change in the detection logic and now it works fine, of course this will now break with older spotify versions...
image

The icon in front is still a question mark though..

from sp-tray.

esenliyim avatar esenliyim commented on August 30, 2024

The change doesn't necessarily have to break anything. Should be pretty straightforward checking against both string formats.

The icon is supposed to be the Spotify logo, but it doesn't work properly on snap/flatpak builds. The problem is known to me. You can disable it in the extension settings.

from sp-tray.

maru-sama avatar maru-sama commented on August 30, 2024

What i meant is that my change is not pull-request worthy since it just replaces the old string format with the new one, but yes doing a conditional test for this shouldn't be too complex.

from sp-tray.

maru-sama avatar maru-sama commented on August 30, 2024

One last question.
I only see the text once the song changes. When spotify is started both {artist} and {title} are apparently empty, is this normal?

from sp-tray.

maru-sama avatar maru-sama commented on August 30, 2024

Ignore the last question, during startup only "Album" is send Artis and title are both emtpy.

from sp-tray.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.