Search code examples
autodesk-forgereadonlyautodesk-viewer

Autodesk Data Visualization Extension chronos-etu module error: t is read-only


I am trying to integrate the time slider from chronos-etu in my React app, as part of the Data Visualization Extension, but I keep getting this error when clicking the play button:

Error: "t" is read-only

Chronos-etu time slider

I think it's coming from this function in the chronos-etu.js module:

play(e) {
    let t;
    void 0 !== e && (t = new s.MomentInstant(e)),
    this._chronosManger.setPlaybackPlayState(0, t)
}

I checked and pause and stop don't have this problem.

Does anyone know why this happens and how it can be solved?


Solution

  • Solution: The chronos-etu package needs to be upgraded from v3.1.0 to v5.1.1 both in the main project and in the forge-dataviz-iot-react-components folder in the ClientApp\node_modules folder. See the comments above for more details.

    Note: I think that this could be solved if in the dependency list of forge-dataviz-iot-react-components package, chronos-etu is changed from v3.1.0 to v5.1.1. Otherwise every time we pull the forge-dataviz-iot-react-components package, it will change the chronos-etu to its original version.