Unable to load from file:file20200315.glb: Unexpected magic: 67324752

Hi,

This just happened.

Unable to load from file:file20200315.glb: Unexpected magic: 67324752

I am not sure where to even begin with to understand how this final got broken. It got exported by Babylon and now it can not be loaded.

Trying to load it also with sandbox and I got

Error in parsing value for ‘transform-origin’.  Declaration dropped. sandbox.babylonjs.com:1:46603
Error in parsing value for ‘transform-origin’.  Declaration dropped. sandbox.babylonjs.com:1:8696
Unknown pseudo-class or pseudo-element ‘-ms-track’.  Ruleset ignored due to bad selector. sandbox.babylonjs.com:1:1587
Unknown pseudo-class or pseudo-element ‘-ms-fill-lower’.  Ruleset ignored due to bad selector. sandbox.babylonjs.com:1:1717
Unknown pseudo-class or pseudo-element ‘-ms-fill-upper’.  Ruleset ignored due to bad selector. sandbox.babylonjs.com:1:1790
Unknown pseudo-class or pseudo-element ‘-ms-thumb’.  Ruleset ignored due to bad selector. sandbox.babylonjs.com:1:1863
Unknown property ‘-moz-opacity’.  Declaration dropped. sandbox.babylonjs.com:1:2724
Expected ‘none’, URL, or filter function but found ‘alpha(’.  Error in parsing value for ‘filter’.  Declaration dropped.

but nothing about the error.

Could you please advice me what could I begin with?

Could you share your file ???

@sebavan
This is the file. Thanks
https://www.axlessoft.com/babylon/file20200315.glb

The file sounds corrupted as it does not work in any gltf viewers https://gltf-viewer.donmccurdy.com/

This is how it was save

let options = {
        shouldExportNode: function(/** @type {BABYLON.Node} */ transformNode) {
          const namesToTest = ["light1", "light2", "hdrSkyBox", "topHemiLight", "bottomHemiLight", "_boundingBox"];
          const regexToTest = namesToTest.map(name => new RegExp(name));

          if (regexToTest.some(regex => regex.test(transformNode.name))) return false;

          return true;
        }
      };
      BABYLON.GLTF2Export.GLBAsync(this._babylonScene, "scene.glb", options).then(response => {
        response.downloadFiles();
      });

I am not sure where and what to begin with. This is the second file from the client that gets corrupted like this. Any ideas what could I look for?

would be amazing to have the scene they are exporting in the playground as it is really hard to find without repro and just the output file :frowning:

1 Like

The problem here is that the exported glb file is actually a zip file containing the glb file

3 Likes

Seriously… @Gijs thank you :D. Why and how I will now ask.

I don’t know why; when I use your code snippet (I also tried it with options true/false, and in multiple browsers), it produces a glb file as expected:

https://playground.babylonjs.com/#DNL788

I couldn’t find an answer in these files either:

Love it @Gijs :slight_smile:

1 Like

Maybe the web server auto-zip the files and you get the zipped file from the download?

Seems to be something on the client infrastructure. I get a glb link, but it is zipped. I will be prepared next time for this :slight_smile:

2 Likes