ReactJS project babylon - Error when interacting Inspector/Scene Explorer

babylon.inspector.bundle.js:47 Uncaught TypeError: Cannot read property 'getEngine' of null
at new e (babylon.js:16)
at Function.get (babylon.js:16)
at new e (babylon.js:16)
at t.setGizmoMode (babylon.inspector.bundle.js:26)
at onClick (babylon.inspector.bundle.js:26)
at Object.l (babylon.inspector.bundle.js:47)
at h (babylon.inspector.bundle.js:47)
at babylon.inspector.bundle.js:47
at f (babylon.inspector.bundle.js:47)
at it (babylon.inspector.bundle.js:47)
at at (babylon.inspector.bundle.js:47)
at lt (babylon.inspector.bundle.js:47)
at ht (babylon.inspector.bundle.js:47)
at j (babylon.inspector.bundle.js:47)
at V (babylon.inspector.bundle.js:47)
at $t (babylon.inspector.bundle.js:47)
at qt (babylon.inspector.bundle.js:47)
at t.unstable_runWithPriority (babylon.inspector.bundle.js:55)
at Ua (babylon.inspector.bundle.js:47)
at A (babylon.inspector.bundle.js:47)
at Xt (babylon.inspector.bundle.js:47)

So seemingly out of nowhere, I started getting this error when interacting with the inspector and scene explorer. After this the inspector disappears.

I did upgrade all of my npm packages and to the latest Babylon today, but I also have made changes, nothing to the inspector though.

I have quite an interesting set of loading operations, as I am making an internal tool for viewing multiple glb/gltf files and automate some scene setup. It does go between 2 scenes, one is merely for the drag and drop/select files step, and another scene for the completion of the load. Tt constructs the scene and displays the debug layer via the;. Which works, no errors are thrown througout the load, its just when interacting with the debug panels.

So it simply had to do with code autocomplete importing the AssetsManager from the non @ version of Babylon, interestingly loads with AssetsManager were still working and this simply broke the inspector. Anyway, all resolved.

Also, I didn’t have the non @version installed so Idk why it autocompleted to that in the first place.

1 Like