dlfm icon indicating copy to clipboard operation
dlfm copied to clipboard

LastfmError[500]: 500 Internal Server Error (lastfm.User.GetRecentTracks)

Open skupjoe opened this issue 2 years ago • 16 comments

With dlfm running- regardless if playing music or not -I see these repeated 500 Internal Server Error errors:

$ ./DiscordLastfmScrobbler
2021/12/10 00:27:54 Settings loaded: config.ini
2021/12/10 00:27:54 Endless mode! Ctrl+C to exit
2021/12/10 00:27:54 Authorized to Discord
2021/12/10 00:27:55 Connected to Discord
2021/12/10 02:28:08 LastFM error:  LastfmError[500]: 500 Internal Server Error (lastfm.User.GetRecentTracks)
2021/12/10 06:56:49 LastFM error:  LastfmError[500]: 500 Internal Server Error (lastfm.User.GetRecentTracks)
2021/12/10 08:22:06 LastFM error:  LastfmError[500]: 500 Internal Server Error (lastfm.User.GetRecentTracks)
2021/12/10 10:27:35 Discord error:  no websocket connection exists
2021/12/10 11:17:13 LastFM error:  LastfmError[500]: 500 Internal Server Error (lastfm.User.GetRecentTracks)
2021/12/10 11:34:40 LastFM error:  LastfmError[500]: 500 Internal Server Error (lastfm.User.GetRecentTracks)

They do not appear to really impact performance.

IIRC, I was seeing these 500 errors with DiscordLastfmScrobbler version as well. So, I think this is a longstanding bug.

You can see that I also get Discord error: no websocket connection exists every so often, as well.

My config has check_interval = 7 and endless_mode = true.

skupjoe avatar Dec 22 '21 10:12 skupjoe

Oh... I really don't know, what this may mean... Maybe I should update library. But I have one question. What are -C ./config.ini and -d arguments in ./DiscordLastfmScrobbler -C ./config.ini -d ? dlfm doesn't use any args or flags :)

hrueschwein avatar Dec 22 '21 16:12 hrueschwein

But I have one question. What are -C ./config.ini and -d arguments in ./DiscordLastfmScrobbler -C ./config.ini -d

Old copy-paste, sorry. I am not using these flags anymore and still seeing the issue.

skupjoe avatar Dec 22 '21 19:12 skupjoe

ok... Can you give me information about your system? maybe this will help

hrueschwein avatar Dec 22 '21 22:12 hrueschwein

I experienced this both on Windows and Linux (CentOS 7), so it is not machine-specific, AFAICT.

skupjoe avatar Dec 22 '21 23:12 skupjoe

Ok. If you have other computer, can you try it on them and write result? Also, can you connect to last.fm from browser? Do you use proxy or VPN? Do you have static IP or dynamic? Also, try to generate new last.fm API token, maybe it will help I'm sorry that I spend your time with questions, but it really hard to understand where is bug :)

hrueschwein avatar Dec 23 '21 07:12 hrueschwein

Ok. If you have other computer, can you try it on them and write result? Also, can you connect to last.fm from browser? So you use proxy or VPN? Do you have static IP or dynamic? Also, try to generate new last.fm API token, maybe it will help I'm sorry that I spend your time with questions, but it really hard to understand where is bug :)

Indeed, it is a strange/intermittent issue. For the last 12 hours, I have not received any error. But earlier this morning (while I was sleeping) I see that it was observed multiple times back-to-back.

I've reproduced this from a Windows computer and a Linux VM. Both using same IP/network. No, I am not passing the traffic through a proxy or VPN. And, I can access lastfm.com from a browser fine (right now), but I am not sure if I can access during these periods- it is hard to catch in-time :)

skupjoe avatar Dec 23 '21 08:12 skupjoe

I've generated a new API token and I am running dlfm on an ec2 instance now as another test. I will let you know if I experience the same.

Another thought- maybe 7 seconds interval is too fast and lastfm is rate-limiting me? You've never experienced this error?

skupjoe avatar Dec 23 '21 08:12 skupjoe

Another thought- maybe 7 seconds interval is too fast and lastfm is rate-limiting me? You've never experienced this error?

Maybe yes, you should try bigger interval. I've never seen this error and I haven't reproduced it.

Also, if you have problems with a new token too, try to register new account and generate token from it, but don't change nickname in config, this also can help.

hrueschwein avatar Dec 23 '21 10:12 hrueschwein

@skupjoe, have error reproduced again since last comment?

hrueschwein avatar Jan 03 '22 19:01 hrueschwein

@dikey0ficial Looks like I am still seeing the same error on ec2 instance with new lastfm API key, using your latest source:

image

I will try increasing the polling interval to 20 seconds.

skupjoe avatar Jan 04 '22 08:01 skupjoe

Still an issue with check_interval set to 20 seconds:

image

I set this config and went to bed. Woke up with these logs above.

skupjoe avatar Jan 04 '22 17:01 skupjoe

Still an issue with check_interval set to 20 seconds:

image

I set this config and went to bed. Woke up with these logs above.

Yesterday I had the same error, but after a minute this stopped. I don't know why do we have this error, maybe it's error on last.fm side, but I'll check all API calls

hrueschwein avatar Jan 05 '22 06:01 hrueschwein

@skupjoe i've just updated. may be this build will work?

P.S. In your screenshots from previous comments there is your last,fm token. I recomend you to delete this one or edit images and update them :)

hrueschwein avatar Jan 24 '22 18:01 hrueschwein

🤦‍♂️ Thanks I've disabled that API key and made a new one.

I'll try out your new build and lyk- thanks.

skupjoe avatar Jan 24 '22 19:01 skupjoe

Still exhibited on 4.0.0 but I'm now running on 4.2.2.2 and increased my update interval to 20 seconds. wlyk

skupjoe avatar Mar 07 '22 04:03 skupjoe

Still being exhibited on 4.2.2.2 with 20 second interval. image

skupjoe avatar Mar 23 '22 23:03 skupjoe