GLTFloader.parse can't parse glb file correctly

image
this is how i read the glb file,
image
then i pass the buffer and path to gltfLoader
image
then this error comes up…
image
this is in the gltfLoader.parse excute context, seems like the content produced by loaderUntils.decodeText wasn’t producing the correct JSON string … please let me know how to fix this… thanks…
image
this is part of the content produced by the loaderUtils.decodeText , is that corretct? i use the same glb file and use gltfloader.load which worked perfectly

image
i tried to convert file to ArrayBuffer , still not working … T.T anybody please help out, thanks ,

Your code looks fine, to the extent that I can debug it based on screenshots… would you be able to share a full script, a demo, or a github link?

The appearance of Exif in the binary data looks suspicious, though… I guess that could be a texture? I take it you’re running this code in node.js, not in a browser? That’s a bit tricky with textures, see discussion in [Solved] GLTFLoader DRACOLoader in nodejs (but you can probably ignore the parts about Draco).

sorry for the delay, yes i’m running it in node.js to create img. i switch my Node version from 13 to 12.17.0, and rebuild node canvas which is a dependency of jsdom which i create canvas for headlessGL by new installed node-gyp, i don’t kown what’s wrong , but now it works as excepted… thanks so much for looking into it!