Strange Position query failed

Good day. Maybe someone could give me right idea) Making project on mopidy , every 2-3 hours getting situation when mopidy cant get end of the song , so it plays silent when its out of song length ( ex. 5 mins , in iris could be 10 20 30 mins and so on).After restarting problem song it plays it right.
In logs every time Position query failed .
What actions could lead to this ?

i have shuffle and removing via automated script , but when truing to shuffle with hands - no error .

Dec 09 00:23:19 keei mopidy[949]: DEBUG [HttpServer] mopidy.http.handlers Received RPC message from 10.0.0.81: b’{\r\n “jsonrpc”: “2.0”,\r\n “id”: “1”,\r\n “method”: “core.tracklist.shuffle”\r\n}’
Dec 09 00:23:19 keei mopidy[949]: DEBUG [Core-6 (_actor_loop)] mopidy.core.tracklist Triggering event: tracklist_changed()
Dec 09 00:23:19 keei mopidy[949]: DEBUG [Core-6 (_actor_loop)] mopidy.listener Sending tracklist_changed to CoreListener: {}
Dec 09 00:23:19 keei mopidy[949]: INFO [HttpServer] tornado.access 200 POST /mopidy/rpc (10.0.0.81) 4.58ms
Dec 09 00:23:19 keei mopidy[949]: DEBUG [AutoplayFrontend-11 (_actor_loop)] mopidy_autoplay.frontend on_event(tracklist_changed, {})
Dec 09 00:23:19 keei mopidy[949]: DEBUG [Thread-10] mopidy_autoplay.frontend save_state()
Dec 09 00:23:19 keei mopidy[949]: DEBUG [Audio-2 (_actor_loop)] mopidy.audio.actor Position query failed
Dec 09 00:23:19 keei mopidy[949]: DEBUG [Thread-10] mopidy_autoplay.frontend State written to file ‘/var/lib/mopidy/autoplay/autoplay.state’.
Dec 09 00:23:19 keei mopidy[949]: DEBUG [HttpServer] mopidy.http.handlers Received RPC message from 10.0.0.81: b’{\r\n “jsonrpc”: “2.0”,\r\n “id”: “1”,\r\n “method”: “core.tracklist.shuffle”\r\n}’
Dec 09 00:23:19 keei mopidy[949]: DEBUG [Core-6 (_actor_loop)] mopidy.core.tracklist Triggering event: tracklist_changed()
Dec 09 00:23:19 keei mopidy[949]: DEBUG [Core-6 (_actor_loop)] mopidy.listener Sending tracklist_changed to CoreListener: {}
Dec 09 00:23:19 keei mopidy[949]: DEBUG [AutoplayFrontend-11 (_actor_loop)] mopidy_autoplay.frontend on_event(tracklist_changed, {})
Dec 09 00:23:19 keei mopidy[949]: DEBUG [Thread-10] mopidy_autoplay.frontend save_state()
Dec 09 00:23:19 keei mopidy[949]: INFO [HttpServer] tornado.access 200 POST /mopidy/rpc (10.0.0.81) 1.86ms
Dec 09 00:23:19 keei mopidy[949]: DEBUG [Audio-2 (_actor_loop)] mopidy.audio.actor Position query failed
Dec 09 00:23:19 keei mopidy[949]: DEBUG [Thread-10] mopidy_autoplay.frontend State written to file ‘/var/lib/mopidy/autoplay/autoplay.state’.

I don’t see any tracks being removed here. Could you provide a minimal script to reproduce ? What sort of tracks are these? What versions?

And put of curiosity, do you need to keep shuffling? Doesn’t random mode do what you need?

And if you are trying to remove tracks you’ve played then use consume mode.
.

Yes , i need shuffering becouse my project needs to insert song (promo material) in next position after current track . So shuffering every circle (in the end of playlist) is the only 1 solution i found.

And about problem - i found issure , if next song has a problem (no file , corrupted file , mopidy cant switch , but dont write this to log (there is no such file , etc) , writes only position query failed) . And because of shuffering i couldnot track the problem ( shuffer , and next sont will not have problem ) , but mopidy stucks with position querry failed , and , only if i play song again it will be switched to next.

Found issure by luck , disabled shuffering , got error , looked to iris , tried to switch next , and mopidy just jumped over 1 problem song (with no file) to next in queue.

Im happy) now issue is understandable , and i can see next thing - why there is no file )

TY for answering so fast)

my project is TG bot that could play spotify (sync , not online) or AI choosen songs , with promo materials. Thats because i have all this issues with files ( i run syncing every 1 hour to spotify , removing old , adding new , running sound normalization over tracks (this could remove mp3s i think if it fails) , inserting promo and 2d additional playlist in dynamic percent of main).

This is interesting, there’s definitely a logging bug here at the very least. What sort of tracks are these? If Spotify is involved then I could easily imagine a problem since the extension changed a lot lately but local/stream etc should all be solid.

A simple recipe would be helpful as I really don’t understand what you are doing (sync Spotify?? Normalisation removing tracks??)

Nice to see you interesting)
Syncing spotify - after spotipy gets tracks to my server , then scripts syncing them to mopidy (via api) . Normalazing - script works on mopidy box , runs mp3gain to make volume at same level for all tracks (after spotipy downloads them from youtube music (this is how it works) they have different volume levels. I could expect removing , but im not sure , will test , somehow they are disappearing )) My vision - mp3gain could get track , and if it has bad mp3 tags for example , mp3gain could remove it at all .
You could translate this with google lens , its on russian ) Im controlling mopidy box via TG bot , that runs on my server.