# Error: Uncaught TypeError: Cannot read properties of undefined (reading 'boundingSphere')

**URL:** <https://forum.babylonjs.com/t/error-uncaught-typeerror-cannot-read-properties-of-undefined-reading-boundingsphere/42232>\
**Category:** Questions\
**Created:** [July 7, 2023, 9:48am UTC](https://forum.babylonjs.com/t/error-uncaught-typeerror-cannot-read-properties-of-undefined-reading-boundingsphere/42232 "2023-07-07T09:48:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![golubeva-webmaster](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/golubeva-webmaster/32/33464_2.png) [@golubeva-webmaster](https://forum.babylonjs.com/u/golubeva-webmaster)\
**Post date:** [July 7, 2023, 9:48am UTC](https://forum.babylonjs.com/t/error-uncaught-typeerror-cannot-read-properties-of-undefined-reading-boundingsphere/42232/1 "2023-07-07T09:48:48Z")

</div>

Hello, dear friends!  
How can I resolve this error?

![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/e/1/e1ae55a1318664a6ef0f1aa96bddd539cfe20ab9.png)

Problem description: [bug: TypeError: Cannot read properties of undefined (reading 'boundingSphere') by golubeva-webmaster · Pull Request #14089 · BabylonJS/Babylon.js · GitHub](https://github.com/BabylonJS/Babylon.js/pull/14089)

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [July 7, 2023, 12:03pm UTC](https://forum.babylonjs.com/t/error-uncaught-typeerror-cannot-read-properties-of-undefined-reading-boundingsphere/42232/2 "2023-07-07T12:03:48Z")

</div>

Welcome aboard!

The only `boundingSphere` that is accessed in `RenderingGroup` is through `subMesh.getBoundingInfo().boundingSphere` and I don’t see a reason why `getBoundingInfo()` would return `undefined`…

If possible, we would need a repro in the [Playground](https://playground.babylonjs.com/) to be able to help more.

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [July 27, 2023, 2:28pm UTC](https://forum.babylonjs.com/t/error-uncaught-typeerror-cannot-read-properties-of-undefined-reading-boundingsphere/42232/3 "2023-07-27T14:28:45Z")

</div>

Hi! As @Evgeni_Popov asked, it would be wonderful if you can reproduce this. We need a playground or a project where it is failing, otherwise we can’t really know what the issue is.

---

<div class="post-metadata">

**Author:** ![golubeva-webmaster](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/golubeva-webmaster/32/33464_2.png) [@golubeva-webmaster](https://forum.babylonjs.com/u/golubeva-webmaster)\
**Post date:** [July 27, 2023, 2:31pm UTC](https://forum.babylonjs.com/t/error-uncaught-typeerror-cannot-read-properties-of-undefined-reading-boundingsphere/42232/4 "2023-07-27T14:31:39Z")

</div>

Unfortunately, the project is very large. I have no idea how to transfer it to the playground.

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/f/a/fa2ec61649b036ca57e6121c59cc09d930481409.png)  
This is a rendering of the .gcode model for 3D printing.

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [July 27, 2023, 3:02pm UTC](https://forum.babylonjs.com/t/error-uncaught-typeerror-cannot-read-properties-of-undefined-reading-boundingsphere/42232/5 "2023-07-27T15:02:36Z")

</div>

I’ll be honest and say I wouldn’t want to patch the issue in a specific area without knowing exactly why the bounding information is suddenly null (referencing your post from GitHub - [bug: TypeError: Cannot read properties of undefined (reading 'boundingSphere') by golubeva-webmaster · Pull Request #14089 · BabylonJS/Babylon.js · GitHub](https://github.com/BabylonJS/Babylon.js/pull/14089#issuecomment-1653721325)) can you try explaining what is being done when this happens? maybe try a simple reproduction in the playground?  
What we are trying to do is to be 100% sure it is a problem in the engine. The engine is not clean of bugs for sure, but in certain times it might be some external influence that causes the issue and not directly the babylon code.
