Latest custom-ui renders empty cards?!?

Hi,

I’ve just installed or better updated the latest version of @andrey-git custom ui https://github.com/andrey-git/home-assistant-custom-ui and after reboot i get a 404 error, and log complains about the state-card-custom-ui-es5.html being an incorrect entry in the frontend.yaml, so I’ve deleted that.
After reboot i get back the front-end, but with all empty cards!>?!
this happens on Mac Safari and Chrome, iOS App seems to be alright.

this needs a fast remedy, please what should i do?
in the log:

Log Details (ERROR)
Sat Dec 02 2017 17:20:41 GMT+0100 (CET)

Error in logging
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/aiohttp/helpers.py”, line 554, in get
return inst._cache[self.name]
KeyError: ‘remote’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/aiohttp/helpers.py", line 521, in log
    for key, value in fmt_info:
  File "/usr/lib/python3.6/site-packages/aiohttp/helpers.py", line 513, in <genexpr>
    for key, method in self._methods)
  File "/usr/lib/python3.6/site-packages/aiohttp/helpers.py", line 473, in _format_a
    ip = request.remote
  File "/usr/lib/python3.6/site-packages/aiohttp/helpers.py", line 556, in __get__
    val = self.wrapped(inst)
  File "/usr/lib/python3.6/site-packages/aiohttp/web_request.py", line 319, in remote
    peername = transport.get_extra_info('peername')
  File "/usr/lib/python3.6/asyncio/sslproto.py", line 306, in get_extra_info
    return self._ssl_protocol._get_extra_info(name, default)
  File "/usr/lib/python3.6/asyncio/sslproto.py", line 547, in _get_extra_info
    return self._transport.get_extra_info(name, default)
AttributeError: 'NoneType' object has no attribute 'get_extra_info'..

— edit!! _____
cheered too soon apparently: checked on my iPhone, and now I’ve got all empty cards in the App!!??

before the update to the latest custom ui, all was well.
updated, including the es5.html broke my 0.58.1 Hassio setup on the computer, but no in the iPhone.
restored the previous version restored computer setup, and iPhone was fine.
updated to latest custom ui, without the es5.html gave a fine computer setup, unfortunately my iPhone is behaving strangely. All is there, but with empty cards…
No errors in the logs pointing to this at all. What to do please?

Ive refreshed many times, both on Mac and iPhone, restarted HomeAssistant, rebooted Hassio, and even uninstalled en reinstalled the app.

MacBook:

iPhone:

____ end edit______

nevermind. didn’t check the files https://github.com/andrey-git/home-assistant-custom-ui/blob/master/docs/activating.md closely enough. im on 0.58.1 and not 0.59 so the
extra_html_url_es5:
- /local/custom_ui/state-card-custom-ui-es5.html
shouldn’t be activated.

a bit dangerous to simply update running $ ./update.sh without checking first… stupid to not read @andrey git’s email closely enough.
sorry.
Cheers,
Marius!

Is the problem with iOS app or browser on iOS? I have no idea what the app does.

How do you load customui? Customizer? Extra_html_url? Please post the relevant part of your config.

the issue is with both the app and the browser on the phone, both safari and chrome.

i use the Extra_html_url in the frontend.yaml. and did the automatic local install. Files seem to be in the right places according to the documents on the github page

thx for checking

—edit—

I’ve reinstated the previous version (both html and gz) once more, and luckily, now i can see the content on the cards again…
must be something in the new version then ?

the asyncio ssl error posted above is still there, not sure if this is related. Only noticed them after the update, so might be worth checking out.

— end-edit----

The aysncio error is unrelated.

0.58.x has extra_html_url which is loaded in both modes (es5/latest)
0.59 has extra_html_url which is loaded in latest mode and extra_html_url_es5 which is loaded in es5 mode

20171117: has state-card-custom-ui.html which is an es5 file.
20171129: has state-card-custom-ui.html which is a latest file and state-card-custom-ui-es5.html which is an es5 file.

So for the following combinations:

0.58.x + 20171117 + es5:

frontend:
  javascript_version: es5
  extra_html_url: /local/custom_ui/state-card-custom-ui.html

0.58.x + 20171117 + latest: Unsupported

0.58.x + 20171129 + es5:

frontend:
  javascript_version: es5
  extra_html_url: /local/custom_ui/state-card-custom-ui-es5.html

0.58.x + 20171129 + latest:

frontend:
  javascript_version: latest
  extra_html_url: /local/custom_ui/state-card-custom-ui.html

0.59 + 20171117: Unsupported

0.59 + 20171129:

