Firefox - "XML Parsing Error: not well-formed" - Location: .../scene.gltf Line Number 1, Column 1:

Hello - I am loading two scene.glTF models (downloaded from SketchFab) and both throw an XML parsing error in Firefox but not Chrome or Edge. The models render but I would like to get rid of the errors.

I examined the files in a JSON validator which reported valid.

Any suggestions how to repair?

Thanks - Jeff

Hey and welcome

can you repro in the playground?

Hello Deltakosh - Thanks for responding. I can not recreate when I load the models from a public github raw file (https://playground.babylonjs.com/#XXLE1N#1). However, one of my models was purchased and I can not make it public. The app loads regardless of the error(s). At this point I am moving on and consider this issue closed.

Warmest regards - Jeff

ok sounds good :slight_smile:

Just a random thought (and i know you already consider it solved) - but if it does work on raw.github, maybe make sure your server returns the right content type for gltf files. raw.github always uses

Content-Type: text/plain; charset=utf-8

which is not the gltf format, but it seems to work correctly when set this way :slight_smile: so you might want to adjust your server return type to avoid errors in the future.

@RaananW - Thanks for responding. I tried your suggestion with

and .

Made no difference and the raw.github files load without a problem.

One of those head scratchers :slightly_smiling_face:

Warmest regards - Jeff

I have been ignoring this error for awhile, as it does not actually stop things from loading, just makes some console spam for every mesh I load. But, where exactly would I set that content type so it returns correctly?

I am using standard add MeshTask:
pwtMeshLoader.assetManager.addMeshTask(meshName, "", meshPath, meshFName);
and figure the best place is inside that function, but that would involve extending babylon and that just does not seem right. What would be the easiest way to set this?