# Unknown error with WebGL (BabylonJs + React + Vite)

**URL:** <https://forum.babylonjs.com/t/unknown-error-with-webgl-babylonjs-react-vite/39924>\
**Category:** Questions\
**Tags:** react, webgl\
**Created:** [April 16, 2023, 7:17am UTC](https://forum.babylonjs.com/t/unknown-error-with-webgl-babylonjs-react-vite/39924 "2023-04-16T07:17:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cody0203](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cody0203/32/31476_2.png) [@cody0203](https://forum.babylonjs.com/u/cody0203)\
**Post date:** [April 16, 2023, 7:17am UTC](https://forum.babylonjs.com/t/unknown-error-with-webgl-babylonjs-react-vite/39924/1 "2023-04-16T07:17:24Z")

</div>

Hello guys, i’m absolutely new here, and I only have experience with React.  
I’m starting with my very first Babylon app but I have trouble in my local environment when I use skybox. The playground is still good [Playground](https://playground.babylonjs.com/#Q3TT8Q).  
The error message is: `webGL: INVALID_OPERATION: uniformMatrix4fv: location is not from current program`

 ![Screenshot 2023-04-16 at 14.08.13](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/6/d/6d28a05c511fb91b0efb71b227c63dc2c0b4787b.png)

Here is my code which running in problem at local: [GitHub - cody0203/babylon-react](https://github.com/cody0203/babylon-react).  
Versions:  
Node 19.7.0  
BabylonJs 5.56.0  
React 18.2.0  
Chrome 112.0.5615.49 (Official Build) (x86\_64)  
Typescript 4.9.3  
Vite 4.2.0

Have a nice weekend, thank you guys.

---

<div class="post-metadata">

**Author:** ![cody0203](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cody0203/32/31476_2.png) [@cody0203](https://forum.babylonjs.com/u/cody0203)\
**Post date:** [April 16, 2023, 7:24am UTC](https://forum.babylonjs.com/t/unknown-error-with-webgl-babylonjs-react-vite/39924/2 "2023-04-16T07:24:02Z")

</div>

Oh i found that, just need to dispose engine when unmount the React component. `this.engine.dispose()`