frontend:
  extra_html_url: /local/custom_ui/state-card-custom-ui.html
  extra_html_url_es5: /local/custom_ui/state-card-custom-ui-es5.html
1 Like

wow, thank you so much, i completely missed the javascript entry, and, btw, it wasn’t created during automatic setup either.
Anyways, of course i immediately tried. unfortunately without the succes i hoped for.

the below setup won’t work: empty cards on Mac Safari, iPhone Safari and App, works with Chrome on both Mac and iPhone though:

skipping the javascript for my version 0.58.1 altogether leaves only

0.58.x + 20171117 (this is a setup not mentioned in your lineup above. Ive taken out the javascript entry latest.

and lo and behold, this does work… both on iPhone and Mac. With all browsers.
Ive checked and rechecked the files, and the exact and correct versions are displayed in the html’s.

sorry.
Marius

@andrey

Mine still isn’t working…

I updated to 0.59.1

I ran the update script:

cd /home/homeassistant/.homeassistant
sudo ./update.sh

It downloaded the appropriate files into the www directory:

Getting ./update.sh
File up to date.
Getting state-card-custom-ui-es5.html
Getting state-card-custom-ui-es5.html.gz
Getting state-card-custom-ui.html
Getting state-card-custom-ui.html.gz
Updated to Custom UI "20171129"
Getting __init__.py
File up to date.
Getting services.yaml
File up to date.

These are my configuration.yaml entries:

customize_glob:
  "*.*":
    custom_ui_state_card: state-card-custom-ui

frontend:
  extra_html_url:
    - /local/custom_ui/state-card-custom-ui.html
  extra_html_url_es5:
    - /local/custom_ui/state-card-custom-ui-es5.html

And I still have empty state cards…

EDIT

It’s working now.

After all above was done I had to clear the browser cache.

@andrey I’ve had problems for the last few versions with the frontend UI either not loading or being really slow/sluggish. But I’m getting confused and still not certain how I should have the configuration.yaml set up.

I’m on the latest version of Home Assistant (0.59.1 on Hassbian), and have updated to the latest version of Custom UI. (ran ./update.sh).

Does this look correct for configuration.yaml?

frontend:
  javascript_version: auto
  
  extra_html_url:
    - /local/custom_ui/state-card-custom-ui.html
  extra_html_url_es5:
    - /local/custom_ui/state-card-custom-ui-es5.html

customizer:
  custom_ui: local

this is from @andrey:

0.58.x has extra_html_url which is loaded in both modes (es5/latest)
0.59 has extra_html_url which is loaded in latest mode and extra_html_url_es5 which is loaded in es5 mode

20171117: has state-card-custom-ui.html which is an es5 file.
20171129: has state-card-custom-ui.html which is a latest file and state-card-custom-ui-es5.html which is an es5 file.

So for the following combinations:

0.58.x + 20171117 + es5:

frontend:
  javascript_version: es5
  extra_html_url: /local/custom_ui/state-card-custom-ui.html
0.58.x + 20171117 + latest: Unsupported

0.58.x + 20171129 + es5:

frontend:
  javascript_version: es5
  extra_html_url: /local/custom_ui/state-card-custom-ui-es5.html
0.58.x + 20171129 + latest:

frontend:
  javascript_version: latest
  extra_html_url: /local/custom_ui/state-card-custom-ui.html
0.59 + 20171117: Unsupported

0.59 + 20171129:

frontend:
  extra_html_url: /local/custom_ui/state-card-custom-ui.html
  extra_html_url_es5: /local/custom_ui/state-card-custom-ui-es5.html

Still, I’ve reverted to 271117 and 0.58.1, (have no javascript definition in frontend) all other combinations gave empty cards in various combinations on various devices…
Ill wait for 0.59.1 to hit Hassio and see what happens.

Cheers,
Marius

Thanks, I saw that but still wasn’t sure if my current config is correct or if I should remove some of the lines of code :rofl:

same here, im still unsure whether the customizer:
custom_ui: local is necessary when you’re using the frontend declaration too.

According to the @andrey’s post, i would assume no. You can always try and see :wink:

Marius

@jono

I just upgraded to v0.59.1 from 0.54.0.

I only have the frontend lines (without the javascript reference) and mine is working.

I had to run the update script but after that everything was good.

Here is what I have now:

frontend:
  extra_html_url:
    - /local/custom_ui/state-card-custom-ui.html
  extra_html_url_es5:
    - /local/custom_ui/state-card-custom-ui-es5.html
1 Like

Thanks, I’ll give that a try :+1:t3:

With this in my config it works ok on the mobiledevices (Androids).
But on Chrome its missing like OP.

any more ideas?
.

EDIT:
I cleared my browsing history and now I got it to work…