How to reproduce
Place a record in a jukebox. Observe that you can hear it play.
Reload the world.
→ ❌ The record is no longer playing
The cause of this bug is the fact that Jukeboxes don't serialize playing state. In fact, from what I've heard, the playing data is actually stored to the player for that session: this is why you can place a record in a jukebox, teleport far away, and return, and it will still be playing.
Related issues
is duplicated by
relates to
Attachments
Comments


Confirmed.
But its unfixable. Server hasn't length of music disk files.
The server doesn't need to store the music disk files' length. All it needs to do is store how long the jukebox has been playing, or perhaps a timestamp of when it was last played. Giving the client this information would be sufficient for the client to determine whether to play the record and which point to start from.
This information would be provided any time the client is given the data of the chunk (similar to how the server already provides other tile entity data, such as spawner data, to the client upon chunk load), and would otherwise be refreshed when a jukebox is played. The jukebox's coordinates can be used to ensure that any currently playing music is not played multiple times if a player is teleported away from and back to a chunk with a jukebox.
Confirmed for 1.7.5 and 14w11b

Does this still occur in the current version/snapshot 1.8/1.8.1-pre5?
No response for over a year.

Confirmed in 1.15.2 and 20w20b.
Can confirm in 20w51a.
Can confirm in 21w03a.
Can confirm in 21w05b.
Can confirm in 21w06a.
Can confirm in 21w07a. Video attached.
Can confirm in 21w11a.
Can confirm in 21w15a.
Can confirm in 21w17a.
Can confirm in 1.17.
Can confirm in 1.17.1.

Affects 1.19.4
Affects 1.20 release candidate 1
I think this should be reopened because completely breaks the functionality of the jukebox in my opinion.
I've been playing around with jukeboxes in 1.20.6. I want to make a redstone machine that will continuously shuffle play my discs so that I can hear them any time I come in range. However, if the disc is inserted while the player is outside the 64 block hearing range of the jukebox, and you then move back in range, you can't hear the disc playing. The jukebox will still give a redstone output for the duration of the disc's playtime, and parrots and allays will dance next to it for that same duration, after which the jukebox turns off and a hopper can then pick up the disc just as if it had been playing the whole time, only the player can hear nothing.
I haven't tested this with multiple players. It might be interesting to see what happens if one player inserts the disc while standing next to the jukebox while another player stands out of hearing range and then enters the hearing range. But it seems pretty clear to me that each individual player can only hear the record if it has been inserted while they're standing within hearing range of the jukebox. This seems kind of broken to me.
This bug becomes extremely noticeable with multiple players
If a disc is inserted while another player is out of range, they will not hear the disc when they come back in range.
Even worse, if the disc is removed while they're out of range, they'll still hear it playing when they come back in range.