# Running Babylon.js on server gets error when using GUI.AdvancedDynamicTexture.CreateForMesh()

**URL:** <https://forum.babylonjs.com/t/running-babylon-js-on-server-gets-error-when-using-gui-advanceddynamictexture-createformesh/20404>\
**Category:** Questions\
**Created:** [April 28, 2021, 6:03pm UTC](https://forum.babylonjs.com/t/running-babylon-js-on-server-gets-error-when-using-gui-advanceddynamictexture-createformesh/20404 "2021-04-28T18:03:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Scherotter](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/michael_scherotter/32/4720_2.png) [@Michael\_Scherotter](https://forum.babylonjs.com/u/Michael_Scherotter)\
**Post date:** [April 28, 2021, 6:03pm UTC](https://forum.babylonjs.com/t/running-babylon-js-on-server-gets-error-when-using-gui-advanceddynamictexture-createformesh/20404/1 "2021-04-28T18:03:17Z")

</div>

I am running Babylon.js on a node server.  
When I call GUI.AdvancedDynamicTexture.CreateForMesh(plane), I get the error  
ReferenceError: OffscreenCanvas is not defined.  
is this because DynamicTexture cannot be used as they rely on HTML canvas?  
Thanks,  
Michael

---

<div class="post-metadata">

**Author:** ![JCPalmer](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jcpalmer/32/42_2.png) [@JCPalmer](https://forum.babylonjs.com/u/JCPalmer)\
**Post date:** [April 28, 2021, 6:22pm UTC](https://forum.babylonjs.com/t/running-babylon-js-on-server-gets-error-when-using-gui-advanceddynamictexture-createformesh/20404/2 "2021-04-28T18:22:56Z")

</div>

Yes, I am pretty sure it is. The part which a webGL context cannot do, which 2d canvas context can, is interact with fonts. They really do not mean anything to a GPU. This is also an obstacle for BABYLON native, which is also lacking a DOM as well.

---

<div class="post-metadata">

**Author:** ![bghgary](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bghgary/32/48532_2.png) [@bghgary](https://forum.babylonjs.com/u/bghgary)\
**Post date:** [April 29, 2021, 8:26pm UTC](https://forum.babylonjs.com/t/running-babylon-js-on-server-gets-error-when-using-gui-advanceddynamictexture-createformesh/20404/3 "2021-04-29T20:26:48Z")

</div>

Yes, this is true for Babylon Native, but we (or really just @Cedric) are working on a polyfill. [Canvas polyfill PoC by CedricGuillemet · Pull Request #441 · BabylonJS/BabylonNative (github.com)](https://github.com/BabylonJS/BabylonNative/pull/441)

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [April 30, 2021, 7:39am UTC](https://forum.babylonjs.com/t/running-babylon-js-on-server-gets-error-when-using-gui-advanceddynamictexture-createformesh/20404/4 "2021-04-30T07:39:02Z")

</div>

I confirm what @bghgary says. We are working on a Canvas polyfill. It’s a WIP. No ETA yet.
