Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read properties of undefined (reading 'type') #1772

Closed
okastl opened this issue Aug 31, 2023 · 1 comment · Fixed by #1775
Closed

Cannot read properties of undefined (reading 'type') #1772

okastl opened this issue Aug 31, 2023 · 1 comment · Fixed by #1775
Labels
bug Something isn't working

Comments

@okastl
Copy link

okastl commented Aug 31, 2023

What happened?

Clicked on "Details" of Ubisys S2
initialState.json.zip

What browsers are you seeing the problem on?

Chrome

Relevant stacktrace

**Current url**: http://alarm15.box:8080/#/device/0x001fee00000076e4/exposes
**Previous url**: 


**Error type**: TypeError
**Error message**: Cannot read properties of undefined (reading 'type')



TypeError: Cannot read properties of undefined (reading 'type')
    at wx (http://alarm15.box:8080/assets/index.9ea48067.js:85:182671)
    at UD (http://alarm15.box:8080/assets/index.9ea48067.js:33:53172)
    at Cq (http://alarm15.box:8080/assets/index.9ea48067.js:37:8838)
    at Sq (http://alarm15.box:8080/assets/index.9ea48067.js:37:955)
    at dNe (http://alarm15.box:8080/assets/index.9ea48067.js:37:881)
    at fh (http://alarm15.box:8080/assets/index.9ea48067.js:37:732)
    at zC (http://alarm15.box:8080/assets/index.9ea48067.js:35:10926)
    at http://alarm15.box:8080/assets/index.9ea48067.js:33:38960
    at e.unstable_runWithPriority (http://alarm15.box:8080/assets/index.9ea48067.js:22:3813)
    at au (http://alarm15.box:8080/assets/index.9ea48067.js:33:38737)

Did you download state.json.zip?

I will attach state.json.zip

@okastl okastl added the bug Something isn't working label Aug 31, 2023
@elad-bar
Copy link

What happened?

Accessing expose tab of the device leads to Hello, you've found a bug. Congratulations!

From initialState.json

"0xa4c138a5f0818a53": {
            "date_code": "",
            "definition": {
                "description": "3 Gang switch with backlight",
                "exposes": [
                    {
                        "endpoint": "left",
                        "features": [
                            {
                                "access": 7,
                                "description": "On/off state of the switch",
                                "endpoint": "left",
                                "label": "State",
                                "name": "state",
                                "property": "state_left",
                                "type": "binary",
                                "value_off": "OFF",
                                "value_on": "ON",
                                "value_toggle": "TOGGLE"
                            }
                        ],
                        "type": "switch"
                    },
                    {
                        "endpoint": "center",
                        "features": [
                            {
                                "access": 7,
                                "description": "On/off state of the switch",
                                "endpoint": "center",
                                "label": "State",
                                "name": "state",
                                "property": "state_center",
                                "type": "binary",
                                "value_off": "OFF",
                                "value_on": "ON",
                                "value_toggle": "TOGGLE"
                            }
                        ],
                        "type": "switch"
                    },
                    {
                        "endpoint": "right",
                        "features": [
                            {
                                "access": 7,
                                "description": "On/off state of the switch",
                                "endpoint": "right",
                                "label": "State",
                                "name": "state",
                                "property": "state_right",
                                "type": "binary",
                                "value_off": "OFF",
                                "value_on": "ON",
                                "value_toggle": "TOGGLE"
                            }
                        ],
                        "type": "switch"
                    },
                    {
                        "access": 7,
                        "description": "Controls the behavior when the device is powered on after power loss",
                        "endpoint": "left",
                        "label": "Power-on behavior",
                        "name": "power_on_behavior",
                        "property": "power_on_behavior_left",
                        "type": "enum",
                        "values": [
                            "off",
                            "previous",
                            "on"
                        ]
                    },
                    {
                        "access": 7,
                        "description": "Controls the behavior when the device is powered on after power loss",
                        "endpoint": "center",
                        "label": "Power-on behavior",
                        "name": "power_on_behavior",
                        "property": "power_on_behavior_center",
                        "type": "enum",
                        "values": [
                            "off",
                            "previous",
                            "on"
                        ]
                    },
                    {
                        "access": 7,
                        "description": "Controls the behavior when the device is powered on after power loss",
                        "endpoint": "right",
                        "label": "Power-on behavior",
                        "name": "power_on_behavior",
                        "property": "power_on_behavior_right",
                        "type": "enum",
                        "values": [
                            "off",
                            "previous",
                            "on"
                        ]
                    },
                    {
                        "access": 7,
                        "description": "Mode of the backlight",
                        "label": "Backlight mode",
                        "name": "backlight_mode",
                        "property": "backlight_mode",
                        "type": "binary",
                        "value_off": "OFF",
                        "value_on": "ON"
                    },
                    {
                        "access": 1,
                        "description": "Link quality (signal strength)",
                        "label": "Linkquality",
                        "name": "linkquality",
                        "property": "linkquality",
                        "type": "numeric",
                        "unit": "lqi",
                        "value_max": 255,
                        "value_min": 0
                    }
                ],
                "model": "37022474",
                "options": [
                    {
                        "access": 2,
                        "description": "State actions will also be published as 'action' when true (default false).",
                        "label": "State action",
                        "name": "state_action",
                        "property": "state_action",
                        "type": "binary",
                        "value_off": false,
                        "value_on": true
                    }
                ],
                "supports_ota": false,
                "vendor": "Homeetec"
            },
            "disabled": false,
            "endpoints": {
                "1": {
                    "bindings": [
                        {
                            "cluster": "genOnOff",
                            "target": {
                                "endpoint": 1,
                                "ieee_address": "0x00124b002578dd21",
                                "type": "endpoint"
                            }
                        }
                    ],
                    "clusters": {
                        "input": [
                            "genIdentify",
                            "genGroups",
                            "genScenes",
                            "genOnOff",
                            "manuSpecificBosch",
                            "manuSpecificTuya_3",
                            "genBasic"
                        ],
                        "output": [
                            "genOta",
                            "genTime"
                        ]
                    },
                    "configured_reportings": [],
                    "scenes": []
                },
                "2": {
                    "bindings": [
                        {
                            "cluster": "genOnOff",
                            "target": {
                                "endpoint": 1,
                                "ieee_address": "0x00124b002578dd21",
                                "type": "endpoint"
                            }
                        }
                    ],
                    "clusters": {
                        "input": [
                            "genGroups",
                            "genScenes",
                            "genOnOff",
                            "manuSpecificTuya_3"
                        ],
                        "output": []
                    },
                    "configured_reportings": [],
                    "scenes": []
                },
                "3": {
                    "bindings": [
                        {
                            "cluster": "genOnOff",
                            "target": {
                                "endpoint": 1,
                                "ieee_address": "0x00124b002578dd21",
                                "type": "endpoint"
                            }
                        }
                    ],
                    "clusters": {
                        "input": [
                            "genGroups",
                            "genScenes",
                            "genOnOff",
                            "manuSpecificTuya_3"
                        ],
                        "output": []
                    },
                    "configured_reportings": [],
                    "scenes": []
                },
                "242": {
                    "bindings": [],
                    "clusters": {
                        "input": [],
                        "output": [
                            "greenPower"
                        ]
                    },
                    "configured_reportings": [],
                    "scenes": []
                }
            },
            "friendly_name": "First Floor Hallway Lights",
            "ieee_address": "0xa4c138a5f0818a53",
            "interview_completed": true,
            "interviewing": false,
            "manufacturer": "_TZ3000_pv4puuxi",
            "model_id": "TS0003",
            "network_address": 54816,
            "power_source": "Mains (single phase)",
            "supported": true,
            "type": "Router"
        }

What browsers are you seeing the problem on?

Chrome

Relevant stacktrace

**Current url**: https://zigbee.baru.sh/#/device/0xa4c138a5f0818a53/exposes
**Previous url**: 


**Error type**: TypeError
**Error message**: Cannot read properties of undefined (reading 'type')



TypeError: Cannot read properties of undefined (reading 'type')
    at wx (https://zigbee.baru.sh/assets/index.9ea48067.js:85:182671)
    at UD (https://zigbee.baru.sh/assets/index.9ea48067.js:33:53172)
    at Cq (https://zigbee.baru.sh/assets/index.9ea48067.js:37:8838)
    at Sq (https://zigbee.baru.sh/assets/index.9ea48067.js:37:955)
    at dNe (https://zigbee.baru.sh/assets/index.9ea48067.js:37:881)
    at fh (https://zigbee.baru.sh/assets/index.9ea48067.js:37:732)
    at zC (https://zigbee.baru.sh/assets/index.9ea48067.js:35:10926)
    at https://zigbee.baru.sh/assets/index.9ea48067.js:33:38960
    at e.unstable_runWithPriority (https://zigbee.baru.sh/assets/index.9ea48067.js:22:3813)
    at au (https://zigbee.baru.sh/assets/index.9ea48067.js:33:38737)

Koenkk added a commit that referenced this issue Sep 1, 2023
@Koenkk Koenkk mentioned this issue Sep 1, 2023
Koenkk added a commit that referenced this issue Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants