Babylonjs loaders, OBJ -> MTL unhandled expression

Hi guys. I am working on a project and when loading the OBJ into the scene I am getting this error.


Now, I didn’t have this until today, yesterday with the same code setup it didn’t exist, but we switched to different dev environment and now it shows. Basically, MTL loads fine, everything is working fine, I just see that error, and it seems to have no impact on actual scene. Anyone knows what is going on?

In general it all looks like the wrong mime type (or even the wrong files) are being delivered to the loader. Seems like a png (and the .mtl file) are treated as JSON (or some other file that is not a .mtl file). My recommendation would be - Check the mime types, and check that the URLs are correct


Actually this whole thing occurred due to some mistake I had in the code. Basically, I didn’t properly set some conditions on url requests, so at the same time while loading gltf files and using gltfLoaders, the scene was receiving the obj + mtl + texture files, and the gltfLoader couldn’t parse those files, so it gave unhandled expression for that. I fixed the code and the error is non-existant.

Thanks anyway for your help.