Upgraded crashed components

ignition80
#1

Hi,
l am currently facing an issue with several components I created on V8.0,after upgrading to V8.0.4. Several components are now damaged on the upgraded version giving me this error (Unable to deserialize resource conv_curve). Is there a way to somehow restore all those or do I need to remake all of them again?

0 Likes

#2

Unable to deserialize essentially means that Ignition is unable to parse the json which makes up the component/resource and make something recognizable out of it. This most commonly occurs when a file has been directly modified through a text editor so that the json structure is no longer valid, or could also mean that the component or View has become corrupted in some way (which we did encounter in the earliest versions of 8.0.0 and the Beta).

If the “component” you’re referring to is a View, are you able to locate the View on the file system? What happens if you try to open the view.json file in a text editor?

0 Likes

#3

I am able to locate the json file indeed for the view component I opened it with Notepad and seems alright although is there anything specific I could seek to find on the script ?

This is how the file looks when I opened it with Notepad:

{
  "custom": {},
  "events": null,
  "params": {
    "State": "value"
  },
  "permissions": null,
  "propConfig": {
    "params.State": {
      "paramDirection": "input",
      "persistent": true
    }
  },
  "props": {
    "defaultSize": {
      "height": 100,
      "width": 100
    }
  },
  "root": {
    "children": [
      {
        "meta": {
          "name": "Medium vertical segment"
        },
        "position": {
          "height": 1,
          "width": 1,
          "x": 0,
          "y": 0
        },
        "propConfig": {
          "props.elements[1].fill.paint": {
            "binding": {
              "config": {
                "path": "view.params.State"
              },
              "transforms": [
                {
                  "fallback": "#000000",
                  "inputType": "scalar",
                  "mappings": [
                    {
                      "input": 0,
                      "output": null
                    },
                    {
                      "input": 4,
                      "output": "#008000"
                    },
                    {
                      "input": 8,
                      "output": "#FF0000"
                    },
                    {
                      "input": 16,
                      "output": "#FFFF00"
                    },
                    {
                      "input": 64,
                      "output": "#800080"
                    },
                    {
                      "input": 128,
                      "output": "#FF8C00"
                    },
                    {
                      "input": 256,
                      "output": "#0000D9"
                    }
                  ],
                  "outputType": "color",
                  "type": "map"
                }
              ],
              "type": "property"
            }
          }
        },
        "props": {
          "elements": [
            {
              "d": "M0,999 l0,-999 249,0 0,999 -249,0z",
              "fill": {
                "paint": "#c0c0c0"
              },
              "name": "path",
              "stroke": {
                "paint": "#4c4c4c",
                "width": "2"
              },
              "style": {},
              "type": "path"
            },
            {
              "d": "M21,999 l0,-999 208,0 0,999 -208,0z",
              "fill": {},
              "name": "path",
              "style": {},
              "type": "path"
            }
          ],
          "preserveAspectRatio": "none",
          "viewBox": "0 0 249 999"
        },
        "type": "ia.shapes.svg"
      }
    ],
    "meta": {
      "name": "root"
    },
    "props": {
      "aspectRatio": "none",
      "mode": "percent"
    },
    "type": "ia.container.coord"
  }
}
0 Likes

#4

Could we get the stacktrace you’re encountering? My attempts at using your View were successful, so it would help us a lot to have a better breakdown of why we were unable to deserialize this View in your environment.

0 Likes

#5

Im very sorry about this but I remade my components so I have deleted the errored ones. Thank you for your time.

0 Likes

#6

We can still theoretically recreate the stacktrace with the json you’ve provided:

  1. Copy the entirety of the json you provided previously to your clipboard.
  2. Create a new View in your project (name it anything you’d like).
  3. Hold Shift and then right-click the View node (NOT the root node, but the node which has the name you provided) in the Project Browser.
  4. Select “Paste JSON”.

This should theoretically give you the same error you encountered previously.

0 Likes

#7

Hello again,

I followed the steps you provided and the component seemed to be recreated successfully. Although as it already did exist on the overview page it looks like this now.
image

After creating a component,if its used, then changes are made to the root of it, in order to use it again does it require replacement or would the changes apply on the already existing components used? That seems to be the issue here i believe?

P.S Apologies for the late reply.

0 Likes

#8

I guess I’m a little unclear on what you’re asking. If you create a View, and Embed that View as an Embedded View, any changes made to the original View will be in place anywhere it is used.

For example, I embedded your View in a different View, then I placed a Label component in the View you supplied, and now the Embedded View displays the Label as well.

The error message in your screenshot leads me to believe that you’re attempting to set a value which has an invalid key, but I’m unable to replicate the same error. Do you have any scripts where this View is being used which would write to a custom property? What is that property? There WERE some restrictions placed on property key names (like “-” no longer being allowed), but the supplied View does not seem to break any rules and is working perfectly well in my environment.

0 Likes

#9

The view has been deleted from the project somehow probably after the upgrade somehow as this occurred as soon as I opened a project created in V8 with the V.8.0.4 on a server. I recreated the component and everything has been replaced successfully. Thank you for your time

0 Likes

#10

Would you mind having a look here: onClick event inside component as it relates to the discussion we had in this post.

Many thanks
Alex

0 Likes