Shortumation icon indicating copy to clipboard operation
Shortumation copied to clipboard

"Type Error" upon opening the webUI

Open isewise opened this issue 2 years ago • 3 comments

Describe the bug An Error has occured. TypeError: Cannot read properties of undefined (reading 'label') {} Upon loading the webUI

To Reproduce Steps to reproduce the behavior:

  1. Go to 'WebUI'
  2. See error

Upon loading the webUI, a large error is displayed and I cant proceed. I tried restarting the add-on and that hasn't worked.

Screenshots Screenshot 2022-08-10 102810

Additional context Full error pasted below:

TypeError: Cannot read properties of undefined (reading 'label')
{}

at cW (http://192.168.1.228:8123/api/hassio_ingress/zo5IABVySwRHz1As3iiCjS-LYJn9pW6q3pJspLj0TWw/web/static/js/main.c99d8d56.js:2:1445440)
at div
at div
at bW (http://192.168.1.228:8123/api/hassio_ingress/zo5IABVySwRHz1As3iiCjS-LYJn9pW6q3pJspLj0TWw/web/static/js/main.c99d8d56.js:2:1450974)
at div
at div
at hq (http://192.168.1.228:8123/api/hassio_ingress/zo5IABVySwRHz1As3iiCjS-LYJn9pW6q3pJspLj0TWw/web/static/js/main.c99d8d56.js:2:1482838)
at pq (http://192.168.1.228:8123/api/hassio_ingress/zo5IABVySwRHz1As3iiCjS-LYJn9pW6q3pJspLj0TWw/web/static/js/main.c99d8d56.js:2:1484369)
at main
at ho (http://192.168.1.228:8123/api/hassio_ingress/zo5IABVySwRHz1As3iiCjS-LYJn9pW6q3pJspLj0TWw/web/static/js/main.c99d8d56.js:2:547924)
at l (http://192.168.1.228:8123/api/hassio_ingress/zo5IABVySwRHz1As3iiCjS-LYJn9pW6q3pJspLj0TWw/web/static/js/main.c99d8d56.js:2:466182)
at so (http://192.168.1.228:8123/api/hassio_ingress/zo5IABVySwRHz1As3iiCjS-LYJn9pW6q3pJspLj0TWw/web/static/js/main.c99d8d56.js:2:546722)
at X (http://192.168.1.228:8123/api/hassio_ingress/zo5IABVySwRHz1As3iiCjS-LYJn9pW6q3pJspLj0TWw/web/static/js/main.c99d8d56.js:2:442324)
at W (http://192.168.1.228:8123/api/hassio_ingress/zo5IABVySwRHz1As3iiCjS-LYJn9pW6q3pJspLj0TWw/web/static/js/main.c99d8d56.js:2:442051)
at K (http://192.168.1.228:8123/api/hassio_ingress/zo5IABVySwRHz1As3iiCjS-LYJn9pW6q3pJspLj0TWw/web/static/js/main.c99d8d56.js:2:442436)
at po (http://192.168.1.228:8123/api/hassio_ingress/zo5IABVySwRHz1As3iiCjS-LYJn9pW6q3pJspLj0TWw/web/static/js/main.c99d8d56.js:2:548704)
at vq (http://192.168.1.228:8123/api/hassio_ingress/zo5IABVySwRHz1As3iiCjS-LYJn9pW6q3pJspLj0TWw/web/static/js/main.c99d8d56.js:2:1486903)
at I (http://192.168.1.228:8123/api/hassio_ingress/zo5IABVySwRHz1As3iiCjS-LYJn9pW6q3pJspLj0TWw/web/static/js/main.c99d8d56.js:2:438947)
at Z (http://192.168.1.228:8123/api/hassio_ingress/zo5IABVySwRHz1As3iiCjS-LYJn9pW6q3pJspLj0TWw/web/static/js/main.c99d8d56.js:2:438216)
at j (http://192.168.1.228:8123/api/hassio_ingress/zo5IABVySwRHz1As3iiCjS-LYJn9pW6q3pJspLj0TWw/web/static/js/main.c99d8d56.js:2:439880)
at n (http://192.168.1.228:8123/api/hassio_ingress/zo5IABVySwRHz1As3iiCjS-LYJn9pW6q3pJspLj0TWw/web/static/js/main.c99d8d56.js:2:1488684)
at n (http://192.168.1.228:8123/api/hassio_ingress/zo5IABVySwRHz1As3iiCjS-LYJn9pW6q3pJspLj0TWw/web/static/js/main.c99d8d56.js:2:1487422)
at div
at bq (http://192.168.1.228:8123/api/hassio_ingress/zo5IABVySwRHz1As3iiCjS-LYJn9pW6q3pJspLj0TWw/web/static/js/main.c99d8d56.js:2:1488913)```

isewise avatar Aug 10 '22 17:08 isewise

Sorry it took me so long to reply, long week.

So this looks like possibly one of your automatons is not valid. Can you:

  1. Share the automation you tried to load.
  2. Try to clear browser cookies.
  3. Retrace what steps you took to see this error, did this happen on first load? did you see the actual UI at any point?

asosnovsky avatar Aug 14 '22 00:08 asosnovsky

Clearing my cookies resolved the problem.

I have seen the UI before this issue started.

I know I edited several of my existing automations and I believe I created a brand new one in the UI.

Not certain which of my automations it was, I have over 30 automations.

Thanks for the help and for the awesome add-on. This really helps see the flow for more complex automations.

EDIT: ***I might have spoke too soon. ***

I was just back in the UI editing an automation and the error popped back up.

But reloading seems to be working right now.

isewise avatar Aug 14 '22 02:08 isewise

ok, so it sounds like I need to implement a better error handle for when an invalid automation (according to shortumation) is loaded.

asosnovsky avatar Aug 14 '22 04:08 asosnovsky

@isewise Take a look at the new release v0.6.1

asosnovsky avatar Aug 18 '22 16:08 asosnovsky