# Cannot import a GLTF when exported using GLTFExporter.parse

**URL:** <https://discourse.threejs.org/t/cannot-import-a-gltf-when-exported-using-gltfexporter-parse/87245>\
**Category:** Questions\
**Tags:** loaders, geometry\
**Created:** [September 30, 2025, 1:10pm UTC](https://discourse.threejs.org/t/cannot-import-a-gltf-when-exported-using-gltfexporter-parse/87245 "2025-09-30T13:10:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul](https://avatars.discourse-cdn.com/v4/letter/p/bbe5ce/32.png) [@Paul](https://discourse.threejs.org/u/Paul)\
**Post date:** [September 30, 2025, 1:10pm UTC](https://discourse.threejs.org/t/cannot-import-a-gltf-when-exported-using-gltfexporter-parse/87245/1 "2025-09-30T13:10:45Z")

</div>

Hi,

I’m obviously missing something.

I use GLTFExporter.parse with a GLB mesh I loaded with GLTFLoader. I save the results of parse and then try and reload with both GLTFLoader which doesn’t work.

I also read I should use the parse function of ObjectLoader, but this fails too. I look at the code in ObjectLoader and it expects json.geometries but all I see returned from GLTFLoader.parse is buffers so I am assuming the two don’t work together.

How do I load the output from GLTFExporter.parse or do you recommend using another method?

Cheers

Paul

---

<div class="post-metadata">

**Author:** ![Lawrence3DPK](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/lawrence3dpk/32/29184_2.png) [@Lawrence3DPK](https://discourse.threejs.org/u/Lawrence3DPK)\
**Post date:** [September 30, 2025, 1:18pm UTC](https://discourse.threejs.org/t/cannot-import-a-gltf-when-exported-using-gltfexporter-parse/87245/2 "2025-09-30T13:18:42Z")

</div>

What does the code look like you’re using for GLTFExporter.Parse? What sort of file size is the saved file?

---

<div class="post-metadata">

**Author:** ![donmccurdy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/donmccurdy/32/33209_2.png) [@donmccurdy](https://discourse.threejs.org/u/donmccurdy)\
**Post date:** [September 30, 2025, 1:23pm UTC](https://discourse.threejs.org/t/cannot-import-a-gltf-when-exported-using-gltfexporter-parse/87245/3 "2025-09-30T13:23:33Z")

</div>

- **GLTFLoader:** Decodes .gltf/.glb files to create THREE.Object3D subtree
- **GLTFExporter:** Encodes THREE.Object3D subtree to .gltf/.glb files
- **ObjectLoader:** Decodes internal three.js JSON format to various three.js objects

Output of GLTFExporter.parse should be compatible with GLTFLoader.parse. I might suggest using the `{binary: true}` option to ensure that’s a single buffer. Then on the loading side:

```javascript
loader.load(data, ‘‘, (gltf) => console.log(gltf), (e) => console.error(e));

```

As you mention, ObjectLoader’s input format isn’t related to the other two so I don’t think that will help you here.

---

<div class="post-metadata">

**Author:** ![Paul](https://avatars.discourse-cdn.com/v4/letter/p/bbe5ce/32.png) [@Paul](https://discourse.threejs.org/u/Paul)\
**Post date:** [September 30, 2025, 1:50pm UTC](https://discourse.threejs.org/t/cannot-import-a-gltf-when-exported-using-gltfexporter-parse/87245/4 "2025-09-30T13:50:34Z")

</div>

Hi,

To create the data, I use

```bash
  const exporter = new GLTFExporter();

  exporter.parse(result, function (parsedData) {

       let jsonString = JSON.stringify(parsedData);

     // At this point I upload to the server to create a GLB file. I get the same structire whatever I set binary to
     .....
     .....
  }, { binary: true });

```

I can open the GLB on the server on a 3D Model Viewer.

Later, I use

const gltfModelLoader = new GLTFLoader()

// Here is where the error occurs.

gltfModelLoader.load(filename, function (gltf) {

I get

An error happened Error: THREE.GLTFLoader: Unsupported asset. glTF versions \>=2.0 are supported in the console.

[dd6f5a5c-50f4-4d23-baac-f8b6b19df4be.gltf](https://discourse.threejs.org/uploads/short-url/kKg9Jei7TjSfiumBLmYoHNOkFj2.gltf) (303.6 KB)

---

<div class="post-metadata">

**Author:** ![donmccurdy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/donmccurdy/32/33209_2.png) [@donmccurdy](https://discourse.threejs.org/u/donmccurdy)\
**Post date:** [September 30, 2025, 2:12pm UTC](https://discourse.threejs.org/t/cannot-import-a-gltf-when-exported-using-gltfexporter-parse/87245/5 "2025-09-30T14:12:56Z")

</div>

Binary data should not be JSON.stringify’d, you’ll need to either upload it as binary data to your server, or encode it as a base64 string, or stick to the non-binary output. Any of these are fine but I’d suggest double-checking that the data is identical after the client-server-client round trip. Or check that things work without the server round trip first.

---

<div class="post-metadata">

**Author:** ![Paul](https://avatars.discourse-cdn.com/v4/letter/p/bbe5ce/32.png) [@Paul](https://discourse.threejs.org/u/Paul)\
**Post date:** [September 30, 2025, 2:26pm UTC](https://discourse.threejs.org/t/cannot-import-a-gltf-when-exported-using-gltfexporter-parse/87245/6 "2025-09-30T14:26:34Z")

</div>

Hmmm. Now it’s started working after playing around.

I did try uploading using this (i.e. not using JSON.stringify) but still got the same data at the other end. But I still don’t see what I think is binary.

new Blob([jsonString], { type: ‘application/octet-stream’ });

Certainly, the uploaded file looks very different to a GLB generating using 3D MAX or Blender.

I will keep playing.

---

<div class="post-metadata">

**Author:** ![Paul](https://avatars.discourse-cdn.com/v4/letter/p/bbe5ce/32.png) [@Paul](https://discourse.threejs.org/u/Paul)\
**Post date:** [September 30, 2025, 3:40pm UTC](https://discourse.threejs.org/t/cannot-import-a-gltf-when-exported-using-gltfexporter-parse/87245/7 "2025-09-30T15:40:21Z")

</div>

Arggghh!!! Found the issue.

exporter.parse(result, function () {}, _**function() {}**_, { binary: true}

I was missing the callback for onError, so parse never got the binary setting.

Thanks for your help.
