Https://cdn.babylonjs.com/draco_decoder_gltf.wasm not loaded

Decoder not Load in Cdn

https://cdn.babylonjs.com/draco_decoder_gltf.wasm

3 Likes

We are seeing the same issue on https://framevr.io - both ktx & draco decoders failing to load from Babylon CDN

GET https://cdn.babylonjs.com/draco_decoder_gltf.wasm net::ERR_CONNECTION_REFUSED
Uncaught NetworkError: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'https://cdn.babylonjs.com/babylon.ktx2Decoder.js' failed to load.

Also looks like https://doc.babylonjs.com/ is down

I think it’s more wide spread, https://assets.babylonjs.com/ is down too

Yes Azure outage. We unfortunately have to wait :frowning:

1 Like

You can use a local draco decoder:

@Deltakosh

https://dtggmezgs0e95.cloudfront.net/confi-demo/draco_decoder_gltf.wasm

https://dtggmezgs0e95.cloudfront.net/confi-demo/draco_wasm_wrapper_gltf.js

You can find the needed .js and .wasm files in the BabylonJS Addons module.

It would be in the node_modules/@babylonjs/core/assets/Draco folder.


Azure is down, some sites in babylonjs like CDN doesn’t work

@Deltakosh We’re working on bringing the decoders in house. Can you provide any guidance on how to configure the source url for the ktx decoder? We’re struggling due to the docs page also being down.

We have an error from trying to load the ktx decoder from CDN which is being imported in a WebWorker from this line of bjs source: Babylon.js/packages/dev/core/src/Misc/khronosTextureContainer2Worker.ts at ff1b476f06d6e5d357fdd82467e8809788327faa · BabylonJS/Babylon.js · GitHub


For Draco, we have it fixed like so, after copying the files from node_modules/@babylonjs/core/assets/Draco (and we already have webpack config to treat these as external resources).

import { DracoDecoder } from "@babylonjs/core";
import DracoWasmUrl from "@webapp/vendor/draco/draco_wasm_wrapper_gltf";
import DracoWasmBinaryUrl from "@webapp/vendor/draco/draco_decoder_gltf.wasm";
import DracoWasmFallbackUrl from "@webapp/vendor/draco/draco_decoder_gltf.js";

DracoDecoder.DefaultConfiguration = {
  wasmUrl: DracoWasmUrl,
  wasmBinaryUrl: DracoWasmBinaryUrl,
  fallbackUrl: DracoWasmFallbackUrl,
};
1 Like

adding @alexchuber for KTX :slight_smile:

1 Like

If you’re bringing the whole CDN in-house (probably not, but just in case), you can change the base URL for all resources loaded by Babylon:

BABYLON.Tools.ScriptBaseUrl = "https://my.wonderfull.server";

If you’re just bringing in the KTX2 codecs, see Documentation/content/setup/frameworkPackages/CDN.md at 128eb8d0b6e4441795bb5d28892aa737cf15145e · BabylonJS/Documentation · GitHub

If you need to also configure the workers, see Documentation/content/setup/frameworkPackages/es6Support.md at 128eb8d0b6e4441795bb5d28892aa737cf15145e · BabylonJS/Documentation · GitHub

2 Likes

Getting the same error on many of the sites using gltf, lesson learned, thanks for sharing how to update asset locations. Maybe there’s a way to have failsafe also on BJS level? Like if 404, load from some other CDN… Just thinking :slight_smile:

Ok azure is back online folks. We should be good

2 Likes

thanks @Deltakosh

1 Like