astarte-platform / astarte-dashboard

Astarte dashboard
http://astarte-platform.org
Apache License 2.0
17 stars 16 forks source link

Dashboard crashes when loading data from interface io.edgehog.devicemanager.StorageUsage #376

Closed davidebriani closed 7 months ago

davidebriani commented 1 year ago

When opening the page to display data from an interface, the dashboard totally crashes on v1.0.4, or display a loading error on v1.1.

The interface definition:

{
    "interface_name": "io.edgehog.devicemanager.StorageUsage",
    "version_major": 0,
    "version_minor": 1,
    "type": "datastream",
    "ownership": "device",
    "aggregation": "object",
    "mappings": [
        {
            "endpoint": "/%{label}/totalBytes",
            "type": "longinteger",
            "database_retention_policy": "use_ttl",
            "database_retention_ttl": 5184000,
            "explicit_timestamp": true,
            "description": "Total storage size in bytes"
        },
        {
            "endpoint": "/%{label}/freeBytes",
            "type": "longinteger",
            "database_retention_policy": "use_ttl",
            "database_retention_ttl": 5184000,
            "explicit_timestamp": true,
            "description": "Available storage bytes"
        }
    ]
}

Data returned from Astarte APIs:

{
  "data":{
    "mapper__vgkubuntu-root":{
      "freeBytes":"737289936896",
      "timestamp":1683209640561,
      "totalBytes":"980799373312"
    },
    "mapper_vgkubuntu-root":{
      "freeBytes":"737287016448",
      "timestamp":1683213105399,
      "totalBytes":"980799373312"
    },
    "nvme0n1p1":{
      "freeBytes":"801992704",
      "timestamp":1683213105399,
      "totalBytes":"887095296"
    }
  }
}

On v1.0.4 the dashboard crashes and logs the following error:

InternalError: too much recursion
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Om https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
[main-9d646f00b42d961ae1e1.js:109:3079569](https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js)
    is https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    callback https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    ma https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    us https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    El https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    unstable_runWithPriority https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    qi https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    yl https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    sl https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Qi https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    unstable_runWithPriority https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    qi https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Qi https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Ki https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    rl https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    bo https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    e https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    c https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    _invoke https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    w https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Mm https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    o https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    (Async: promise callback)
    Mm https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    o https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    (Async: promise callback)
    Mm https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    o https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    i https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    i https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Pm https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Pm https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    ls https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Ml https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    unstable_runWithPriority https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    qi https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    wl https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Sl https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    Y https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109
    onmessage https://dashboard.astarte.example.com/static/js/main-9d646f00b42d961ae1e1.js:109

It should be investigated where the issue lies for v1.0 and for v1.1, and if it is indeed the same issue.

davidebriani commented 7 months ago

Closing as fixed by #403