pmndrs / gltfjsx

🎮 Turns GLTFs into JSX components
https://gltf.pmnd.rs
MIT License
4.7k stars 310 forks source link

TypeError: Invalid JPG, marker table corrupted #175

Closed calbch closed 6 months ago

calbch commented 1 year ago

When running npx gltfjsx example.glb -t a proper .tsx file is created. The moment I try to use -i, -I or -T I get the following @gltf-transform error:

TypeError: Invalid JPG, marker table corrupted
    at m (/Users/user/.npm/_npx/16b3f312213fced0/node_modules/@gltf-transform/core/dist/core.js:1:4401)
    at p.impls.image/jpeg.getSize (/Users/user/.npm/_npx/16b3f312213fced0/node_modules/@gltf-transform/core/dist/core.js:1:4661)
    at Function.getSize (/Users/user/.npm/_npx/16b3f312213fced0/node_modules/@gltf-transform/core/dist/core.js:1:3731)
    at et.getSize (/Users/user/.npm/_npx/16b3f312213fced0/node_modules/@gltf-transform/core/dist/core.js:1:27799)
    at /Users/user/.npm/_npx/16b3f312213fced0/node_modules/@gltf-transform/functions/dist/functions.js:1:4992
    at dedup (/Users/user/.npm/_npx/16b3f312213fced0/node_modules/@gltf-transform/functions/dist/functions.js:1:5286)
    at /Users/user/.npm/_npx/16b3f312213fced0/node_modules/@gltf-transform/core/dist/core.js:1:32347
    at t (/Users/user/.npm/_npx/16b3f312213fced0/node_modules/@gltf-transform/core/dist/core.js:1:31663)
    at /Users/user/.npm/_npx/16b3f312213fced0/node_modules/@gltf-transform/core/dist/core.js:1:31802
    at ut.transform (/Users/user/.npm/_npx/16b3f312213fced0/node_modules/@gltf-transform/core/dist/core.js:1:32309)

Is this an issue with the .glb file I am using or is there a workaround I could try?

Unfortunately I couldn't attach the file to this issue

Thank you in advance!

Edit:

If I am using https://gltf.pmnd.rs/ with the same file, it takes quite a long time but it generates the .tsx file with both -i and -I.

donmccurdy commented 1 year ago

Could you try again with the latest gltfjsx CLI update?

Unfortunately I couldn't attach the file to this issue

Client/company/IP issue, or a technical one? If the issue is ongoing it would definitely help to have some way of reproducing the problem. :)

donmccurdy commented 6 months ago

Fixed in https://github.com/donmccurdy/glTF-Transform/pull/1306 and published to v4.0.0-alpha.10.