FoxxMD / multi-scrobbler

Scrobble plays from multiple sources to multiple clients
https://foxxmd.github.io/multi-scrobbler
MIT License
299 stars 14 forks source link

Random scrobble stopping on spotify #99

Closed duckfromdiscord closed 9 months ago

duckfromdiscord commented 9 months ago

Describe the bug This is my first time having this issue. Multi-scrobbler was working just fine with spotify until it randomly stopped working. There is nothing important outside of the logs sent, everything was working fine and there is no context.

To Reproduce Steps to reproduce the behavior:

  1. Leave multi-scrobbler on
  2. Random issue

Logs

[Sources] [Spotify - unnamed] Request failed but retries (0) less than max (1), retrying request after 2 seconds...
 error   : [Sources] [Spotify - unnamed] Request failed on retry (1) with no more retries permitted (max 1)
error   : [Sources] [Spotify - unnamed] Request failed on retry (1) with no more retries permitted (max 1)
 error   : [Sources] [Spotify - unnamed] Request failed on retry (1) with no more retries permitted (max 1)
ErrorWithCause:
    at SpotifySource.callApi (CWD/src/sources/SpotifySource.js:195:35)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async SpotifySource.getCurrentPlaybackState (CWD/src/sources/SpotifySource.js:139:29)
    at async SpotifySource.getRecentlyPlayed (CWD/src/sources/SpotifySource.js:101:31)
    at async AbstractSource.doPolling (CWD/src/sources/AbstractSource.js:151:38)
    at async AbstractSource.startPolling (CWD/src/sources/AbstractSource.js:113:21)
    at async SpotifySource.poll (CWD/src/sources/SpotifySource.js:218:13)

caused by: WebapiError: [object Object]
    at _toError (CWD/node_modules/spotify-web-api-node/src/http-manager.js:47:10)
    at CWD/node_modules/spotify-web-api-node/src/http-manager.js:71:25
    at Request.callback (CWD/node_modules/superagent/lib/node/index.js:867:3)
    at IncomingMessage.<anonymous> (CWD/node_modules/superagent/lib/node/index.js:1070:18)
    at Stream.emit (node:events:513:28)
    at Unzip.<anonymous> (CWD/node_modules/superagent/lib/node/unzip.js:54:12)
    at Unzip.emit (node:events:513:28)
    at endReadableNT (node:internal/streams/readable:1359:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
warn    : [Sources] [Spotify - unnamed] Poll retries (5) equal to max poll retries (5), stopping polling!

Versions (please complete the following information):

Additional context Random issue, no suspicious surrounding messages, no context

FoxxMD commented 9 months ago

Other than the root error not displaying correctly -- it should be a message rather than [object Object] -- there's nothing that can really be done about this. This is an upstream issue, MS having trouble communicating with spotify's api. I also had some polling restarts for spotify yesterday.

You can update your flatpak version to 0.5.2 which includes an automatic polling restart check every 20 minutes. It won't fix spotify having server trouble but it'll save you having to restart polling manually.

duckfromdiscord commented 9 months ago

I ran flatpak update but I was updated to 0.5.0 "Bump release to 0.5.0 (36722220)"

FoxxMD commented 9 months ago

I've merged two updates [1] [2] to the flathub but they have yet to update the remote package. I'll try to figure out why its not updating..

duckfromdiscord commented 9 months ago

Ok just had the issue in OP again 😅

duckfromdiscord commented 9 months ago

Let me know when 0.5.2 is out

FoxxMD commented 9 months ago

@duckfromdiscord I had the same communication issues yesterday. 0.5.2 is available on flathub now.

I'm closing this because it's not a problem with MS and has been solved with heartbeat (hopefully you can get it installed).

duckfromdiscord commented 7 months ago

@FoxxMD I observed in my logs that polling stopped for about two minutes, then it said "Should be polling!" and scrobbled backlog from way before it paused. Is it possible to only scrobble backlog that started within a certain amount of time of the beginning of the error?

FoxxMD commented 7 months ago

What is the reason for only wanting to get backlogged played from after it stopped? MS should be determining the backlogged plays that have already been scrobbled and only scrobbling new stuff anyway.

duckfromdiscord commented 7 months ago

For some reason I keep getting double scrobbles with times about 5 minutes after the original scrobbles. They seem to always be after the original scrobble but before the next song. Perhaps this is within the scope of #91

wynkenstein commented 6 months ago

Same problem for me. On FreeBSD, scrobble from spotify and save to Maloja. As long as the scrobbler is running, everything seems fine, but after restarting Multiscrobbler it reads a bunch of backlog songs which are already scrobbled and scrobbles them again with exactly 3 minutes of time difference. Sometimes it affects 5 songs, sometimes 20, it depends on the backlog size.

edit: Just checked some of those songs. Every song with a duration longer than 3 minutes is scrobbled as a duplicate from backlog, and every song with less than 3 minutes duration is not.