Closed The-Judge closed 5 days ago
I ma having the same issue - not sure if it's related to this?
Yes, the problem is probably that Spotify requires now oauth authentication.
This has to be fixed in mopidy-spotify, see also https://github.com/mopidy/mopidy-spotify/issues/394
All
PR #2435 updates mopidy-spotify, which should fix this issue.
Everyone is invited to test this fix.
Hi there I have the same problem I think. i am confused a little bit: How do I get the credentials.json mentioned in the fix?
@seschu
The PR #2435 is supposed to fix this, please check it out
@seschu
The PR #2435 is supposed to fix this, please check it out
I did update the spotify mopidy version but now I am getting this error
"
Oct 13 20:57:52 theobox mopidy[6044]: INFO [MpdSession-38] mopidy_mpd.session New MPD connection from [::ffff:127.0.0.1]:47336
Oct 13 20:57:52 theobox mopidy[6044]: INFO [MpdSession-39] mopidy_mpd.session New MPD connection from [::ffff:127.0.0.1]:47340
Oct 13 20:57:52 theobox mopidy[6044]: INFO [MpdSession-40] mopidy_mpd.session New MPD connection from [::ffff:127.0.0.1]:47346
Oct 13 20:57:52 theobox mopidy[6044]: Traceback (most recent call last):
Oct 13 20:57:52 theobox mopidy[6044]: File "/usr/local/lib/python3.9/dist-packages/mopidy/audio/actor.py", line 577, in _on_source_setup
Oct 13 20:57:52 theobox mopidy[6044]: self._source_setup_callback(source)
Oct 13 20:57:52 theobox mopidy[6044]: File "/usr/local/lib/python3.9/dist-packages/mopidy_spotify/backend.py", line 50, in on_source_setup
Oct 13 20:57:52 theobox mopidy[6044]: source.set_property("access-token", self.backend._web_client.token())
Oct 13 20:57:52 theobox mopidy[6044]: TypeError: object of type GstSpotifyAudioSrc' does not have property
access-token'
Oct 13 20:57:52 theobox mopidy[6044]: ERROR [MainThread] mopidy.audio.gst GStreamer error: Could not get/set settings from/on resource.
"
Probably not completely fixed
https://github.com/mopidy/mopidy-spotify/issues/394#issuecomment-2401706956
I think we have to get the credentials.json file from librespot https://github.com/mopidy/mopidy-spotify/issues/394
I made it work by doing the following:
I had to generate a new request token directly at Spotify https://developer.spotify.com/documentation/web-playback-sdk/tutorials/getting-started
I updated the mopidy client id and secret (I actually don't know if this is necessary) under /etc/mopidy/mopidy.conf
The new request token from step 1 is used for creating a file called credentials.json. I placed this file with sudo cp in this location /var/lib/mopidy/spotify/credentials-cache/credentials.json The file has this content {"username":"weirdusername", "auth_type":1,"auth_data":"generatedaccesstoken"} generatedaccesstoken is the token received from the spotify website in step 1. the username is a weird random combination of letters that I see when I check my spotify profile page (on desktop in browser or in a desktop app) and press edit profile.
I then updated the gstreamerplugin with this alpha release https://github.com/kingosticks/gst-plugins-rs-build/releases/tag/gst-plugin-spotify_0.14.0-alpha.1-1 Here I only downlaoded this file https://github.com/kingosticks/gst-plugins-rs-build/releases/download/gst-plugin-spotify_0.14.0-alpha.1-1/gst-plugin-spotify_0.14.0.alpha.1-1_armhf.deb and I installed it doing sudo apt remove gst-plugin-spotify sudo dpkg -i gst-plugin-spotify_0.14.0.alpha.1-1_armhf.deb
I am not sure whether all steps were necessary. It works currently.
I think we have to get the credentials.json file from librespot mopidy/mopidy-spotify#394
There seems to be some progress in the mentioned thread, any chance to get a fix for this here also?
I made it work by doing the following:
1. I had to generate a new request token directly at Spotify https://developer.spotify.com/documentation/web-playback-sdk/tutorials/getting-started 2. I updated the mopidy client id and secret (I actually don't know if this is necessary) under /etc/mopidy/mopidy.conf 3. The new request token from step 1 is used for creating a file called credentials.json. I placed this file with sudo cp in this location /var/lib/mopidy/spotify/credentials-cache/credentials.json The file has this content {"username":"weirdusername", "auth_type":1,"auth_data":"generatedaccesstoken"} generatedaccesstoken is the token received from the spotify website in step 1. the username is a weird random combination of letters that I see when I check my spotify profile page (on desktop in browser or in a desktop app) and press edit profile. 4. I then updated the gstreamerplugin with this alpha release https://github.com/kingosticks/gst-plugins-rs-build/releases/tag/gst-plugin-spotify_0.14.0-alpha.1-1 Here I only downlaoded this file https://github.com/kingosticks/gst-plugins-rs-build/releases/download/gst-plugin-spotify_0.14.0-alpha.1-1/gst-plugin-spotify_0.14.0.alpha.1-1_armhf.deb and I installed it doing sudo apt remove gst-plugin-spotify sudo dpkg -i gst-plugin-spotify_0.14.0.alpha.1-1_armhf.deb
I am not sure whether all steps were necessary. It works currently.
Did the same and it works for me as well.
In addition to the above, I also had to install the 5.0.0a3
version of the mopidy-spotify plugin which I didn't have yet. This enables the new authentication method and now you can remove the username/password from mopidy.conf.
sudo python3 -m pip install Mopidy-Spotify==5.0.0a3
Btw, I found it useful to check the logs from mopidy to get quick feedback on whether authentication works or not and why
journalctl -u mopidy -b --grep spotify.web
Version
2.7.0 - 550a2583 - master
Branch
master
OS
Raspbian GNU/Linux 11 (bullseye) - Lite 32Bit
Pi model
3 B Rev 1.2
Hardware
What happened?
Installing Phoniebox works fine. When the box boots up, I can hear the boot-sound from the speakers fine also. But when I play Spotify content via the WebUI or Iris, nothing plays and the following is written to the mopidy log:
`ERROR [MainThread] mopidy.audio.gst GStreamer error: Could not get/set settings from/on resource.
Logs
Configuration
mpd.conf
/etc/mopidy/mopidy.conf
More info
Running the following as
root
anduser
mopidy works fine: