# THREE.WebGLRenderer: Context Lost

**URL:** <https://forum.8thwall.com/t/three-webglrenderer-context-lost/856>\
**Category:** Technical Support\
**Tags:** FAQ, a-frame\
**Created:** [March 25, 2024, 7:07am UTC](https://forum.8thwall.com/t/three-webglrenderer-context-lost/856 "2024-03-25T07:07:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Camilo\_MEDINA](https://avatars.discourse-cdn.com/v4/letter/c/9dc877/32.png) [@Camilo\_MEDINA](https://forum.8thwall.com/u/Camilo_MEDINA)\
**Post date:** [March 25, 2024, 7:07am UTC](https://forum.8thwall.com/t/three-webglrenderer-context-lost/856/1 "2024-03-25T07:07:19Z")

</div>

Hi,

I have started to get this error in my experience:

**THREE.WebGLRenderer: Context Lost**

It happens when I switch between scenes, I am using the example that comes in Maps.

```auto
const swapBody = (newHtml) => {
  const scene = document.body.querySelector('a-scene')
  scene.parentElement.removeChild(scene)
  document.body.insertAdjacentHTML('beforeend', newHtml)
}

```

On iOS when it happens the 8thWall page automatically reloads. It happens to me in both Safari and Chrome browsers.  
But on Android it does get the error:

**THREE.WebGLRenderer: Context Lost**.  
and then  
**THREE.WebGLRenderer: Context Restored.**

and everything continue working as expected

This error is driving me crazy and I do not know how to solve it, my scenes do not weigh more than 10 Mbs. Is there any way to dispose the scene, so that it unloads all its content before loading the new one?

---

<div class="post-metadata">

**Author:** ![Esther\_Herbert](https://avatars.discourse-cdn.com/v4/letter/e/ecc23a/32.png) [@Esther\_Herbert](https://forum.8thwall.com/u/Esther_Herbert)\
**Post date:** [July 29, 2024, 11:55am UTC](https://forum.8thwall.com/t/three-webglrenderer-context-lost/856/2 "2024-07-29T11:55:54Z")

</div>

Hi,

I’m having this same error expect when ’ **Context Restored.** ’ comes up it just remains frozen, reloads, or a white screen comes up. Was this problem rectified for you?

Please let me know.

---

<div class="post-metadata">

**Author:** ![Camilo\_MEDINA](https://avatars.discourse-cdn.com/v4/letter/c/9dc877/32.png) [@Camilo\_MEDINA](https://forum.8thwall.com/u/Camilo_MEDINA)\
**Post date:** [July 29, 2024, 12:24pm UTC](https://forum.8thwall.com/t/three-webglrenderer-context-lost/856/3 "2024-07-29T12:24:07Z")

</div>

Hi Esther,

Unfortunately, I wasn’t able to fix the issue. I tried a few different solutions, but none of them worked. The error mainly happens on iOS devices.

Could someone from the support team assist us with this?

---

<div class="post-metadata">

**Author:** ![Esther\_Herbert](https://avatars.discourse-cdn.com/v4/letter/e/ecc23a/32.png) [@Esther\_Herbert](https://forum.8thwall.com/u/Esther_Herbert)\
**Post date:** [July 29, 2024, 4:23pm UTC](https://forum.8thwall.com/t/three-webglrenderer-context-lost/856/4 "2024-07-29T16:23:45Z")

</div>

Hi,

I’ve been emailing 8th wall support for a while, I even got on a few zoom calls and shared my project with them they gave me different things to try like , optimizing my assets and codes and other small issues that I had in my projects, after fixing them the issue is still taking place.

---

<div class="post-metadata">

**Author:** ![Camilo\_MEDINA](https://avatars.discourse-cdn.com/v4/letter/c/9dc877/32.png) [@Camilo\_MEDINA](https://forum.8thwall.com/u/Camilo_MEDINA)\
**Post date:** [July 29, 2024, 5:37pm UTC](https://forum.8thwall.com/t/three-webglrenderer-context-lost/856/5 "2024-07-29T17:37:49Z")

</div>

I have tried to do exactly the same but the error persists, even using a clean project with no assets.  
When you get context lost?

---

<div class="post-metadata">

**Author:** ![GeorgeButler](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.8thwall.com/georgebutler/32/1903_2.png) [@GeorgeButler](https://forum.8thwall.com/u/GeorgeButler)\
**Post date:** [July 29, 2024, 6:35pm UTC](https://forum.8thwall.com/t/three-webglrenderer-context-lost/856/6 "2024-07-29T18:35:34Z")

</div>

Hi all,

My first recommendation is to replace all of the geometry in your scene(s) with basic primitives: cubes, spheres, or capsules to ensure that it’s not code or logic causing the context lost.

[I’d also like to share our guide on optimization](https://www.8thwall.com/docs/guides/your-3d-models-on-the-web/#texture-optimization), you’ll be very surprised how unoptimized models can be while appearing low-poly.
