Skip to content

Draco compression tries to use the fetch api to load the wasm blob off the filesystem and fails with ERR_INVALID_URL #613

@expenses

Description

@expenses

Full error:

(node:4270) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
TypeError: Failed to parse URL from /home/ashley/node_modules/draco3d/draco_encoder.wasm
    at new Request (node:internal/deps/undici/undici:4816:19)
    at Agent2.fetch2 (node:internal/deps/undici/undici:5544:29)
    ... 10 lines matching cause stack trace ...
    at Object.tryCatcher (/home/ashley/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/ashley/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/home/ashley/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (/home/ashley/node_modules/bluebird/js/release/promise.js:649:10) {
  [cause]: TypeError [ERR_INVALID_URL]: Invalid URL
      at new NodeError (node:internal/errors:377:5)
      at URL.onParseError (node:internal/url:563:9)
      at new URL (node:internal/url:643:5)
      at new Request (node:internal/deps/undici/undici:4814:25)
      at Agent2.fetch2 (node:internal/deps/undici/undici:5544:29)
      at Object.fetch (node:internal/deps/undici/undici:6372:20)
      at fetch (node:internal/bootstrap/pre_execution:199:25)
      at /home/ashley/node_modules/draco3d/draco_encoder_nodejs.js:36:498
      at /home/ashley/node_modules/draco3d/draco_encoder_nodejs.js:37:214
      at Object.createEncoderModule (/home/ashley/node_modules/draco3d/draco_encoder_nodejs.js:37:237)
      at compressDracoMeshes (/home/ashley/node_modules/gltf-pipeline/lib/compressDracoMeshes.js:54:52)
      at /home/ashley/node_modules/gltf-pipeline/lib/processGltf.js:67:12
      at tryCatcher (/home/ashley/node_modules/bluebird/js/release/util.js:16:23)
      at Object.gotValue (/home/ashley/node_modules/bluebird/js/release/reduce.js:166:18)
      at Object.gotAccum (/home/ashley/node_modules/bluebird/js/release/reduce.js:155:25)
      at Object.tryCatcher (/home/ashley/node_modules/bluebird/js/release/util.js:16:23) {
    input: '/home/ashley/node_modules/draco3d/draco_encoder.wasm',
    code: 'ERR_INVALID_URL'
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions