-
Notifications
You must be signed in to change notification settings - Fork 24
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
Spotty stopped working due to Spotify API changes #137
Comments
It should work in host mode, unless you have something else blocking access to ports. That said, it looks as if they turned something off. I've been receiving emails from users telling me they were no longer able to listen to Spotify for several days. Today the issue reached me, I believe. I can no longer listen to any Spotify content... I'm sorry, but for the time being I'll have to concentrate on getting things working again at all 😢. |
Thank you for your quick reply. I was concerning that this is a Spotify related issue but I'm on the road now. I will investigate if there's something blocking ports later on. Thanks for your work |
[quote]That said, it looks as if they turned something off. [/quote] There are NO log warnings/errors, though. |
same here.. |
unfortunately same here too |
same... |
Does anyone have success with blocking |
No success with blocking... |
looks like dev branch worx |
I saw that Spotty uses its own fork of librespot (https://github.com/michaelherger/librespot), so I am wondering if one can just replace |
Nope. I wouldn't have forked it if I hadn't needed to do so in order to make things work for spotty. I'll hopefully be able to migrate to the latest dev branch work of upstream librespot. |
thanks a lot - very much appreciated! |
Ok, here's something for the brave among you... a somewhat working test version of Spotty! Before you promise too much to your kids, please check these caveats:
If you agree with the above, add the following URL to the plugin manager and install the Spotty update. |
Great work @michaelherger ! I just updated and re-added accounts. Stuck on unable to get access token for a while but worked shortly after. Moving through the menu and searching seems a litt bit slower than it used to but that might just be on my side. Will continue testing 👍 Thanks for your effort! |
WOW. Quite a disclaimer - but it works! I get this error on Spotty's "home page": Thank you @michaelherger ! My kids are as desperate as yours. And me as well, we all kind of depend on Spotty. :) |
just installed the new version and tested it shortly. playback worked again immediatly. thank you very much! looking forward to let the kids test it out tomorrow... will keep you updated... edit: |
Can confirm after a short test with LMS 8.5.2 on my 64-Bit Laptop (Archlinux) everything seems to work again as expected. But I can't experience any longer delays between the tracks as mentioned above. Looks pretty quite normal to me. Will do some further testing with v4.11.9. Unfortunately I'm probably the only one 😁 who's still running an LMS on an old ITX 32-Bit home server. So I think, after all these years (although still very stable and reliable), it's time for something new now. 😇 Edit: |
@MarcPlace you could try to build the binary yourself. It's not that difficult. My difficulties result from the fact that I cross-compile most of it, and rely on Github to do the heavy lifting. And they do not provide support for all platforms (and I was too lazy to build a pipeline for i386 cross-compilation). Once you've got rust installed (https://rustup.rs) just run |
Works, thank you @michaelherger. Will operation be stable if I switch off docker host networking after having logged in? |
Thank you @michaelherger. Works like a charm on x64 QNAP with QLMS |
Tested new build with own client ID, on Raspberry Pi 2 Lyrion. Works 👍 |
Will give it a try to compile it 32-Bit native as soon as I'm back home tonight. 👍 |
Yes, I believe once authenticated spotty would go back to reaching outside from the inside. You should be good. |
Had the same problem with skipping the playlist over the last few days. Started around tuesday. Now it's working fine again without any update besides the update with the message which says, that it's not working anymore. So I'm currently using 4.11.1 which works just as before. |
I've just reverted my LMS from snap and i confirm that it is working on 4.11.1 without any problems. |
Works again on my side too, after few days down... Some changes on Spotify side ? |
yes it also works for me again - I haven't installed new version of spotty
or changed any other settings
…On Thu, 5 Sept 2024 at 14:28, DCH-SOCOMEC ***@***.***> wrote:
Works again on my side too, after few days down... Some changes on Spotify
side ?
—
Reply to this email directly, view it on GitHub
<#137 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEZ7UMAVEKWFHNQKWF5UN5DZVBL7ZAVCNFSM6AAAAABNRYAUQKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZRGY4DMMRVHE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Same for me - the old spotty 4.11.1 also works again (with that message...and start missing) |
Huh? 🤔 Nevertheless, I've managed to compile the i386 binary for Spotty 4.11.9 myself successfully using my client ID. Works as expected on my old 32-Bit ITX. 👍 [root@vdr i386-linux]# file spotty-i386 [root@vdr i386-linux]# ./spotty-i386 --help |
For me its working now again with v4.11.0. So Spotify must have realized they broke something on their end and fixed it. Because before it would just skip through the playlist without playing anything. Running PicorePlayer btw, piCorePlayer v9.2.0 | www v00029 | linux 6.1.77-pcpCore-v8 (64) | piCore v14.1 | Squeezelite v2.0.0-1476-pCP. |
now updated to 4.11.2. Issue is back again - likely from spotifys side again. :( |
Now it works again...strange. |
With 4.11.9 I seem to have an issue with token refresh. I'm on docker amd64 stable (8.5.3), still with --net=host. Once set up using my account from Spotify on Android, Spotty works alright, again thank you Michael! Then after 1+ hour of operation I get in server.log for each Spotty action:
To get it working again, I created a 2nd "App" in Spotify Developers and entered this Client ID to Spotty. If I then again switch to the previous Client ID, it works again for about 1h. |
Yeah, I've seen token expiration issues, too. It's odd, because the code follows the TTL given in the token itself. But in my case Spotty would refresh a minute or two later, and I'd be able to continue to use it without any restart and such. |
Is it still working with the «old» spotty version (not the testversion)? It seems the test version is quite a bit slower to navigate through albums etc. Might take a chance and go back to normal release? by they way @michaelherger - do you have buymeacoffe? Great work keeping the plugin alive😃 |
Yes, you should go back to the official release - which IMHO is working more reliably than the new one (again). But no, I don't drink coffee 😁. |
Does anyone else have issues that the playback sometimes stop? This happens totally random. Sometimes after one or two tracks, sometimes after an hour or so. Not sure if this is related to the API changes, but I've only experienced that issue after Spotify did some changes on their side. Just curious if anyone else experiences those issues? Apart from those type of entries (which appear to be happening on a regular basis)
I do not see anything odd in the server.log. The log level is set to |
yes, unfortunately, it happens with my setup too |
Are you still on the test version or back on the release version? I have found an issue in the test version which caused slowness, failed token updates etc. But I didn't bother updating the test repo, as the old version started working again. |
I am on the latest release version. Wanted to give the test version a try back then, but at that time the release version already worked again (except for the random playback stops). |
I have the same problem as well. Tough I think it happend occasionally before spotify broke playback alltogether for some days. Now it happend very frequently and I did not even manage to have one album play without it stopping at least once. I dug up a somewhat related forum post somewhere that recommended to disable ogg as a file type for spotty. That seems to have fixed the stopping for me even though every 10 or so tracks it skips to the next track in the middle of one track. Edit: I never used the experimental version |
My kids seem to be quit happy with the test version but I also experienced the slowness. So I think it would be nice to have an update on that. We never know if Spotify changes their mind again so I think its good to have a version with follows the upstream project closely. |
How technical would you be? I think I have a fix for the slowness (and 429s - which are related): diff --git a/API/Token.pm b/API/Token.pm
index 0b4cd7f..9778fcd 100644
--- a/API/Token.pm
+++ b/API/Token.pm
@@ -173,13 +173,13 @@ sub _gotTokenInfo {
if ( $response && ref $response ) {
if ( $token = $response->{accessToken} ) {
- if ( main::DEBUGLOG && $log->is_debug ) {
- $log->debug("Received access token: " . Data::Dump::dump($response));
- $log->debug("Caching for " . ($response->{expiresIn} || 3600) . " seconds.");
- }
+ my $expiry = $response->{expiresIn} ? ($response->{expiresIn}->{secs} || 3600) : 3600;
+
+ main::DEBUGLOG && $log->is_debug && $log->debug("Received access token: " . Data::Dump::dump($response));
+ main::INFOLOG && $log->is_info && $log->debug("Caching access token for $expiry seconds.");
# Cache for the given expiry time (less some to be sure...)
- $cache->set($cacheKey, $token, ($response->{expiresIn} || 3600) - 300);
+ $cache->set($cacheKey, $token, $expiry - 300);
}
}
@@ -218,12 +218,14 @@ sub get {
my ($class, $api, $cb, $args) = @_;
$args ||= {};
- if (my $token = $cache->get(_getCacheKey($args->{code}, $args->{accountId} || ($api && $api->username) || (main::SCANNER ? '_scanner' : 'generic')))) {
- main::DEBUGLOG && $log->is_debug && $log->debug("Found cached token: $token");
+ my $cacheKey = _getCacheKey($args->{code}, $args->{accountId} || ($api && $api->username) || (main::SCANNER ? '_scanner' : 'generic'));
+ if (my $token = $cache->get($cacheKey)) {
+ main::INFOLOG && $log->is_info && $log->info("Found cached token: $token");
+ main::DEBUGLOG && $log->is_debug && $log->debug($token);
return $cb ? $cb->($token) : $token;
}
else {
- main::DEBUGLOG && $log->is_debug && $log->debug("Didn't find cached token. Need to refresh.");
+ $log->warn("Didn't find cached token. Need to refresh.");
}
if (main::SCANNER) { With this my Spotty has been stable. Would you happen to be Podcast listeners? I've noticed new issues with the new helper. Some podcasts wouldn't play any more... |
sorry, I don't listen to podcast on spotify, so I can't comment on that... |
If you're still using the spotty-test.xml repo, you should get a v4.11.99 with the token caching issue addressed. This was causing delays and request failures due to too many requests. |
I can confirm this issue (and mentioned it already in an earlier posting), that some podcasts won't play anymore with "spotty-test". With stable branch (4.11.2) they just play fine, but recently I've discovered a problem with 4.11.2 on longer episodes, that they stop playing after 30 to 40 minutes or so for no reason. |
@MarcPlace there's also a new testing version which should have the podcast issue resolved. I'm also working on some improvements to the "ends at the stop of a track" issue. But still no Connect. |
@michaelherger Just for the record... did a quick test yesterday with librespot from the "spotty-dev" branch (commit 9b8cba5af2ea73034151039557b9a79c5b214448). Podcasts are working again, thanks Michael! |
Hi,
I have some troubles with authenticating Spotify within a fresh docker deployment (docker v27.2.0) lmscommunity:logitechmediaserver
After Spotify removed the credential auth and i've been on lms 8.1 I decided to upgrade to latest version.
I'm running 1 Radio, 1 Boom, 1 Touch, and 2 squeezelightclients.
I can run local media files with no problems and can see all players.
I reinstalled Spotty several times, put the container in Host network mode, tried different Spotify clients (Laptop, mobile, PC) but there's no device showing up
server.log
I appreciate any help and i believe I'm just too noobish :)
thx in advance
Rob
The text was updated successfully, but these errors were encountered: