The Bug
Allays will travel far away from notebox and get lost when the player is not around.
(This happens to singleplayer too when the player leave the allays in the world spawn and then go exploring around the world)
Reproduce
Go on a server
Get some allays
Bring the allays to a repetitively playing notebox
Log off but keep the chunk with the allays loaded
Rejoin at a later time
Observed Result
The Allays traveled away
Expected Result
The Allay would stay around the notebox
Linked issues
Attachments
Comments

This is run on a vanilla server, I'm using the fabric to take screenshots with shaders as we head towards the stronghold today. As allays move around often I have no time to switch back to a vanilla client.
Regardless of whether the server that you were playing on is vanilla, your client is modified, which could have had an impact on the outcome of the situation. Please test if this issue is present in a complete vanilla environment and let us know if you were able to recreate the same behavior, as the bug tracker only handles reports that exist under these circumstances.

First of all, the mob behavior is operated by the server which is vanilla, secondly, I can assure you that when the mob went missing I was using the vanilla client. And the player who found the allays at -500, 10 first is also using vanilla.
It took a month for these allays to be gone completely and this time I found only 4 out of 6 missing allays out of pure luck, I do not think finding them again in another random place would be that easy.
Besides, in MC-253735 @Leandro Gimenes da Silveira points to the same kind of allay behavior: allay "started to fly strangely high". WHich clearly shows that this problem is not exclusively happening in my game

ok, can you reproduce the issue in complete vanilla once again?

I'm trying to, although I'm pretty sure it happened on vanilla.
It's not up to me but the allays to lose their way by this bug. Last time it took them a month...
But one thing to update. The same issue was found to happen to the bees too. All the bees from a total of 7 full beehives were all missing. The only problem is that unlike the allays, it's hard to determine whether a been is naturally generated or from the bees we lost

Update
Another allay was found at -340, 300, over 200 blocks away from the notebox, this time with 1.19.1 vanilla client


Update:
My allays are again lost, along with my bees, the allays were eventually found 400+ blocks away toward the north-west, I suppose bees traveled that way too, but it's hard to tell since there are natural bees around the map.
I also found a zombie piglin halfway there, who is 200+ blocks away from the nearest portal and by the time I found him he was stuck at a corner of a cliff facing south-east and repeatedly attempting to navigate into the corner.
Then I found this ticket, I suppose the allays and the piglin are suffering from the same issue the bees have in:

And again, this time also in the north-west.
[media]
How is this report different from your previous report MC-253664?

Hey, stop marking tickets as 'Resolved' when they are clearly not 'resolved'!
This is a serious behavior bug that affects multiple mobs but all I can see from the replies and actions are worthless attempts to deny the fact and cover things up! It disappoints me to see long-existing problems like MC-206401 are still there after so many versions and claims of it being 'fixed'.
And to @Anthony Cicinelli, if you could kindly read the conclusion of MC-253664 you will easily notice that the last ticket was marked as 'resolved' arbitrarily with the assumption that the allays suffocated in blocks. This ticket however is an update to prove the previous assumption wrong! As the allays did not suffocate during chuk load but instead suffered from a pathfinding bug that brought them away from their regular routine.

@unknown Please check the resolutions statuses of reports. MC-253664 was marked as Cannot Reproduce which is why I asked if it was the same issue. This report was marked as Awaiting Response meaning it would reopen once you commented. Also I was unable to reproduce this. Is it possible while traveling with your Allays you simply traveled at a fast speed with an Elytra or Speed II causing them to get stuck in unloaded chunks?

@Anthony Cicinelli My apology for the misunderstanding, I'm in a bad mood for keep losing all my mobs.
No, I did not lose my allays by traveling too fast, I'm aware of their slow speed and was very cautious toward that when I brought them back. In fact, the issue is not at all related to speed. As I mentioned in MC-253664 I bound all the allays to a notebox in my base and have a redstone pulse every second to keep the notebox playing. But still, I would find allays missing every once in a while.
MC-253664 was marked as cannot reproduce because the assumption was that they suffocated in blocks due to MC-2025. But the assumption was proved wrong as my latest finding showed that the missing allays were not killed but instead traveled to far locations toward north-west (and north-west only) of the notebox( as described in MC-255061 ). Meanwhile, I also observed the same issue with my bees where all the bees from a total of 7 beehives all abandoned their hives and traveled away towards the north-west. So I think what happened to my allays was an allay counterpart of MC-206401.
This could be a bit hard to reproduce as it happens randomly and may take some time to happen. I usually lose 1-3 allays every week into the game.
It happens to me fairly often because I was playing on a multiplayer server (3rd party vanilla server run by my friend on his laptop). As the first player in the game, my base was built in the spawn chunk range, so it would always be loaded long as there are players online and playing in the overworld. So my allays are active at least 12/24 hours per day, increasing the chance to encounter the issue.
Most other players are building a settlement in a far-away land south of the spawn, and sus the spawn chunk and my base should be loaded by them most of the time. And since they don't really come back to the spawn, we can exclude player interference in the issue.
Furthermore, the north-west of the spawn is remote and mostly unexplored, there are no player activities in that direction, so we can also exclude the possibility of the allays got there by chasing a player (another proof is that when I found them again, they are still holding the item I gave them and treat me as their master).
One of the assumptions I have is that this might happen more often when the allays are loaded indirectly (loaded remotely by players through the spawn chunks mechanic in my case). However, MC-253735 and MC-206401 do not mention this aspect, so it could also happen when a player is around.
Another guess is probably a problem with the world seed but I doubt if that could be the real case. -8545884088508164493 is the seed for my world just in case.

For me, the same behavior has occurred with bees.

The challenge of reproducing this is that the allays must be loaded with the absence of their owner, because if stand close to observe them in singleplayer, they will just pathfind back to you once they wander out of the notebox's range

It appears that this issue only happens on multiplayer based on MC-253443, I've updated the summery and description based on these findings

@Anthony Cicinelli I never tried this in singleplayer, the main problem of reproducing this in singleplayer is that 1.you have to somehow load the allays while not being in it's player seeking range. 2.keep the game running for a long time.
I only have one laptop so I can run any long-term experiment, for the first issue, just like @PlumParrot said, bees have a similar issue and they don't follow the player, maybe it's better to experiment with bees?


Can confirm in 1.19.3 and 23w04a

Affects 1.20.1.
This is not exclusive to multiplayer. You can have this occur if allays cannot find you in singleplayer (i.e. you flew away with elytra and they couldn't keep up) or presumably if the player is in spectator mode.

Can confirm 1.21
This report is invalid as your game was modified when experiencing this issue. The F3 debug menu indicates you're running a non-vanilla client, and the bug tracker only handles issues that occur under complete vanilla circumstances.