# Web Assemby error when decoding draco gltf

**URL:** <https://forum.babylonjs.com/t/web-assemby-error-when-decoding-draco-gltf/9817>\
**Category:** Bugs\
**Created:** [April 8, 2020, 12:50pm UTC](https://forum.babylonjs.com/t/web-assemby-error-when-decoding-draco-gltf/9817 "2020-04-08T12:50:24Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![shaileshiyer](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/shaileshiyer/32/2125_2.png) [@shaileshiyer](https://forum.babylonjs.com/u/shaileshiyer)\
**Post date:** [April 8, 2020, 12:50pm UTC](https://forum.babylonjs.com/t/web-assemby-error-when-decoding-draco-gltf/9817/1 "2020-04-08T12:50:24Z")

</div>

Hey, Since yesterday while loading a draco compressed gltf file into the scene. It sometimes fails with a web assembly error stopping the engine from starting up and showing the models.  
Its seems to be web assembly link error. on webassembly.instantiate().  
It seems to occur infrequently. Can someone help me to understand whats happening.  
The internet connection is stable to I dont think it is an issue trying to fetch the wrapper file.

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/5/570af20b03ebb69e26ba00d0c543684f5d577bce.png)

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [April 8, 2020, 2:52pm UTC](https://forum.babylonjs.com/t/web-assemby-error-when-decoding-draco-gltf/9817/2 "2020-04-08T14:52:43Z")

</div>

Pinging @bghgary

---

<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 8, 2020, 3:37pm UTC](https://forum.babylonjs.com/t/web-assemby-error-when-decoding-draco-gltf/9817/3 "2020-04-08T15:37:15Z")

</div>

Hmm, never seen this before. Can you share a repro?

---

<div class="post-metadata">

**Author:** ![Matthew\_Blackwood](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/matthew_blackwood/32/7721_2.png) [@Matthew\_Blackwood](https://forum.babylonjs.com/u/Matthew_Blackwood)\
**Post date:** [April 8, 2020, 4:29pm UTC](https://forum.babylonjs.com/t/web-assemby-error-when-decoding-draco-gltf/9817/4 "2020-04-08T16:29:16Z")

</div>

I have been getting the same error since 2 days or so ago. I “fixed” it by using the cdn version of the draco files instead of the preview ones.

---

<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 8, 2020, 4:55pm UTC](https://forum.babylonjs.com/t/web-assemby-error-when-decoding-draco-gltf/9817/5 "2020-04-08T16:55:03Z")

</div>

Hmm, that sounds like there is a bug in the latest version of Draco 1.3.6. I just updated it. I still would like a repro to find out more though. Would you be able to provide something? I can’t repro it.

---

<div class="post-metadata">

**Author:** ![Matthew\_Blackwood](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/matthew_blackwood/32/7721_2.png) [@Matthew\_Blackwood](https://forum.babylonjs.com/u/Matthew_Blackwood)\
**Post date:** [April 8, 2020, 5:33pm UTC](https://forum.babylonjs.com/t/web-assemby-error-when-decoding-draco-gltf/9817/6 "2020-04-08T17:33:09Z")

</div>

It seems to be working now. This is one of the pages that wasn’t working for me:

[www.forensic-visuals.com/11ftoot8/index.html](http://www.forensic-visuals.com/11ftoot8/index.html)

the glb file that wasn’t working was:  
[www.forensic-visuals.com/11ftoot8/models/scenery\_compressed.glb](http://www.forensic-visuals.com/11ftoot8/models/scenery_compressed.glb)

I created the file by using kronos’ fbx2gltf and then gltf-pipeline to convert the gltf to a compressed glb

---

<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 8, 2020, 5:54pm UTC](https://forum.babylonjs.com/t/web-assemby-error-when-decoding-draco-gltf/9817/7 "2020-04-08T17:54:13Z")

</div>

I’m guessing there was a caching issue and the wasm / wrapper.js were mismatched perhaps?

---

<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 8, 2020, 6:00pm UTC](https://forum.babylonjs.com/t/web-assemby-error-when-decoding-draco-gltf/9817/8 "2020-04-08T18:00:13Z")

</div>

FYI, Draco is now recommending that everyone use their [CDN](https://github.com/google/draco#version-136-release) for the files. You can configure Babylon to point there if you want. [DracoCompression - Babylon.js Documentation](https://doc.babylonjs.com/api/classes/babylon.dracocompression)

---

<div class="post-metadata">

**Author:** ![shaileshiyer](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/shaileshiyer/32/2125_2.png) [@shaileshiyer](https://forum.babylonjs.com/u/shaileshiyer)\
**Post date:** [April 9, 2020, 4:43am UTC](https://forum.babylonjs.com/t/web-assemby-error-when-decoding-draco-gltf/9817/9 "2020-04-09T04:43:22Z")

</div>

I will do that.
