# Error while loading gltf

**URL:** <https://community.cesium.com/t/error-while-loading-gltf/7501>\
**Category:** CesiumJS\
**Created:** [September 28, 2018, 5:33am UTC](https://community.cesium.com/t/error-while-loading-gltf/7501 "2018-09-28T05:33:36Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![san](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/san/32/2011_2.png) [@san](https://community.cesium.com/u/san)\
**Post date:** [September 28, 2018, 5:33am UTC](https://community.cesium.com/t/error-while-loading-gltf/7501/1 "2018-09-28T05:33:36Z")

</div>

![error.PNG](https://global.discourse-cdn.com/cesium/original/1X/212728d9b5802aafe47a27cca4aa9a4c2bce9efa.png)

RuntimeError: Fragment shader failed to compile. Compile log: ERROR: 0:62: ‘undefined’ : undeclared identifier  
ERROR: 0:62: ‘texture2D’ : no matching overloaded function found  
ERROR: 0:62: ‘SRGBtoLINEAR4’ : no matching overloaded function found  
ERROR: 0:62: ‘=’ : dimension mismatch  
ERROR: 0:62: ‘=’ : cannot convert from ‘const mediump float’ to ‘highp 4-component vector of float’

why i,m getting this error while loading gltf on the map.

---

<div class="post-metadata">

**Author:** ![omar](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/omar/32/1999_2.png) [@omar](https://community.cesium.com/u/omar)\
**Post date:** [September 28, 2018, 9:02pm UTC](https://community.cesium.com/t/error-while-loading-gltf/7501/2 "2018-09-28T21:02:03Z")

</div>

Can you share the code you used to load the model? And what version of CesiumJS you’re using?

---

<div class="post-metadata">

**Author:** ![san](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/san/32/2011_2.png) [@san](https://community.cesium.com/u/san)\
**Post date:** [September 29, 2018, 7:32am UTC](https://community.cesium.com/t/error-while-loading-gltf/7501/3 "2018-09-29T07:32:47Z")

</div>

var entity = viewer.entities.add({

position : position,

model : {

uri : ‘…/Build/tiles2/nn/LibertStatue.gltf’,

}

});

cesium version:1.47

---

<div class="post-metadata">

**Author:** ![omar](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/omar/32/1999_2.png) [@omar](https://community.cesium.com/u/omar)\
**Post date:** [October 1, 2018, 2:45pm UTC](https://community.cesium.com/t/error-while-loading-gltf/7501/4 "2018-10-01T14:45:44Z")

</div>

Can you confirm that this a valid model by trying it in this validator tool?

[http://github.khronos.org/glTF-Validator/](http://github.khronos.org/glTF-Validator/)

If the model itself is valid, it might be a bug in Cesium. I would try it with the latest version of CesiumJS, and if that doesn’t work, please either share your model here or open a [GitHub issue](https://github.com/AnalyticalGraphicsInc/cesium/issues).

---

<div class="post-metadata">

**Author:** ![san](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/san/32/2011_2.png) [@san](https://community.cesium.com/u/san)\
**Post date:** [October 2, 2018, 6:07am UTC](https://community.cesium.com/t/error-while-loading-gltf/7501/5 "2018-10-02T06:07:06Z")

</div>

I got some error messages in the validator I converted some obj sample to gltf .i’m trying to load this [obj](https://free3d.com/3d-model/statue-of-liberty-73656.html) file by converting it to gltf , but i’m getting these errors dont know why, do you have any idea?

---

<div class="post-metadata">

**Author:** ![omar](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/omar/32/1999_2.png) [@omar](https://community.cesium.com/u/omar)\
**Post date:** [October 2, 2018, 1:34pm UTC](https://community.cesium.com/t/error-while-loading-gltf/7501/6 "2018-10-02T13:34:43Z")

</div>

What did you use to convert it? I just tried it with obj2gltf ([https://github.com/AnalyticalGraphicsInc/obj2gltf](https://github.com/AnalyticalGraphicsInc/obj2gltf)) and it seems to work in Cesium. I just ran:

obj2gltf -i .\LibertStatue.obj -o LibertyStatue.gltf

``

Make sure the materials and images are all in the same folder when you’re converting.

---

<div class="post-metadata">

**Author:** ![san](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/san/32/2011_2.png) [@san](https://community.cesium.com/u/san)\
**Post date:** [October 3, 2018, 5:39am UTC](https://community.cesium.com/t/error-while-loading-gltf/7501/7 "2018-10-03T05:39:41Z")

</div>

i used fme translator to convert.but it didnt work.Thank for the converter can i use this converter in my web application.Does it work on the fly??Can you share any code samples how you have done the conversions.

---

<div class="post-metadata">

**Author:** ![omar](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/omar/32/1999_2.png) [@omar](https://community.cesium.com/u/omar)\
**Post date:** [October 3, 2018, 11:45am UTC](https://community.cesium.com/t/error-while-loading-gltf/7501/8 "2018-10-03T11:45:54Z")

</div>

You can use it in a web application if it has a Node.js backend, just follow the instructions and code samples here [https://github.com/AnalyticalGraphicsInc/obj2gltf](https://github.com/AnalyticalGraphicsInc/obj2gltf).

Otherwise, it should theoretically be possible to bundle it for use in a browser with Browserify ([http://browserify.org/](http://browserify.org/)) but I haven’t tested this myself.

It might be easier to just convert your models ahead of time. What kind of application are you building?
