Migrating 4.2.0 to 5.46 - all went well except a few random failing specs when headless

Hi,
I wanted to share our success and to hint on an issue.

What we did at buildin3d.com is to migrate from 4.2.0 to 5.46, now that 6.0 is almost here.
Everything went smooth, no changes in practically non of the code.

So a big thank you from us. We appreciate it

The only small thing that change is that about 3 specs started to fail randomly. We run a lot of specs a few times every day since 4.0.0 and 2-3 started to fail randomly in headless mode (chrome, 108 and 110, ubuntu) with 5.46.

When running in a non headless mode we’ve not observed random failing specs.

The specs are connected with adding onPointerObservable on scene. Sometimes it seems the scene has more than one and it should have only one. Sometimes it is like the onPointerObservable has something from the previous run even though the scene is new.
Now, this is just a speculation and I don’t know what’s going on.

Again, thank you, and I hope we will be able to track why they are failing especially if others have experienced similar things and can share some things they have tried.

Glad it all mostly worked out !!! Maybe @PolygonalSun would have an idea ?

Hey @kmitov,

When you say that there’s more than one onPointerObservable, are you saying that there are more than one Observable or that there are more than one Observer attached to the Observable?
If it’s more than one Observable, my initial thought is that there’s something that’s preventing the InputManager from disposing of the Observable between runs. Would you be able to provide any code or a PG that can demonstrate what you’re seeing? Any specifics you could provide would help us to understand what’s going on.