I try to put the diagram into mendix, but it return :
Error: applyIncrementalJson cannot change Model properties
at B (go.js:12)
at ar…/…/gojs/release/go.js.t.Cq (go.js:1803)
at ar…/…/gojs/release/go.js.t.yx (go.js:1736)
at GojsDiagram…/…/react-gojs/dist/GojsDiagram.js.GojsDiagram.applyUpdatesFromModel (GojsDiagram.js:149)
at GojsDiagram…/…/react-gojs/dist/GojsDiagram.js.GojsDiagram.componentDidUpdate (GojsDiagram.js:67)
at za (mxui.js?637152267363462068:55)
at Ha (mxui.js?637152267363462068:55)
at mxui.js?637152267363462068:55
at Object.t.unstable_runWithPriority (mxui.js?637152267363462068:73)
at Ps (mxui.js?637152267363462068:55)
That message is saying that some model properties do not match the values provided in the argument to Model.applyIncrementalJson.
An obvious example is the Model.nodeKeyProperty. If the model being modified assumes the node data key is named “A”, but the JSON text being applied assumes the node data key is named “B”, clearly there is something wrong.
The assumption is that Model.toIncrementalJson produced what is being passed to Model.applyIncrementalJson. Apparently some model property (or properties) have changed value since it was written out.
Oddly though, the model works perfectly fine when I run my app locally, but when I go to deploy my application (using docker), I hit this issue running the app inside the container. I’m assuming it must be a docker issue, but any thoughts on what could be happening?
One thing I am doing is creating my own layout so perhaps the model properties then differ somehow? I create my own class which extends layered digraph layout, overwrite 2 of the methods, and then use that as my layout.
It would be useful to see some data. Could you show the first few lines of the result of calling Model.toJson, and the first few lines of the JSON-formatted text that you are passing to Model.applyIncrementalJson?