maykar / compact-custom-header

This project has been replaced by Custom Header
MIT License
238 stars 31 forks source link

User exceptions being ignored in Fully Kiosk on Fire Tablet #209

Closed arretx closed 5 years ago

arretx commented 5 years ago

Describe the issue:

User exceptions are ignored in Fully Kiosk Browser, but in Chrome, the exceptions seem to work.

Config YAML:

cch:
  default_tab: '0'
  exceptions:
    - conditions:
        user: media
      config:
        clock_date: true
        clock_format: '12'
        default_tab: lighting
        header: true
        hide_tabs: '0,1,3,4,calendar'
        kiosk_mode: false
        menu: hide
        notifications: show
        options: hide
        show_tabs: lighting
        swipe: true
        swipe_amount: '15'
        swipe_animate: swipe
        swipe_skip: '0,1,3,4,calendar'
        voice: clock
    - conditions:
        user: >-
          Amanda Toews, Carson Joyner, Tyson Shea, Jen Bozek, Scott Brown,
          Meagan South
      config:
        clock_date: true
        clock_format: '12'
        default_tab: '0'
        disable_sidebar: true
        header: true
        hide_config: true
        hide_help: true
        hide_tabs: '1,3,4,6,7,8,9'
        kiosk_mode: false
        menu: hide
        notifications: show
        options: clock
        show_tabs: []
        voice: clock
    - conditions:
        user: foyer
      config:
        chevrons: false
        clock_date: true
        clock_format: '12'
        default_tab: '5'
        disable_sidebar: true
        header: true
        hide_config: true
        hide_help: true
        hide_tabs: []
        kiosk_mode: false
        menu: hide
        notifications: show
        options: clock
        redirect: false
        show_tabs: []
        swipe: false
        swipe_amount: '15'
        swipe_animate: none
        voice: clock
  hide_unused: true
  sidebar_closed: true
  sidebar_swipe: false
  swipe: true
resources:
  - url: /community_plugin/compact-custom-header/compact-custom-header.js
    type: module

HA and/or Browser Error:

I don't know how to find error console on Android device.

Versions and Browser:

CCH 1.4.0 Hassio .99.3 Fully Kiosk Browser, updated today to the latest version. Don't know what Storage Mode is.

I've tried both the js and the module resource settings (the one you have for older browsers) but I get the same result. I've cleared the cache on the Android device and I've re-installed Fully Kiosk Browser...no positive result.

I just don't know where to go from here. I need a kiosk solution for our environment and so far I've gotten nowhere on the Android.

maykar commented 5 years ago

Fully Kiosk Browser is working as expected using your config on my Android devices and on HA 0.99.3. All your exception's configs work just fine when I insert my user name into each of the user: conditions.

What Android version are you using?

maykar commented 5 years ago

Also try this modified config, fixed up some things. You shouldn't use both hide_tabs and show_tabs in the same config, use one or the other. Only one button should be a clock. Notifications button is no longer an option in the latest versions of HA and a few other things. The outcome should be exactly the same as the config above, but it will help us narrow down your issues.

cch:
  clock_date: true
  hide_unused: true
  sidebar_closed: true
  sidebar_swipe: false
  swipe: true
  exceptions:
    - conditions:
        user: media
      config:
        menu: hide
        options: hide
        default_tab: lighting
        hide_tabs: '0,1,3,4,calendar'
        swipe_animate: swipe
        voice: clock
    - conditions:
        user: >-
          Amanda Toews, Carson Joyner, Tyson Shea, Jen Bozek, Scott Brown,
          Meagan South
      config:
        disable_sidebar: true
        hide_config: true
        hide_help: true
        hide_tabs: '1,3,4,6,7,8,9'
        menu: hide
        options: clock
        voice: hide
    - conditions:
        user: foyer
      config:
        chevrons: false
        default_tab: '5'
        disable_sidebar: true
        hide_config: true
        hide_help: true
        menu: hide
        options: clock
        redirect: false
        voice: hide
arretx commented 5 years ago

It's a Fire 8 tablet. When I try to access System Updates to see which version it is, the screen just goes blank.

On Thu, Sep 26, 2019 at 4:12 PM Ryan Meek notifications@github.com wrote:

Fully Kiosk Browser is working as expected using your config on my Android devices and on HA 0.99.3. All your exception's configs work just fine when I insert my user name into each of the user: conditions.

What Android version are you using?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/maykar/compact-custom-header/issues/209?email_source=notifications&email_token=AHURKUVG636TCE447YAXOLLQLU6U7A5CNFSM4I27LCA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7XG2VQ#issuecomment-535719254, or mute the thread https://github.com/notifications/unsubscribe-auth/AHURKUVJT2SA34LV56COTVDQLU6U7ANCNFSM4I27LCAQ .

-- [image: photo] Jon Griffith REALTOR®, HomeSmart

480-463-4062 | jon@jongriffith.com

http://realtor.jongriffith.com 10601 N. Hayden Road, Suite I-100 | @RealScottsdale http://facebook.com/realscottsdaleliving http://twitter.com/realscottsdale http://www.youtube.com/realscottsdaleliving http://www.linkedin.com/in/jonathangriffith Get your own email signature https://www.wisestamp.com/signature-in-email?utm_source=promotion&utm_medium=signature&utm_campaign=get_your_own

maykar commented 5 years ago

Give the updated config I posted above a try. Also, a couple of questions. Are you using the full CCH from this github repo or are you using the one from the link here? Is this something that was previously working or are you setting this up for the first time?

maykar commented 5 years ago

Borrowed a Fire 8 HD to test this a bit more. The device is running the latest versions of HA, CCH, Fire OS, and Fully Kiosk. I did not have to use the legacy version of CCH.

Used your config copied directly from my example above and added my user name to each exception separately and everything works as expected. I checked for errors in Fully Kiosk using ADB Dev-Tools and there were none. I am at a loss as to what the issue may be.

Only thing I could suggest is trying to update the tablet's OS. The fact that System Updates isn't accessible to you may make that a bit of a pain, but as mentioned here it seems there was a recent update to Fire OS that also updated webview and that may just solve your issue.

lolouk44 commented 5 years ago

Same issue on a Fire7 HD. Will try and update OS & Fully Kiosk. Before I do so do you want some info?

maykar commented 5 years ago

@lolouk44 Before you update can you tell me if this issue exists on both the legacy and non-legacy versions of CCH?

lolouk44 commented 5 years ago

sure. how do I access / install legacy version please? I'm on HACS at the mo but got a separate HA install where I could set Legacy up

maykar commented 5 years ago

Legacy version: https://github.com/maykar/compact-custom-header/issues/185

Might be easiest to just copy the legacy version's raw code and paste it over the version you're currently using then do a full refresh.

lolouk44 commented 5 years ago

Yes Legacy works

maykar commented 5 years ago

Cool, good to know. If you still update the OS & Fully Kiosk, please update us here. Thanks!

lolouk44 commented 5 years ago

it looks like legacy only works without HACS? I tried to replace www\community\compact-custom-header\compact-custom-header.js with the file from legacy and that doesn't work either

lolouk44 commented 5 years ago

by the way, does that error help:

Log Details (ERROR)
Fri Sep 27 2019 17:06:47 GMT+0100 (British Summer Time)
http://192.168.0.24:8123/community_plugin/compact-custom-header/compact-custom-header.js:168:12 Uncaught SyntaxError: Unexpected token ...
lolouk44 commented 5 years ago

also have a few of these but not sure if related (I've installed HACS today and still checking for issues)

2019-09-27 16:35:50 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140000931480016] Error handling message: Unauthorized
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 91, in async_handle
    handler(self.hass, self, schema(msg))
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 50, in handle_subscribe_events
    raise Unauthorized
homeassistant.exceptions.Unauthorized: Unauthorized
maykar commented 5 years ago

The first error tells me that the non-legacy version of CCH is being used on a system that should be using the legacy version (FireOS not updated yet).

The second one is unrelated.

lolouk44 commented 5 years ago

Thanks I'll see if I can update the OS and Fully over the weekend.

maykar commented 5 years ago

Thanks to my nephew letting me borrow his "gaming tablet", I was able to test this on a Fire 7 HD that wasn't updated to the latest Fire OS and, like lolouk44, I can confirm that it works with the legacy version of CCH.

Since this has multiple reports of working with either the latest Fire OS or with Fire tablets not on the latest OS (using the legacy version of CCH) I think this one is closed.

@arretx Please, update here with what you have tried and your results. If you are unable to update the tablet, use the legacy version of CCH here using js as the resource type, descibed here.

Going to keep this open for a bit in case arretx or lolouk44 have issues after update.