Gltf_validator.js giving recursion error in Firefox

My scenes worked yesterday. This morning I get a recursion error in Firefox when loading ALMOST any scene. The scenes will not load properly. A few scenes work though they all use the exact same HTML template. The scenes that work are using the Babylon model format and not a glTF or glb format.

Uncaught InternalError: too much recursion

I removed this line from the HTML index file and it works now, but I wonder why:

src=“https://preview.babylonjs.com/gltf_validator.js

I believe there were some updates - Update to glTF-Validator 2.0.0-dev.3.9 - #2 by bghgary

1 Like

Thanks for the info. I’m not sure how to fix it properly on my end. Any help would be appreciated. I’m kind of a hack and I do not completely understand some of the deeper tech stuff like this.

The “preview” version of Babylon.js seems to not work:

script src=“https://preview.babylonjs.com/gltf_validator.js

If I remove “preview” from the path it works as expected, though seems a lot slower than it used to loading the model:

script src=“https://babylonjs.com/gltf_validator.js

1 Like

cc @bghgary

1 Like

Maybe this is a CDN issue. I don’t see any issues with Firefox running the Babylon sandbox loading .gltf and .glb assets. Can you try force refreshing the browser to make sure it’s not a caching issue?

2 Likes

I checked it on a separate computer before posting, just in case it was a caching issue. I just did a force refresh as well and it still didn’t work.

I mistakenly thought that removing “preview” from the path was getting me the CDN version. The cdn does not work either.

@bghgary Any update on this issue? I have several websites now that will not load. Do I even need the validator? Things seem to work fine without it.

I would think that maybe it is an issue with my gltf & glb files, but one of them is from another source. Mine are all written out from Maya with the Babylon export tool. The other is a glb from an unknown source.

If you don’t validate your files you don’t need the validator.

2 Likes

I assumed it happened automatically. I’m just an animator that loves to code and I often feel like I’m in WAAAY over my head, especially when something that has worked for years stops working suddenly. This list of packages was in the template that I got when I did the install of Babylon back in 2020. I was amazed I got it to work at all.

    cdnjs.cloudflare.com/ajax/libs/dat-gui/0.6.2/dat.gui.min.js
    preview.babylonjs.com/ammo.js
    preview.babylonjs.com/cannon.js
    preview.babylonjs.com/Oimo.js
    preview.babylonjs.com/gltf_validator.js
    preview.babylonjs.com/earcut.min.js
    preview.babylonjs.com/babylon.js
    preview.babylonjs.com/inspector/babylon.inspector.bundle.js
    preview.babylonjs.com/materialsLibrary/babylonjs.materials.min.js
    preview.babylonjs.com/proceduralTexturesLibrary/babylonjs.proceduralTextures.min.js
    preview.babylonjs.com/postProcessesLibrary/babylonjs.postProcess.min.js
    preview.babylonjs.com/loaders/babylonjs.loaders.js
    preview.babylonjs.com/serializers/babylonjs.serializers.min.js
    preview.babylonjs.com/gui/babylon.gui.min.js

If you don’t use DAT.GUI, Physics and don’t validate files you may remove these lines.

Excellent! Thank you.

I went to the Kronos website and tried the validation tool. All the assets I have ever output from Maya using the Babylon export tool produce errors. The asset I used recently (output from Blender according to the validator report) indicated it was valid, but still does not work in a Babylon scene.

I wish Maya had a native glTF output tool. Verge3D looks promising, but another $290 is a cost I cannot afford right now.

Always learning from this supportive and wonderful community!

You may try to optimize and correct (if possible, it is done automatically) your GLBs at https://glb.babylonpress.org/

1 Like

The validation is not supposed to be on unless it’s explicitly turned on. The inspector may be explicitly turning the glTF validation on if it’s present. If you don’t include the gltf_validator.js, then it will not validate even if it’s turned on since the code isn’t available.

I still would like to know why the validator is not working for you since other people may run into the same thing, but it’s difficult without a repro.

preview and cdn point to the same files. preview is just there for backwards compatibility.

Thank you for the explanation.

I am happy to help in any way. Would loading one of my (offending) assets into a playground scene be helpful? I think I remember how to load an external asset into the playground. :thinking:

Perhaps. I currently can’t repro the problem, so maybe it would help.