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

Fix of warnings and errors popping into the log #11

Closed
wants to merge 4 commits into from
Closed

Fix of warnings and errors popping into the log #11

wants to merge 4 commits into from

Conversation

SupremeSports
Copy link

@SupremeSports SupremeSports commented Sep 16, 2020

Hi, this fixes the error saying "Uncaught TypeError: e.push is not a function". This was generating dozens of errors.

Tested on my HA and works great, please ensure it works with everything Custum-UI is supposed to do as I only use it in yaml.

Fixing warning popping into log (uncaught typeerror: data.push is not a function)
Fix warning popping into log (Uncaught TypeError: Cannot read property 'state' of undefined, or Uncaught TypeError: Cannot read property 'attribute' of undefined)
Change revision date
@SupremeSports
Copy link
Author

SupremeSports commented Sep 16, 2020

Errors before the fix:

errors

@SupremeSports
Copy link
Author

SupremeSports commented Sep 16, 2020

Bad news... after 12 hours without any "Uncaught TypeError: e.push is not a function", it came back :'(

EDIT - IT WORKS, just changed computer and had to clear cache (Ctrl+F5)

@Mariusthvdb
Copy link
Owner

Mariusthvdb commented Sep 16, 2020

too bad.

btw, this:

 Cannot read property 'state' of undefined" or "Uncaught TypeError: Cannot read property 'attribute' of undefined

is not an error in the custom-ui, it is the user not defining the templates correctly.... always have them check for state/existence , or not being none..

you should use that error as feedback to improve your templates ;-)

please take out that 'fix' since it isn't.

@SupremeSports
Copy link
Author

SupremeSports commented Sep 16, 2020

Sorry, It worked, I'm not on the same computer as yesterday and I had to do a Ctrl+F5 to clear cache, it works :D

@SupremeSports
Copy link
Author

SupremeSports commented Sep 16, 2020

you should use that error as feedback to improve your templates ;-)

Ok, but I don't understand from where comes those errors :(

just walk through all your templates in custom-ui and look for the 'attributes' . You are templating that on an entity that doesnt (yet) exist.

Cancel the fix for 'state' or 'attribute' underfined
@SupremeSports
Copy link
Author

SupremeSports commented Sep 16, 2020

please take out that 'fix' since it isn't.

Removed the 'Fix', keeping only the e.puch error which works after cache clearing (Ctrl+F5)

@SupremeSports
Copy link
Author

SupremeSports commented Sep 17, 2020

24 hours now without e.push errors 🤗

@Mariusthvdb
Copy link
Owner

Mariusthvdb commented Sep 17, 2020

these errors only happen when browsing the settings tab in the left side menu. Did you check that?
will test locally too.
thanks

Mariusthvdb added a commit that referenced this pull request Sep 17, 2020
thanks to @SupremeSports who created this PR #11
edited in the custom-ui file directly since the PR contained more than this error catch.
@Mariusthvdb
Copy link
Owner

Mariusthvdb commented Sep 17, 2020

edited the file manually after successfully testing locally, so closing this PR to avoid version conflicts or multiple edit errors.
Many thanks!

@SupremeSports
Copy link
Author

these errors only happen when browsing the settings tab in the left side menu. Did you check that?
will test locally too.
thanks

Absolutely, I had these errors only in those cases. Tested and fixed for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants