# WebGL lost when adding Environment

**URL:** <https://discourse.threejs.org/t/webgl-lost-when-adding-environment/79484>\
**Category:** Questions\
**Tags:** drei, react-three-fiber\
**Created:** [March 13, 2025, 1:56am UTC](https://discourse.threejs.org/t/webgl-lost-when-adding-environment/79484 "2025-03-13T01:56:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Randy\_Kevin](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/randy_kevin/32/60562_2.png) [@Randy\_Kevin](https://discourse.threejs.org/u/Randy_Kevin)\
**Post date:** [March 13, 2025, 1:56am UTC](https://discourse.threejs.org/t/webgl-lost-when-adding-environment/79484/1 "2025-03-13T01:56:38Z")

</div>

is anyone know why i got THREE.WebGLRenderer: Context Lost each time i add Environment in my React three now.knowing that before it still worked very well.  
Code exemple :

```javascript
const RotatingCubeScene: React.FC<{ angle: number }> = ({ angle }) => {
  return (
    <Canvas camera={{ position: [2, 2, 4] }}>
      <OrbitControls />
      <Environment preset="city" />
      <Cube angle={angle} />
    </Canvas>
  );
};

export default RotatingCubeScene;

```

dependencies :

```javascript
"@react-three/drei": "^10.0.3",
 "@react-three/fiber": "^9.0.4",
 "@react-three/postprocessing": "^3.0.4",

```

---

<div class="post-metadata">

**Author:** ![Plate\_Reverb](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/plate_reverb/32/52931_2.png) [@Plate\_Reverb](https://discourse.threejs.org/u/Plate_Reverb)\
**Post date:** [June 30, 2025, 3:34pm UTC](https://discourse.threejs.org/t/webgl-lost-when-adding-environment/79484/2 "2025-06-30T15:34:44Z")

</div>

I created my account just to answer you and for people who might get the same problem in the future.

So I basically just removed Suspense hook. I think it might be a conflict of r3f/drei/react versions, because the same problem appears when I’m trying to add useTexture from drei, not only Environment. I did the tests on my old project and everything is working fine. On a fresh project I get the same error as you: with a simple canvas without everything else and only Environment added (preset texture, nothing heavy weight) I get webgl context lost.
