Problem with loading a 3D module

1. A concise explanation of the problem you're experiencing.
Hi guys, when I loaded my 3D module, it just kept telling me "RuntimeError: Failed to load model: [object Object]" but I can't fix the problem. However, when using the sample data, it worked. By the way, I'm using Cesium-1.41 version.

2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.

var viewer = new Cesium.Viewer('cesiumContainer', {
    infoBox : false,
    selectionIndicator : false,
    shadows : true,
    shouldAnimate : true

function createModel(url, height) {

    var position = Cesium.Cartesian3.fromDegrees(-123.0744619, 44.0503706, height);
    var heading = Cesium.Math.toRadians(135);
    var pitch = 0;
    var roll = 0;
    var hpr = new Cesium.HeadingPitchRoll(heading, pitch, roll);
    var orientation = Cesium.Transforms.headingPitchRollQuaternion(position, hpr);

    var entity = viewer.entities.add({
        name : url,
        position : position,
        orientation : orientation,
        model : {
            uri : url,
            minimumPixelSize : 128,
            maximumScale : 20000
    viewer.trackedEntity = entity;

var options = [{
    text : 'Aircraft',
    onselect : function() {
        createModel('../../../../Apps/SampleData/models/CesiumAir/Cesium_Air.glb', 5000.0);
}, {
    text : '101',
    onselect : function() {
        createModel('../../../../Apps/SampleData/models/01/101-2.glb', 0);


The console shows:

RuntimeError: Failed to load model: [object Object]
    at new RuntimeError (
    at Promise.then (
    at processQueue (
    at _resolve (
    at promiseReject (
    at Promise.then (
    at processQueue (

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

4. The Cesium version you're using, your operating system and browser.

Hi, would you be to able to send me the model that’s failing so I can help debug? If you don’t want to post it here you can email it to me at

Thank you so much!

101-2.glb (112 KB)

Thank you so much!

101-2.glb (112 KB)

I’m not sure what the problem is, but it seems to be loading fine in Cesium 1.43 (image attached).

I reloaded cesium 1.43 and it still showed the same problem.
The document below are screenshots of the the errors.

Please help me solve the problem, thank you so much.

cesium.docx (2.1 MB)

I see that npm error sometimes too and to fix it I either run npm install again or run the npm install as administrator.

Once you have the server running with npm start and run Sandcastle from http://localhost:8080 those other errors should go away.

The problem is the model url is a relative path to a local file and most browsers won’t let you load it unless everything is running in a local server.