Externally hosted GLB file (not Cesium Ion) problems

I have spent way too many hours trying to get a simple glb file external to Cesium Ion to load into a model. Using SandCastle I can easily fly to a location and create a tracked entity… no problem there. Using a model for the entity from the samples like “…/SampleData/models/CesiumDrone/CesiumDrone.glb” does just fine also. But when I try using one of my own hosted glb files or one from the Internet like “https://science.nasa.gov/wp-content/uploads/2023/09/Jupiter_1_142984.glb” I get vague errors. Here they are:

RuntimeError: Failed to load model: https://science.nasa.gov/wp-content/uploads/2023/09/Jupiter_1_142984.glb
Failed to load glTF
Failed to load glTF: https://science.nasa.gov/wp-content/uploads/2023/09/Jupiter_1_142984.glb
Original stack:
Original stack:
Original stack:
undefined
Handler stack:
Error
at new RuntimeError (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:16804:13)
at ResourceLoader.getError (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:69103:26)
at handleError4 (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:74302:26)
at loadFromUri2 (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:74294:7)
at async loadGltfJson (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:81297:7)
at async Model.fromGltfAsync (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:99734:7)
at async createModelPrimitive (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:150470:21)
Handler stack:
Error
at new RuntimeError (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:16804:13)
at ResourceLoader.getError (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:69103:26)
at handleError6 (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:81341:22)
at loadGltfJson (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:81310:7)
at async Model.fromGltfAsync (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:99734:7)
at async createModelPrimitive (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:150470:21)
Handler stack:
Error
at new RuntimeError (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:16804:13)
at ModelUtility.getError (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:74026:26)
at Model.fromGltfAsync (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:99737:34)
at async createModelPrimitive (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:150470:21)

Of course that tells me nothing! I’m about to give up on using CesiumJS unless I can get some insight here to find a solution and explanation why external glb models don’t work. I’ve looked all over the Internet and the forum here with no success.

The model is ok (although there are glTF validation warnings), there is something wrong with the hosting.

Sample using the model from: * https://bertt.github.io/gltf-samples/Jupiter_1_142984.glb

Thanks for the reply.

I was able to progress further to get the Jupiter model to show up both in Sandcastle and my app. I was also able to self host the glb model finally.

But none of my other glb models will render using the same code as Jupiter… even when I grab another sample from the Internet somewhere. I do not see any console javascript errors either. I’m stuck again until I can figure out how to get other glb models so show.

Did you do anything to “fix” the Jupiter glb? Shouldn’t CesiumJS report problems with glb files it won’t render?

didn’t change anything on the model. Wouldn’t be surprised if it’s something like cors or so.
so what model now gives problems?

Avocado.gltf (2.4 KB)
Duck.glb (117.7 KB)
mapPointer.glb (14.2 KB)

Here are three samples. Some off the internet.

Shouldn’t be a cors problem since all of the models I test with are in the same hosted location.

Ok, got further… those other models work, but scale was not the same as Jupiter. So, I’m getting further to understand what the scale and positioning should be. Sometimes I just get a wireframe globe like everything went into a hole or something.

think the models from https://community.cesium.com/uploads/short-url/ do not load because there is a http 302 redirect going on