Some simulator builds result in a simulator that appears to be running, objects are created in the world, but is a “zombie”. You can interact with some objects in the world, but they do not seem to have an Update loop running? They are frozen in time and space.
Spinning up new simulators from that build will all result in the same issue.
The logs show repeating errors that look similar to:
2024-10-29T 12:03:44-07:00Z 19:03:44.738 (coherence) CoherenceBridge: We can’t handle a command for entity ‘3’, because it doesn’t exist. context=coherence Bridge (Coherence.Toolkit.CoherenceBridge) commandType=Coherence.Generated._500bd1e80bf364d339fcab264f5210de_46d27c5fca1045c0b829e4a63fe0f783 context=coherence Bridge (Coherence.Toolkit.CoherenceBridge)
I do not see any other script errors in the simulator unity logs (other than shader nonsense).
Rebuilding and reuploading the simulator - with no code changes - will often fix the issue.
This has been happening with 1.2.4 and before, but I updated to 1.3.1 just to verify it is indeed still happening in 1.3.1 also.
One possible clue to add - I think what fixes this broken state is to bake and upload schema then upload a new simulator build - even though nothing has changed and the schema id is the same…?
Hey, you can look at your simulator logs in the dashboard to see the likely causes. I just took a look and I see there’s a crash in a command. Looks like Player.OnLevelUp is crashing with a null ref in the callback. Also I see errors about not being able to handle commands for entity 3. This suggests the simulator doesn’t have a live query.
Thanks for the reply. The exception OnLevelUp is now fixed and unrelated unfortunately. The same symptom is happening with our latest simulator build again today.
You’ll see this same odd error below. We do not exactly have a live query, but do have Tag Query objects which control visibility of objects in the world.
Could be some race condition? I’m not sure what would cause some builds to work and others not to?
2024-10-30T 15:50:03-07:00Z 22:50:03.406 (coherence) CoherenceBridge: We can’t handle a command for entity ‘3’, because it doesn’t exist. context=coherence Bridge (Coherence.Toolkit.CoherenceBridge) commandType=Coherence.Generated._500bd1e80bf364d339fcab264f5210de_46d27c5fca1045c0b829e4a63fe0f783 context=coherence Bridge (Coherence.Toolkit.CoherenceBridge)
So there could easily be a race condition here. Network concurrency is a minefield for races and coherence does a lot of work to clear the mines for you but there are some things that can still catch you.
Is the recipient (the simulator?) of the command the authority?
Are you creating the entity and then immediately sending the command?
I found one thing fishy in our project. We start in a Bootstrap scene that immediately branches based on IsSimulator or client. On the simulator that was triggering a scene change in Awake that might have caused the global CoherenceBridge in the same scene not to fully initialize correctly depending on script execution order which can be nondeterministic. I delayed that scene change to allow the CoherenceBridge to Awake/Start fully and will monitor to see if the issue returns.