[OneSync] Player state bags stop working after a certain server id

Client

Using canary? Yes
Windows version: Win 10 Pro, latest update
System specifications: CPU: i74790k, GPU: 980Ti, 16Gb Ram

Server

Operating system: Windows 10 Pro
Artifact version: 2967
IP address: localhost
Resources: 200
System specifications: same as above

Incident

Summary: Player state bags obtained using the Player(serverId) function stop working after a certain Id, when this happens all joining player won’t be bale to have state bags assigned to them, but all the players who joined initially will still have their state bags working as usual.
Expected behavior: State bags can be assigned all the time
Actual behavior: State bags can be only to the first players joining the server
Steps to reproduce: Gather 3-4 volunteers and ask them to join-leave the server, on each join check if you can assign a state bag using their new server Id.
Server/Client?
Files for repro (if any):
Error screenshot (if any):
.dmp files/report IDs:

Any additional info:
This is a video showcasing the issue: https://streamable.com/fs3lyf, all i did was join my server shortly after a restart, there were 25 players online and the highest server Id was 42. As you can see I use runcode to assign/print state bags and they all work up until server Id 8, everything higher doesn’t let me assign anything to the state bag.I run my tests using Onesync Infinity on latest recommended artifact. but from my tests the issue persists on 2949 and 2959 too.

On a further note, while doing tests I noticed state bags created using Entity(netId) wouldn’t replicate if they are not assigned at least once by the server, once it is assigned by the server, client sided changes replicate too.

EDIT:
Little update, I made a server command that prints all players IDs and state bags, this is the command I used: https://pastebin.com/ApEZ6b5n and these are the results I got right after a restart occurred: https://pastebin.com/CtWb8cD1, same restart after 30 minutes: https://pastebin.com/kQ1g1qu4

As you can see the results are always consistent with the initial report, all IDs above 20 don’t have state bags. The Id at which everything start breaking is variable, but its always very low (less than 20/30)

Is this bug confirmed / still happening? This thread not being answered and popping up as one of the first results on Google may significantly impact others’ decisions on whether to use the feature or not

I was certain there were responces to this thread by bubble… But my memory is :poop:

Can confirm no issues for a long time.

This was fixed a very long time ago. but probably only a later report topic was marked as fixed.

I believe fix(gamestate/server): deferred creation of player state bags · citizenfx/fivem@3c3dcf9 · GitHub or so fixed it, no idea.