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

Fails to play any track, "GStreamer error: Could not get/set settings from/on resource." #388

Closed
PureTryOut opened this issue May 22, 2024 · 34 comments
Labels
A-spotifyaudiosrc Area: spotifyaudiosrc (GStreamer/librespot)

Comments

@PureTryOut
Copy link

Any other extension (like YouTube and SoundCloud) work fine, Mopidy only fails to play Spotify tracks with this cryptic error.

This is using 5.0.0a2

@kingosticks
Copy link
Member

I've had this a couple of times but when I try and track it down, it magically resolves itself after a while. So my current theory is that it's some transient Spotify error, and the error messaging from librespot back to Mopidy is very poor (hoping to improve that). You can try to run with GST_DEBUG=3 to see if there are any hints (https://docs.mopidy.com/stable/troubleshooting/#debugging-gstreamer)

@PureTryOut
Copy link
Author

Ah that helped, suddenly the problem was very obvious 😅

0:06:23.713442473     2 0x7ff4e6218b30 ERROR        spotifyaudiosrc audio/spotify/src/spotifyaudiosrc/imp.rs:238:<gstspotify::spotifyaudiosrc::imp::SpotifyAudioSrc as gstreamer_base::subclass::push_src::PushSrcImpl>::create:<source> failed to start: Login failed with reason: Bad credentials
0:06:23.713585291     2 0x7ff4e6218b30 WARN                 basesrc gstbasesrc.c:3177:gst_base_src_loop:<source> error: Internal data stream error.
0:06:23.713597968     2 0x7ff4e6218b30 WARN                 basesrc gstbasesrc.c:3177:gst_base_src_loop:<source> error: streaming stopped, reason error (-5)
0:06:23.713647658     2 0x7ff4e6218b30 WARN                oggdemux gstoggdemux.c:4775:gst_ogg_demux_send_event:<oggdemux0> error: EOS before finding a chain
0:06:23.713828961     2 0x7ff4e6218b30 WARN                oggdemux gstoggdemux.c:2550:gst_ogg_demux_sink_event:<oggdemux0> EOS while trying to retrieve chain, seeking disabled

It seems my credentials have changed at some point (I know the password, I guess I just forgot that I changed it). I re-authenticated with the new credentials and now it works.

If only the error wasn't so vague 😅 "Login failed with reason: Bad credentials" would be way more useful.

@kingosticks
Copy link
Member

Actually, in this case, I'm not sure why the error doesn't propagate through to Mopidy logging given it's coming through as a gstreamer Error, which we are setup to catch. I'll see if I can get to the bottom of that.

@jaedb
Copy link

jaedb commented Jul 30, 2024

Any luck getting to the bottom of this? I'm experiencing this issue too:

DEBUG    2024-07-30 04:10:38,486 [8:MainThread] mopidy.audio.gst
  Got ERROR bus message: error=GLib.Error('Could not get/set settings from/on resource.', 'gst-resource-error-quark', 13) debug='audio/spotify/src/spotifyaudiosrc/imp.rs(329): <gstspotify::spotifyaudiosrc::imp::SpotifyAudioSrc as gstreamer_base::subclass::push_src::PushSrcImpl>::create (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin3/GstSpotifyAudioSrc:source:\nLogin failed with reason: Bad credentials'

This is with refreshed tokens, reset password, etc.

@PureTryOut
Copy link
Author

I can reproduce this again since yesterday.

@kingosticks
Copy link
Member

There's currently a device and user specific librespot issue. Every implementation is suffering from it. It appears Spotify are rolling out a change to their protocol

@kingosticks
Copy link
Member

See librespot-org/librespot#1308

@kingosticks kingosticks added the A-spotifyaudiosrc Area: spotifyaudiosrc (GStreamer/librespot) label Aug 13, 2024
@ryanavella
Copy link

ryanavella commented Sep 15, 2024

I was running into #394 and managed to get past that error message with the workaround mentioned in that issue. Now interestingly I'm being blocked on this.

This is after regenerating a credentials.json, regenerating tokens, and verifying it all matches with mopidy.conf.

ERROR    2024-09-15 15:45:55,744 [2243:MainThread] mopidy.audio.gst
  GStreamer error: Could not get/set settings from/on resource.
DEBUG    2024-09-15 15:45:55,744 [2243:MainThread] mopidy.audio.gst
  Got ERROR bus message: error=GLib.Error('Could not get/set settings from/on resource.', 'gst-resource-error-quark', 13) debug='audio/spotify/src/spotifyaudiosrc/imp.rs(239): <gstspotify::spotifyaudiosrc::imp::SpotifyAudioSrc as gstreamer_base::subclass::push_src::PushSrcImpl>::create (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstSpotifyAudioSrc:source:\nLogin failed with reason: Bad credentials'

I am wondering if somehow the credentials in mopidy.conf could be taking precedence over my cached credentials.json, and Spotify is just rejecting password-based authentication?

@kingosticks
Copy link
Member

Providing the username in your mopidy.conf matches the username in the credentials.json then the credentials.json takes priority over any supplied password. Some types of Spotify account get unexpected usernames in credentials.json, can you check yours? I need to do another release to make this simpler.

@ryanavella
Copy link

ryanavella commented Sep 15, 2024

My Spotify username is a string of 9 digits, probably auto-generated on their end because I primarily sign in through a Facebook account. It does match in both files, though I have it unquoted in mopidy.conf, not that I think that would matter here.

EDIT: hmm, I'm not sure if this is related, but I'm noticing that I only have a credentials.json living under $HOME/.local/share/mopidy/spotify/credentials-cache/, but I run mopidy as a service through a mopidy user. I need to go digging through the docs to figure out where I should really be placing credentials.json, this doesn't seem like the right location to me... (this is probably not the issue, I copied my credentials.json into the /var/... location mentioned in the other thread with no difference)

Even with GST_DEBUG=3 and -vvvv I don't see credentials.json appear anywhere in the debug output, so I don't have an easy way to verify if the correct credentials are being loaded.

@kingosticks
Copy link
Member

kingosticks commented Sep 16, 2024

GST_DEBUG=3,*spotify:6* should do it

EDIT: or maybe ,*spotify:7* ?

@dnj0104
Copy link

dnj0104 commented Sep 17, 2024

Hello

I also get this error.

I have checked var/lib/ .../ .../ credentials.json and username is the same as in my mopidy config, I have updated client-id and client secret.

and still ERROR [MainThread] mopidy.audio.gst GStreamer error: Could not get/set settings from/on resource

and my credentials.json look like this , of course I removed the auth data and username

{"username":"xyxyxyxyxyxyxyxyxy","auth_type":1,"auth_data":"absbdjsbaab

@ryanavella
Copy link

Wow, I managed to fix it but it was quite a ride. I hacked in a bunch of logging calls throughout mopidy-spotify, which eventually led me here:

self._data_location = Extension().get_data_dir(self.backend._config)
self._config = self.backend._config["spotify"]
self._credentials_dir = self._data_location / "credentials-cache"

This was where I realized that data_dir was not being set to what I wanted it to be. The fix was to make the following change to my mopidy.conf under the [core] section:

-data_dir = $XDG_DATA_DIR/mopidy
+data_dir = /var/lib/mopidy

@kingosticks
Copy link
Member

kingosticks commented Sep 17, 2024

If you're running Mopidy as a service, /var/lib/mopidy is the default data_dir location. There's no need to set things in mopidy.conf if you just want the default. If you're doing something else, but still want to use /var/lib/mopidy for some reason, then OK but that's unusual.

@RoggerFabri
Copy link

Hello

I also get this error.

I have checked var/lib/ .../ .../ credentials.json and username is the same as in my mopidy config, I have updated client-id and client secret.

and still ERROR [MainThread] mopidy.audio.gst GStreamer error: Could not get/set settings from/on resource

and my credentials.json look like this , of course I removed the auth data and username

{"username":"xyxyxyxyxyxyxyxyxy","auth_type":1,"auth_data":"absbdjsbaab

I'm on the same boat, did you manage to fix it?

@dnj0104
Copy link

dnj0104 commented Sep 21, 2024

Hello
I also get this error.
I have checked var/lib/ .../ .../ credentials.json and username is the same as in my mopidy config, I have updated client-id and client secret.
and still ERROR [MainThread] mopidy.audio.gst GStreamer error: Could not get/set settings from/on resource
and my credentials.json look like this , of course I removed the auth data and username
{"username":"xyxyxyxyxyxyxyxyxy","auth_type":1,"auth_data":"absbdjsbaab

I'm on the same boat, did you manage to fix it?

Noo, not yet, I struggling with to obtain a new credentials.json from librespot according to recomended solutions in this thread , but so far no succes .

@kingosticks kingosticks added this to the 5.0 (Replace libspotify) milestone Sep 24, 2024
@kingosticks
Copy link
Member

Mopidy-Spotify v5.0.0a3 and gst-plugin-spotify_0.14.0~alpha.1-1 use access-token login and handle credentials.json for you. Credentials errors should be fixed with these versions. Please run with GStreamer logging enabled (GST_DEBUG=*spot*:6 mopidy) if still seeing issues,

@tr1xem
Copy link

tr1xem commented Oct 12, 2024

@kingosticks

  Request from [::ffff:127.0.0.1]:48696: idle
0:01:04.017042681 90197 0x7cc9740035a0 DEBUG              librespot config.rs:81:hyper_rustls::config: with_native_roots processed 152 valid and 0 invalid certs
0:01:04.028641857 90197 0x7cc9740035a0 DEBUG              librespot config.rs:42:hyper_rustls::config: with_native_roots processed 152 valid and 0 invalid certs
0:01:04.046615351 90197 0x7cc9740035a0 DEBUG              librespot hs.rs:79:rustls::client::hs: No cached session for DnsName("apresolve.spotify.com")
0:01:04.046717932 90197 0x7cc9740035a0 DEBUG              librespot hs.rs:137:rustls::client::hs: Not resuming any session
0:01:04.066189257 90197 0x7cc9740035a0 DEBUG              librespot hs.rs:780:rustls::client::hs: Using ciphersuite TLS13_AES_256_GCM_SHA384
0:01:04.066322533 90197 0x7cc9740035a0 DEBUG              librespot tls13.rs:141:rustls::client::tls13: Not resuming
0:01:04.066996989 90197 0x7cc9740035a0 DEBUG              librespot tls13.rs:418:rustls::client::tls13: TLS1.3 encrypted extensions: [Protocols([ProtocolName(6832)])]
0:01:04.067060252 90197 0x7cc9740035a0 DEBUG              librespot hs.rs:637:rustls::client::hs: ALPN protocol is Some(b"h2")
0:01:04.225426479 90197 0x7cc9740035a0 INFO               librespot session.rs:198:librespot_core::session: Connecting to AP "ap-gae2.spotify.com:4070"
0:01:04.497164784 90197 0x7cc9740035a0 DEBUG              librespot mod.rs:161:librespot_core::connection: Authenticating with AP using AUTHENTICATION_STORED_SPOTIFY_CREDENTIALS
0:01:04.810315706 90197 0x7cc9740035a0 DEBUG              librespot session.rs:613:librespot_core::session: drop Session
0:01:04.810475693 90197 0x7cc9740035a0 DEBUG              librespot apresolve.rs:44:librespot_core::apresolve: drop ApResolver
0:01:04.810784460 90197 0x7cc98c04a3f0 DEBUG              librespot common_state.rs:556:rustls::common_state: Sending warning alert CloseNotify
0:01:04.810894201 90197 0x7cc9cc000b90 ERROR        spotifyaudiosrc audio/spotify/src/spotifyaudiosrc/imp.rs:279:<gstspotify::spotifyaudiosrc::imp::SpotifyAudioSrc as gstreamer_base::subclass::push_src::PushSrcImpl>::create:<source> failed to start: Permission denied { Login failed with reason: Bad credentials }
ERROR    2024-10-12 12:16:04,080 [90197:MainThread] mopidy.audio.gst
  GStreamer error: Could not get/set settings from/on resource.
DEBUG    2024-10-12 12:16:04,081 [90197:MainThread] mopidy.audio.gst
  Got ERROR bus message: error=GLib.Error('Could not get/set settings from/on resource.', 'gst-resource-error-quark', 13) debug='audio/spotify/src/spotifyaudiosrc/imp.rs(280): <gstspotify::spotifyaudiosrc::imp::SpotifyAudioSrc as gstreamer_base::subclass::push_src::PushSrcImpl>::create (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin2/GstSpotifyAudioSrc:source:\nPermission denied { Login failed with reason: Bad credentials }'

Updated Like 5 - 6 times

@kingosticks
Copy link
Member

And you removed your credentials.json file from your Mopidy data_dir before updating ?

@tr1xem
Copy link

tr1xem commented Oct 12, 2024

And you removed your credentials.json file from your Mopidy data_dir before updating ?

No ig? I did removed .cache in var/lib
where is data_dir

@kingosticks
Copy link
Member

@tr1xem
Copy link

tr1xem commented Oct 12, 2024

Removed .local/..mopidy/spotify/credential_cache/credential.json
Still same issue
Okay Removed even from var/lib still same

Note : It just dont plays music It shows all the playlist fine and searches too

Depends how you run Mopidy.

https://docs.mopidy.com/stable/config/#view-effective-configuration

https://docs.mopidy.com/stable/config/#confval-core-data_dir

@kingosticks
Copy link
Member

kingosticks commented Oct 12, 2024

Have you tried re-authenticating at https://mopidy.com/ext/spotify/ ? I don't know why that'd help but I'm struggling to understand what could be wrong here. Perhaps when they reset your account they also reset all current authenticated apps? That seems really unlikely but worth a shot...

Failing that, could you delete the credentials.json file and then try again with the detailed GST_DEBUG log command and share all the librespot output?

@tr1xem
Copy link

tr1xem commented Oct 13, 2024

Have you tried re-authenticating at https://mopidy.com/ext/spotify/ ? I don't know why that'd help but I'm struggling to understand what could be wrong here. Perhaps when they reset your account they also reset all current authenticated apps? That seems really unlikely but worth a shot...

Failing that, could you delete the credentials.json file and then try again with the detailed GST_DEBUG log command and share all the librespot output?

I got a email form spotify that some "suspecious activity" was spotted on my account and after that all my connected apps got disconnected

Things I have tried so far:

  • Reauth on the website (still same output)
  • Deleting credentials.json from everywhere i can find and then reauth on website (still the same result)

The thing that is concerning me is Its fetches all account details (like my personal playlists and everything) perfectly fine but its not playing music

@tr1xem
Copy link

tr1xem commented Oct 13, 2024

Okay Good News Its Working Now (atleast)
Had to reinstall everything

Current Issues:

  • Its only working if running as service, If i dont just mopidy its giving "gi module not found" i did installed pygobjects
  • Ik this is werid but for some strange reasons it not getting picked by playerctl(it used to ig thats cuz of running it as service)
  • Im usnig ncmpcpp and I cant seek forward or backward in the song

@kingosticks
Copy link
Member

The thing that is concerning me is Its fetches all account details (like my personal playlists and everything) perfectly fine but its not playing music

I think that pointed to some problems with the credentials.json rather than the client_id and client_secret but that doesn't make sense given a fresh one would have recreated when you removed it. Odd. But good it's now working.

Have you ended up with two installments?a working one from our Debian packages, and then a half broken one in your user directory or a venv? You could try comparing mopidy deps and mopidyctl deps.

Seeking isn't working yet. The readme documents the current status. It's my intention to get back to fixing seeking once these login issues are ironed out.

@kingosticks
Copy link
Member

Just note, if you are running as both a service and user, I think you'll need to ensure the client_id and client_secret in the two corresponding Mopidy config files are the same. normally you'd just copy the Spotify section between the config files. that should ensure the credentials.json ends up being the same. Perhaps having different ones means one ends up being "old" and suspicious. Although you'd then expect the user data to also not work. I think I'll build in some more debug info

@tr1xem
Copy link

tr1xem commented Oct 13, 2024

If it works it works. :3

Have you ended up with two installments?a working one from our Debian packages, and then a half broken one in your user directory or a venv? You could try comparing mopidy deps and mopidyctl deps.

Here are the outputs :
mopidy deps - Not Working


ERROR: A GObject based library was not found.

Mopidy requires GStreamer to work. GStreamer is a C library with a
number of dependencies itself, and cannot be installed with the regular
Python tools like pip.

Please see https://docs.mopidy.com/en/latest/installation/ for
instructions on how to install the required dependencies.

Traceback (most recent call last):
  File "/home/anonymous/.local/bin/mopidy", line 5, in <module>
    from mopidy.__main__ import main
  File "/home/anonymous/.local/share/pipx/venvs/mopidy-spotify/lib/python3.12/site-packages/mopidy/__main__.py", line 7, in <module>
    from mopidy import commands
  File "/home/anonymous/.local/share/pipx/venvs/mopidy-spotify/lib/python3.12/site-packages/mopidy/commands.py", line 18, in <module>
    from mopidy.audio import Audio
  File "/home/anonymous/.local/share/pipx/venvs/mopidy-spotify/lib/python3.12/site-packages/mopidy/audio/__init__.py", line 2, in <module>
    from .actor import Audio
  File "/home/anonymous/.local/share/pipx/venvs/mopidy-spotify/lib/python3.12/site-packages/mopidy/audio/actor.py", line 8, in <module>
    from mopidy.audio import tags as tags_lib
  File "/home/anonymous/.local/share/pipx/venvs/mopidy-spotify/lib/python3.12/site-packages/mopidy/audio/tags.py", line 7, in <module>
    from mopidy.internal.gi import GLib, Gst
  File "/home/anonymous/.local/share/pipx/venvs/mopidy-spotify/lib/python3.12/site-packages/mopidy/internal/gi.py", line 5, in <module>
    import gi
ModuleNotFoundError: No module named 'gi'

sudo mopidyctl deps - Working

Running "/usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf deps" as user mopidy
WARNING  2024-10-13 16:51:54,167 [173206:MainThread] mopidy.config
  Ignoring config section 'local' because no matching extension was found
WARNING  2024-10-13 16:51:54,167 [173206:MainThread] mopidy.config
  Ignoring config section 'mpris' because no matching extension was found
Executable: /usr/bin/mopidy
Platform: Linux-6.11.2-1-cachyos-bore-x86_64-with-glibc2.40
Python: CPython 3.12.6 from /usr/lib/python3.12
Mopidy: 3.4.2 from /usr/lib/python3.12/site-packages
  Pykka: 4.0.2 from /usr/lib/python3.12/site-packages
  requests: 2.32.3 from /usr/lib/python3.12/site-packages
    charset-normalizer: 3.3.2 from /usr/lib/python3.12/site-packages
    idna: 3.8 from /usr/lib/python3.12/site-packages
    urllib3: 1.26.20 from /usr/lib/python3.12/site-packages
  setuptools: 69.5.1 from /usr/lib/python3.12/site-packages
    platformdirs: 4.3.6 from /usr/lib/python3.12/site-packages
    jaraco.text: 4.0.0 from /usr/lib/python3.12/site-packages
      jaraco.functools: 4.0.2 from /usr/lib/python3.12/site-packages
        more-itertools: 10.3.0 from /usr/lib/python3.12/site-packages
      jaraco.context: 5.3.0 from /usr/lib/python3.12/site-packages
      autocommand: 2.2.2 from /usr/lib/python3.12/site-packages
      more-itertools: 10.3.0 from /usr/lib/python3.12/site-packages
    more-itertools: 10.3.0 from /usr/lib/python3.12/site-packages
    ordered-set: 4.1.0 from /usr/lib/python3.12/site-packages
    packaging: 24.1 from /usr/lib/python3.12/site-packages
    tomli: 2.0.1 from /usr/lib/python3.12/site-packages
    validate-pyproject: 0.20.2 from /usr/lib/python3.12/site-packages
      fastjsonschema: 2.20.0 from /usr/lib/python3.12/site-packages
  tornado: 6.4.1 from /usr/lib/python3.12/site-packages
Mopidy-TuneIn: 1.1.0 from /usr/lib/python3.12/site-packages
  Mopidy: 3.4.2 from /usr/lib/python3.12/site-packages
  Pykka: 4.0.2 from /usr/lib/python3.12/site-packages
  requests: 2.32.3 from /usr/lib/python3.12/site-packages
    charset-normalizer: 3.3.2 from /usr/lib/python3.12/site-packages
    idna: 3.8 from /usr/lib/python3.12/site-packages
    urllib3: 1.26.20 from /usr/lib/python3.12/site-packages
  setuptools: 69.5.1 from /usr/lib/python3.12/site-packages
    platformdirs: 4.3.6 from /usr/lib/python3.12/site-packages
    jaraco.text: 4.0.0 from /usr/lib/python3.12/site-packages
      jaraco.functools: 4.0.2 from /usr/lib/python3.12/site-packages
        more-itertools: 10.3.0 from /usr/lib/python3.12/site-packages
      jaraco.context: 5.3.0 from /usr/lib/python3.12/site-packages
      autocommand: 2.2.2 from /usr/lib/python3.12/site-packages
      more-itertools: 10.3.0 from /usr/lib/python3.12/site-packages
    more-itertools: 10.3.0 from /usr/lib/python3.12/site-packages
    ordered-set: 4.1.0 from /usr/lib/python3.12/site-packages
    packaging: 24.1 from /usr/lib/python3.12/site-packages
    tomli: 2.0.1 from /usr/lib/python3.12/site-packages
    validate-pyproject: 0.20.2 from /usr/lib/python3.12/site-packages
      fastjsonschema: 2.20.0 from /usr/lib/python3.12/site-packages
mopidy-ytmusic: 0.3.8 from /usr/lib/python3.12/site-packages
  Mopidy: 3.4.2 from /usr/lib/python3.12/site-packages
  pytube: 12.1.2 from /usr/lib/python3.12/site-packages
  ytmusicapi: 0.25.0 from /usr/lib/python3.12/site-packages
    requests: 2.32.3 from /usr/lib/python3.12/site-packages
      charset-normalizer: 3.3.2 from /usr/lib/python3.12/site-packages
      idna: 3.8 from /usr/lib/python3.12/site-packages
      urllib3: 1.26.20 from /usr/lib/python3.12/site-packages
Mopidy-Scrobbler: 2.0.1 from /usr/lib/python3.12/site-packages
  Mopidy: 3.4.2 from /usr/lib/python3.12/site-packages
  Pykka: 4.0.2 from /usr/lib/python3.12/site-packages
  setuptools: 69.5.1 from /usr/lib/python3.12/site-packages
    platformdirs: 4.3.6 from /usr/lib/python3.12/site-packages
    jaraco.text: 4.0.0 from /usr/lib/python3.12/site-packages
      jaraco.functools: 4.0.2 from /usr/lib/python3.12/site-packages
        more-itertools: 10.3.0 from /usr/lib/python3.12/site-packages
      jaraco.context: 5.3.0 from /usr/lib/python3.12/site-packages
      autocommand: 2.2.2 from /usr/lib/python3.12/site-packages
      more-itertools: 10.3.0 from /usr/lib/python3.12/site-packages
    more-itertools: 10.3.0 from /usr/lib/python3.12/site-packages
    ordered-set: 4.1.0 from /usr/lib/python3.12/site-packages
    packaging: 24.1 from /usr/lib/python3.12/site-packages
    tomli: 2.0.1 from /usr/lib/python3.12/site-packages
    validate-pyproject: 0.20.2 from /usr/lib/python3.12/site-packages
      fastjsonschema: 2.20.0 from /usr/lib/python3.12/site-packages
  pylast: 5.3.0 from /usr/lib/python3.12/site-packages
    httpx: 0.27.2 from /usr/lib/python3.12/site-packages
      anyio: 4.4.0 from /usr/lib/python3.12/site-packages
        idna: 3.8 from /usr/lib/python3.12/site-packages
        sniffio: 1.3.1 from /usr/lib/python3.12/site-packages
      certifi: 2024.8.30 from /usr/lib/python3.12/site-packages
      httpcore: 1.0.5 from /usr/lib/python3.12/site-packages
        certifi: 2024.8.30 from /usr/lib/python3.12/site-packages
        h11: 0.14.0 from /usr/lib/python3.12/site-packages
      idna: 3.8 from /usr/lib/python3.12/site-packages
      sniffio: 1.3.1 from /usr/lib/python3.12/site-packages
Mopidy-MPD: 3.3.0 from /usr/lib/python3.12/site-packages
  Mopidy: 3.4.2 from /usr/lib/python3.12/site-packages
  Pykka: 4.0.2 from /usr/lib/python3.12/site-packages
  setuptools: 69.5.1 from /usr/lib/python3.12/site-packages
    platformdirs: 4.3.6 from /usr/lib/python3.12/site-packages
    jaraco.text: 4.0.0 from /usr/lib/python3.12/site-packages
      jaraco.functools: 4.0.2 from /usr/lib/python3.12/site-packages
        more-itertools: 10.3.0 from /usr/lib/python3.12/site-packages
      jaraco.context: 5.3.0 from /usr/lib/python3.12/site-packages
      autocommand: 2.2.2 from /usr/lib/python3.12/site-packages
      more-itertools: 10.3.0 from /usr/lib/python3.12/site-packages
    more-itertools: 10.3.0 from /usr/lib/python3.12/site-packages
    ordered-set: 4.1.0 from /usr/lib/python3.12/site-packages
    packaging: 24.1 from /usr/lib/python3.12/site-packages
    tomli: 2.0.1 from /usr/lib/python3.12/site-packages
    validate-pyproject: 0.20.2 from /usr/lib/python3.12/site-packages
      fastjsonschema: 2.20.0 from /usr/lib/python3.12/site-packages
Mopidy-Spotify: 5.0.0a3 from /usr/lib/python3.12/site-packages
  Mopidy: 3.4.2 from /usr/lib/python3.12/site-packages
  Pykka: 4.0.2 from /usr/lib/python3.12/site-packages
  requests: 2.32.3 from /usr/lib/python3.12/site-packages
    charset-normalizer: 3.3.2 from /usr/lib/python3.12/site-packages
    idna: 3.8 from /usr/lib/python3.12/site-packages
    urllib3: 1.26.20 from /usr/lib/python3.12/site-packages
  setuptools: 69.5.1 from /usr/lib/python3.12/site-packages
    platformdirs: 4.3.6 from /usr/lib/python3.12/site-packages
    jaraco.text: 4.0.0 from /usr/lib/python3.12/site-packages
      jaraco.functools: 4.0.2 from /usr/lib/python3.12/site-packages
        more-itertools: 10.3.0 from /usr/lib/python3.12/site-packages
      jaraco.context: 5.3.0 from /usr/lib/python3.12/site-packages
      autocommand: 2.2.2 from /usr/lib/python3.12/site-packages
      more-itertools: 10.3.0 from /usr/lib/python3.12/site-packages
    more-itertools: 10.3.0 from /usr/lib/python3.12/site-packages
    ordered-set: 4.1.0 from /usr/lib/python3.12/site-packages
    packaging: 24.1 from /usr/lib/python3.12/site-packages
    tomli: 2.0.1 from /usr/lib/python3.12/site-packages
    validate-pyproject: 0.20.2 from /usr/lib/python3.12/site-packages
      fastjsonschema: 2.20.0 from /usr/lib/python3.12/site-packages
Mopidy-YouTube: 3.7 from /usr/lib/python3.12/site-packages
  beautifulsoup4: 4.12.3 from /usr/lib/python3.12/site-packages
    soupsieve: 2.6 from /usr/lib/python3.12/site-packages
  cachetools: 5.5.0 from /usr/lib/python3.12/site-packages
  Mopidy: 3.4.2 from /usr/lib/python3.12/site-packages
  Pykka: 4.0.2 from /usr/lib/python3.12/site-packages
  requests: 2.32.3 from /usr/lib/python3.12/site-packages
    charset-normalizer: 3.3.2 from /usr/lib/python3.12/site-packages
    idna: 3.8 from /usr/lib/python3.12/site-packages
    urllib3: 1.26.20 from /usr/lib/python3.12/site-packages
  setuptools: 69.5.1 from /usr/lib/python3.12/site-packages
    platformdirs: 4.3.6 from /usr/lib/python3.12/site-packages
    jaraco.text: 4.0.0 from /usr/lib/python3.12/site-packages
      jaraco.functools: 4.0.2 from /usr/lib/python3.12/site-packages
        more-itertools: 10.3.0 from /usr/lib/python3.12/site-packages
      jaraco.context: 5.3.0 from /usr/lib/python3.12/site-packages
      autocommand: 2.2.2 from /usr/lib/python3.12/site-packages
      more-itertools: 10.3.0 from /usr/lib/python3.12/site-packages
    more-itertools: 10.3.0 from /usr/lib/python3.12/site-packages
    ordered-set: 4.1.0 from /usr/lib/python3.12/site-packages
    packaging: 24.1 from /usr/lib/python3.12/site-packages
    tomli: 2.0.1 from /usr/lib/python3.12/site-packages
    validate-pyproject: 0.20.2 from /usr/lib/python3.12/site-packages
      fastjsonschema: 2.20.0 from /usr/lib/python3.12/site-packages
GStreamer: 1.24.8.0 from /usr/lib/python3.12/site-packages/gi
  Detailed information:
    Python wrapper: python-gi 3.50.0
    Relevant elements:
      Found:
        uridecodebin
        souphttpsrc
        appsrc
        alsasink
        osssink
        oss4sink
        pulsesink
        id3demux
        id3v2mux
        lamemp3enc
        mpegaudioparse
        mpg123audiodec
        vorbisdec
        vorbisenc
        vorbisparse
        oggdemux
        oggmux
        oggparse
        flacdec
        flacparse
        shout2send
      Not found:
        flump3dec
        mad

python -m mopidy deps - Working too

 psh   python3 -m mopidy deps
WARNING  2024-10-13 16:52:55,166 [174748:MainThread] mopidy.config
  Ignoring config section 'mpris' because no matching extension was found
WARNING  2024-10-13 16:52:55,166 [174748:MainThread] mopidy.config
  Ignoring config section 'local' because no matching extension was found
Executable: /usr/lib/python3.12/site-packages/mopidy/__main__.py
Platform: Linux-6.11.2-1-cachyos-bore-x86_64-with-glibc2.40
Python: CPython 3.12.6 from /usr/lib/python3.12
Mopidy: 3.4.2 from /usr/lib/python3.12/site-packages
  Pykka: 4.0.2 from /usr/lib/python3.12/site-packages
  requests: 2.32.3 from /usr/lib/python3.12/site-packages
    charset-normalizer: 3.3.2 from /usr/lib/python3.12/site-packages
    idna: 3.8 from /usr/lib/python3.12/site-packages
    urllib3: 1.26.20 from /usr/lib/python3.12/site-packages
  setuptools: 69.5.1 from /usr/lib/python3.12/site-packages
    platformdirs: 4.3.6 from /usr/lib/python3.12/site-packages
    jaraco.text: 4.0.0 from /usr/lib/python3.12/site-packages
      jaraco.functools: 4.0.2 from /usr/lib/python3.12/site-packages
        more-itertools: 10.3.0 from /usr/lib/python3.12/site-packages
      jaraco.context: 5.3.0 from /usr/lib/python3.12/site-packages
      autocommand: 2.2.2 from /usr/lib/python3.12/site-packages
      more-itertools: 10.3.0 from /usr/lib/python3.12/site-packages
    more-itertools: 10.3.0 from /usr/lib/python3.12/site-packages
    ordered-set: 4.1.0 from /usr/lib/python3.12/site-packages
    packaging: 24.1 from /usr/lib/python3.12/site-packages
    tomli: 2.0.1 from /usr/lib/python3.12/site-packages
    validate-pyproject: 0.20.2 from /usr/lib/python3.12/site-packages
      fastjsonschema: 2.20.0 from /usr/lib/python3.12/site-packages
  tornado: 6.4.1 from /usr/lib/python3.12/site-packages
Mopidy-TuneIn: 1.1.0 from /usr/lib/python3.12/site-packages
  Mopidy: 3.4.2 from /usr/lib/python3.12/site-packages
  Pykka: 4.0.2 from /usr/lib/python3.12/site-packages
  requests: 2.32.3 from /usr/lib/python3.12/site-packages
    charset-normalizer: 3.3.2 from /usr/lib/python3.12/site-packages
    idna: 3.8 from /usr/lib/python3.12/site-packages
    urllib3: 1.26.20 from /usr/lib/python3.12/site-packages
  setuptools: 69.5.1 from /usr/lib/python3.12/site-packages
    platformdirs: 4.3.6 from /usr/lib/python3.12/site-packages
    jaraco.text: 4.0.0 from /usr/lib/python3.12/site-packages
      jaraco.functools: 4.0.2 from /usr/lib/python3.12/site-packages
        more-itertools: 10.3.0 from /usr/lib/python3.12/site-packages
      jaraco.context: 5.3.0 from /usr/lib/python3.12/site-packages
      autocommand: 2.2.2 from /usr/lib/python3.12/site-packages
      more-itertools: 10.3.0 from /usr/lib/python3.12/site-packages
    more-itertools: 10.3.0 from /usr/lib/python3.12/site-packages
    ordered-set: 4.1.0 from /usr/lib/python3.12/site-packages
    packaging: 24.1 from /usr/lib/python3.12/site-packages
    tomli: 2.0.1 from /usr/lib/python3.12/site-packages
    validate-pyproject: 0.20.2 from /usr/lib/python3.12/site-packages
      fastjsonschema: 2.20.0 from /usr/lib/python3.12/site-packages
Mopidy-YouTube: 3.7 from /usr/lib/python3.12/site-packages
  beautifulsoup4: 4.12.3 from /usr/lib/python3.12/site-packages
    soupsieve: 2.6 from /usr/lib/python3.12/site-packages
  cachetools: 5.5.0 from /usr/lib/python3.12/site-packages
  Mopidy: 3.4.2 from /usr/lib/python3.12/site-packages
  Pykka: 4.0.2 from /usr/lib/python3.12/site-packages
  requests: 2.32.3 from /usr/lib/python3.12/site-packages
    charset-normalizer: 3.3.2 from /usr/lib/python3.12/site-packages
    idna: 3.8 from /usr/lib/python3.12/site-packages
    urllib3: 1.26.20 from /usr/lib/python3.12/site-packages
  setuptools: 69.5.1 from /usr/lib/python3.12/site-packages
    platformdirs: 4.3.6 from /usr/lib/python3.12/site-packages
    jaraco.text: 4.0.0 from /usr/lib/python3.12/site-packages
      jaraco.functools: 4.0.2 from /usr/lib/python3.12/site-packages
        more-itertools: 10.3.0 from /usr/lib/python3.12/site-packages
      jaraco.context: 5.3.0 from /usr/lib/python3.12/site-packages
      autocommand: 2.2.2 from /usr/lib/python3.12/site-packages
      more-itertools: 10.3.0 from /usr/lib/python3.12/site-packages
    more-itertools: 10.3.0 from /usr/lib/python3.12/site-packages
    ordered-set: 4.1.0 from /usr/lib/python3.12/site-packages
    packaging: 24.1 from /usr/lib/python3.12/site-packages
    tomli: 2.0.1 from /usr/lib/python3.12/site-packages
    validate-pyproject: 0.20.2 from /usr/lib/python3.12/site-packages
      fastjsonschema: 2.20.0 from /usr/lib/python3.12/site-packages
mopidy-ytmusic: 0.3.8 from /usr/lib/python3.12/site-packages
  Mopidy: 3.4.2 from /usr/lib/python3.12/site-packages
  pytube: 12.1.2 from /usr/lib/python3.12/site-packages
  ytmusicapi: 0.25.0 from /usr/lib/python3.12/site-packages
    requests: 2.32.3 from /usr/lib/python3.12/site-packages
      charset-normalizer: 3.3.2 from /usr/lib/python3.12/site-packages
      idna: 3.8 from /usr/lib/python3.12/site-packages
      urllib3: 1.26.20 from /usr/lib/python3.12/site-packages
Mopidy-Scrobbler: 2.0.1 from /usr/lib/python3.12/site-packages
  Mopidy: 3.4.2 from /usr/lib/python3.12/site-packages
  Pykka: 4.0.2 from /usr/lib/python3.12/site-packages
  setuptools: 69.5.1 from /usr/lib/python3.12/site-packages
    platformdirs: 4.3.6 from /usr/lib/python3.12/site-packages
    jaraco.text: 4.0.0 from /usr/lib/python3.12/site-packages
      jaraco.functools: 4.0.2 from /usr/lib/python3.12/site-packages
        more-itertools: 10.3.0 from /usr/lib/python3.12/site-packages
      jaraco.context: 5.3.0 from /usr/lib/python3.12/site-packages
      autocommand: 2.2.2 from /usr/lib/python3.12/site-packages
      more-itertools: 10.3.0 from /usr/lib/python3.12/site-packages
    more-itertools: 10.3.0 from /usr/lib/python3.12/site-packages
    ordered-set: 4.1.0 from /usr/lib/python3.12/site-packages
    packaging: 24.1 from /usr/lib/python3.12/site-packages
    tomli: 2.0.1 from /usr/lib/python3.12/site-packages
    validate-pyproject: 0.20.2 from /usr/lib/python3.12/site-packages
      fastjsonschema: 2.20.0 from /usr/lib/python3.12/site-packages
  pylast: 5.3.0 from /usr/lib/python3.12/site-packages
    httpx: 0.27.2 from /usr/lib/python3.12/site-packages
      anyio: 4.4.0 from /usr/lib/python3.12/site-packages
        idna: 3.8 from /usr/lib/python3.12/site-packages
        sniffio: 1.3.1 from /usr/lib/python3.12/site-packages
      certifi: 2024.8.30 from /usr/lib/python3.12/site-packages
      httpcore: 1.0.5 from /usr/lib/python3.12/site-packages
        certifi: 2024.8.30 from /usr/lib/python3.12/site-packages
        h11: 0.14.0 from /usr/lib/python3.12/site-packages
      idna: 3.8 from /usr/lib/python3.12/site-packages
      sniffio: 1.3.1 from /usr/lib/python3.12/site-packages
Mopidy-MPD: 3.3.0 from /usr/lib/python3.12/site-packages
  Mopidy: 3.4.2 from /usr/lib/python3.12/site-packages
  Pykka: 4.0.2 from /usr/lib/python3.12/site-packages
  setuptools: 69.5.1 from /usr/lib/python3.12/site-packages
    platformdirs: 4.3.6 from /usr/lib/python3.12/site-packages
    jaraco.text: 4.0.0 from /usr/lib/python3.12/site-packages
      jaraco.functools: 4.0.2 from /usr/lib/python3.12/site-packages
        more-itertools: 10.3.0 from /usr/lib/python3.12/site-packages
      jaraco.context: 5.3.0 from /usr/lib/python3.12/site-packages
      autocommand: 2.2.2 from /usr/lib/python3.12/site-packages
      more-itertools: 10.3.0 from /usr/lib/python3.12/site-packages
    more-itertools: 10.3.0 from /usr/lib/python3.12/site-packages
    ordered-set: 4.1.0 from /usr/lib/python3.12/site-packages
    packaging: 24.1 from /usr/lib/python3.12/site-packages
    tomli: 2.0.1 from /usr/lib/python3.12/site-packages
    validate-pyproject: 0.20.2 from /usr/lib/python3.12/site-packages
      fastjsonschema: 2.20.0 from /usr/lib/python3.12/site-packages
Mopidy-Spotify: 5.0.0a3 from /usr/lib/python3.12/site-packages
  Mopidy: 3.4.2 from /usr/lib/python3.12/site-packages
  Pykka: 4.0.2 from /usr/lib/python3.12/site-packages
  requests: 2.32.3 from /usr/lib/python3.12/site-packages
    charset-normalizer: 3.3.2 from /usr/lib/python3.12/site-packages
    idna: 3.8 from /usr/lib/python3.12/site-packages
    urllib3: 1.26.20 from /usr/lib/python3.12/site-packages
  setuptools: 69.5.1 from /usr/lib/python3.12/site-packages
    platformdirs: 4.3.6 from /usr/lib/python3.12/site-packages
    jaraco.text: 4.0.0 from /usr/lib/python3.12/site-packages
      jaraco.functools: 4.0.2 from /usr/lib/python3.12/site-packages
        more-itertools: 10.3.0 from /usr/lib/python3.12/site-packages
      jaraco.context: 5.3.0 from /usr/lib/python3.12/site-packages
      autocommand: 2.2.2 from /usr/lib/python3.12/site-packages
      more-itertools: 10.3.0 from /usr/lib/python3.12/site-packages
    more-itertools: 10.3.0 from /usr/lib/python3.12/site-packages
    ordered-set: 4.1.0 from /usr/lib/python3.12/site-packages
    packaging: 24.1 from /usr/lib/python3.12/site-packages
    tomli: 2.0.1 from /usr/lib/python3.12/site-packages
    validate-pyproject: 0.20.2 from /usr/lib/python3.12/site-packages
      fastjsonschema: 2.20.0 from /usr/lib/python3.12/site-packages
GStreamer: 1.24.8.0 from /usr/lib/python3.12/site-packages/gi
  Detailed information:
    Python wrapper: python-gi 3.50.0
    Relevant elements:
      Found:
        uridecodebin
        souphttpsrc
        appsrc
        alsasink
        osssink
        oss4sink
        pulsesink
        id3demux
        id3v2mux
        lamemp3enc
        mpegaudioparse
        mpg123audiodec
        vorbisdec
        vorbisenc
        vorbisparse
        oggdemux
        oggmux
        oggparse
        flacdec
        flacparse
        shout2send
      Not found:
        flump3dec
        mad

Note : I use Arch(btw)

  • The Gstreamer was not working for me tried installing it from the deb package u provide - Didnt worked (i converted the deb to tar.gz and the installed)
  • Tried It building it myself was no error and installed too but still that auth error
  • Then to fix it i just downloaded the libspotify.so from ur repo and replaced it in the gstreamer dir

^ If this could provied any help

@TCke83
Copy link

TCke83 commented Oct 21, 2024

Mopidy-Spotify v5.0.0a3 and gst-plugin-spotify_0.14.0~alpha.1-1 use access-token login and handle credentials.json for you. Credentials errors should be fixed with these versions. Please run with GStreamer logging enabled (GST_DEBUG=*spot*:6 mopidy) if still seeing issues,

I've tried this and removed any credentials.json file.

In my mopidy.conf i only have client_id & client_secret under the spotify section, but when i try to play a song i get following error:

ERROR 2024-10-21 16:53:51,933 [2814:MainThread] mopidy.audio.gst GStreamer error: Could not get/set settings from/on resource. DEBUG 2024-10-21 16:53:51,933 [2814:MainThread] mopidy.audio.gst Got ERROR bus message: error=GLib.Error('Could not get/set settings from/on resource.', 'gst-resource-error-quark', 13) debug='audio/spotify/src/spotifyaudiosrc/imp.rs(280): <gstspotify::spotifyaudiosrc::imp::SpotifyAudioSrc as gstreamer_base::subclass::push_src::PushSrcImpl>::create (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstSpotifyAudioSrc:source:\nusername is not set and credentials are not in cache'

What could be the cause?

@kingosticks
Copy link
Member

kingosticks commented Oct 21, 2024

You're not using gst-plugin-spotify_0.14.0~alpha.1-1

From the readme:

Verify the GStreamer spotify plugin is correctly installed:

gst-inspect-1.0 spotifyaudiosrc | grep Version | awk '{print $2}'

@TCke83
Copy link

TCke83 commented Oct 21, 2024

gst-inspect-1.0 spotifyaudiosrc | grep Version | awk '{print $2}'

The command returns following, indeed another version

0.14.0-alpha.1-628dee9

I've downloaded and installed the .deb file and now it seems to work, it now states following version

0.14.0-alpha.1-335dbdd

@alanmilinovic
Copy link

I am using iris jaedb image in my docker. Any idea how to install version 0.14.0-alpha.1. Currently I have 0.10.5-67de191 version.

@alanmilinovic
Copy link

Wow it works finally, I had to download the deb file and add to my docker-compose command for installing deb file + upgrade of Spotify plugin to version 5.0.0a3.

@kingosticks
Copy link
Member

All required changes are now merged upstream into latest gst-plugins-rs. Providing you are running the latest software versions I think this is solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-spotifyaudiosrc Area: spotifyaudiosrc (GStreamer/librespot)
Projects
None yet
Development

No branches or pull requests

9 participants