home-assistant / frontend

:lollipop: Frontend for Home Assistant
https://demo.home-assistant.io
Other
3.98k stars 2.72k forks source link

Google Cast error - Unable to find a view with path [X] #4614

Closed OkhammahkO closed 2 years ago

OkhammahkO commented 4 years ago

Home Assistant release with the issue:

Home Assistant 0.101.1 (hassio)

Last working Home Assistant release (if known):

na

Operating environment (Hass.io/Docker/Windows/etc.):

hassio

Integration:

Cast (cast.show_lovelace_view)

Description of problem:

Summary: cast.show_lovelace_view will not cast a lovelace view unless you "pre-authorise" via https://cast.home-assistant.io/ . You get an error on the cast device showing Error: Unable to find a view with path [path:]

See this thread: https://community.home-assistant.io/t/google-cast-error-unable-to-find-a-view-with-path-xxxx/138180/3

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

Traceback (if applicable):

Additional information:

Haven't raise many issues, so let me know if you need more info etc.

mofonics commented 4 years ago

Yes! Can't wait to get this fixed! Thanks, everyone!

arnoldpistorius commented 4 years ago

Having troubles as well. The Google Nest Hub just shows connected but doesn't do anything, while using cast.home-assistant.io works like a charm. However I want to launch HA Cast by a service call. I'm using nabucasa remote service. My http section in configuration.yaml is empty (just http:)

CMaxim77 commented 4 years ago

I too have this issue, it does however work if after a restart then going to my chrome browser connecting from there. Then I can use a service call from the UI to successfully show that view.

maxi1134 commented 4 years ago

Same issue here! Works one time out of five.

G0GUPA commented 4 years ago

Thanks, I have same issue. I'm waiting for a long time to be solved.

WhimsySpoon commented 4 years ago

I too have this issue. It used to work fine, now I get this every time I attempt to cast from an automation.

RDG88 commented 4 years ago

Same issue here! can't wait for a fix

mpfl commented 4 years ago

This is the error message I get, if I get an error message, when trying to cast to my Lenovo Smart Display using a script. When running the script, I have three possible outcomes:

  1. Simple "Connected" message
  2. "Connected" message with "Unable to find a view with path dashboard"
  3. Successful loading of my lovelace view "dashboard"
troykelly commented 4 years ago

Also having this issue - worked fine up until yesterday. Now getting Connected Error: Unable to find view path NNN (where NNN is an existing lovelace view). If I provide default_view I get the old (pre lovelace) everything view which just fill's the screen with status' - not the default_view as it is actually defined. It seems to be a disconnect between cast and lovelace?

THE-AP05TLE commented 4 years ago

I'm having the same issue as @mpfl on a google home hub i.e. Simple "Connected" message "Connected" message with "Unable to find a view with path dashboard" Successful loading of my lovelace view "dashboard"

also, from yesterday on "successful" loading none of my mdi icons would load on the cast page

mjaspers23 commented 4 years ago

Same here, it works after the pre-authorise step and otherwise it fails

daboshman commented 4 years ago

same issue for me also. not working

michaudjp commented 4 years ago

Same here. Weird bug.

derrike commented 4 years ago

Same issue for me - I can cast with numbered views: "1","2","3", etc.

but when I go to use a named view/path it doesn't work. I've had some success after authorizing via via https://cast.home-assistant.io/ but still very inconsistent with named views/paths

gusfalconi commented 4 years ago

I am having the same issue. Very erratic behavior. Works 1 in 5 attempts. Sometimes it shows connected and sometimes the path is not found.

Derrike, can you explain how can you cast using numbered views? I have tried to do it, but got the same path not found.

michaelkuty commented 4 years ago

Same for me, tested multiple times, you need authorize/cast from mobile phone, after that you will be able to cast from service all with numbered views, lovelace view id (in path) for example 0,1 after some time when I call cast show lovelace view with number 0 which worked 10minutes before I‘ve got old states view, that is really interesting how inconsistent behavior, also after some time when I call service cast seeing then just message Connected and nothing. For me needs to be reautorize from mobile phone after that service call works for some time again.

derrike commented 4 years ago

gusfalconi, I'm not doing anything that you probably haven't already tried. I've included the yaml below - but this only works for lovelace views that I haven't set a path for previously. For example, I have one that I tried setting a path for "office" that worked before with the number method, but now doesn't work with the name. When trying to remove the path to set it back to just a number and use that to cast, it still doesn't work.

entity_id: media_player.ghub_office
view_path: "1"
codycodes commented 4 years ago

I am having this exact issue and I hope this gets fixed soon! I can cast default_view without authorization and I can also cast via cast.show_lovelace_view if I do the "pre-auth" step at https://cast.home-assistant.io/ ; unfortunately this isn't a feasible solution as when the media_player component is disconnected you must recomplete this pre-auth step to use cast.show_lovelace_view to cast again...

Funnily enough using the automation previously working reliably for me. I was using an automation to turn on the TV to the correct lovelace view as part of waking up. Would love to be able to do that again!

I'm wondering if there's something in our configs that might be causing the issue? In any case it seems like this issue has been occurring for some for awhile while others maybe it just started recently? Hopefully we can pinpoint a cause and get our casting back soon!

YoinkZed commented 4 years ago

Same here.. seems to work with cast.home-assistant.io. I do also works with the default_view where it only shows the "states" page. As soon as you want to use the service: cast.show_lovelace_view it fails. Would be preferable if we could use this in an automation to cast the lovelace view instead of opening a browser and use cast.home-assistant.io.

Running 0.103.4 at the moment (Hassio).

Metus88 commented 4 years ago

Same problem! Thanks

sameeraman commented 4 years ago

I have the same issue, unfortunately.

CiquattroFPV commented 4 years ago

Same issue here.. I resolved using the automation with view_path: "5" (you need to replace the number with your desidered view)

YoinkZed commented 4 years ago

Same issue here.. I resolved using the automation with view_path: "5" (you need to replace the number with your desidered view)

I did already try that. The problem is still that I need to first open cast.home-assistant.io and then do a first cast. Would be much better if you could just use the cast service directly.

CiquattroFPV commented 4 years ago

Same issue here.. I resolved using the automation with view_path: "5" (you need to replace the number with your desidered view)

I did already try that. The problem is still that I need to first open cast.home-assistant.io and then do a first cast. Would be much better if you could just use the cast service directly.

yes I noticed the same thing .. I always need to open cast.home-assistant.io before cast to a device .. If I don't connect to cast.home-assistant.io, it say "Connected but not able to find the path view"

SigNoget commented 4 years ago

I am having the same issues as everyone else! Would love to see this fixed! Cheers 👍

zhaokoh commented 4 years ago

Same issues with everyone here. I am trying to find out under what circumstances it works. I tried:

1) Authorized via cast.homeassistant.io (sometimes it could detect my media player but sometimes it couldn't) 2) Trying to cast via lovelace service call, again this did not work most of the time. 3) Trying to call the cast service using appdaemon, but again this is not working.

Stop casting via cast.homeassistant.io, and start casting again, sometimes this works - again very inconsistent.

This feature is really incredible and I like it, we just need to make it consistent :)

Looking forward to hear some info about what is the cause.

p.s. Also I should mention that it did not always find the custom view, it seems "default_view" always work but not the other views.

OkhammahkO commented 4 years ago

@balloob , this page (https://cast.home-assistant.io/) suggests letting you know about cast bugs, which I think this may be, so thought I would bring this to your attention if you aren't already aware. Cheers.

jparthum commented 4 years ago

I'm experiencing unreliable casts as well but I'm not seeing any correlation with cast.home-assistant.io.

I've set up Node-Red to check the status of the cast devices and retry failed casts up to four times, and I usually get a successful cast within those five attempts. The number of attempts needed varies somewhat for each session, but it seems that some devices require more attempts on average than others. It also seems like the devices I cast to more frequently require fewer retries than those I cast to less frequently.

Background: I've been using four Google/Nest Hubs and one Chromecast as my primary interfaces for Home Assistant for about 3 months now -- casting and re-casting several times per day, well over one hundred times altogether.

BenWoodford commented 4 years ago

I just had this issue and discovered that it really doesn't like the path being in quotes

If you just put the path into your automations.yml without any quotation marks or similar, it does seem to work

EDIT: Never mind, it must have been something else, still trying to crack this one...

mcfrojd commented 4 years ago

Is this a problem even if you run nabucasa? Im not using nabucasa and i face the same issues as above.

gdigiorgio commented 4 years ago

Same problem!!

DavidFW1960 commented 4 years ago

THis was working for me previously but now with 0.106.2 not working. TBH I rarely use this anyway. Good to see @bramkragten is assigned to look at this.

I have tried with the cast: in lovelace but also the service - neither work.

I also see I now have 3 system generated cast users???

jparthum commented 4 years ago

Casting of Lovelace Views has completely stopped working for me too.

I update to 0.106.0 on 2/28/20, late at night. I was casting to three Google hubs during the update and they seemed to continue casting fine after the update, but on 2/29/20 I noticed casting problems. The problems may have already existed but didn't surface until a cameras were triggered and a different View was cast. Since then I've retried casting to all four of my hubs and a Chromecast with the same results: After a few retries (which has always been necessary) I get the white logo screen with Connected at the bottom, then when any other View is cast (to the already connected device), underneath Connected I get Error: Unable to find a view with path <valid Lovelace View path>.

The previous issues occur when using the show_lovelace_view service from my HA instance, however when trying from cast.home-assistant.io casting is successful, but under PICK A VIEW the only option provided is Home, which displays the old (depreciated?), States UI View. Note: Attempting to cast the View Home using the show_lovelace_view service also fails.

harfordhawk commented 4 years ago

I too have this issue. It used to work fine, now I get unable to find a view with path xxxxx. I am pretty sure it was working in 105

bartrumb commented 4 years ago

Casting of Lovelace Views has completely stopped working for me too.

I update to 0.106.0 on 2/28/20, late at night. I was casting to three Google hubs during the update and they seemed to continue casting fine after the update, but on 2/29/20 I noticed casting problems. The problems may have already existed but didn't surface until a cameras were triggered and a different View was cast. Since then I've retried casting to all four of my hubs and a Chromecast with the same results: After a few retries (which has always been necessary) I get the white logo screen with Connected at the bottom, then when any other View is cast (to the already connected device), underneath Connected I get Error: Unable to find a view with path <valid Lovelace View path>.

The previous issues occur when using the show_lovelace_view service from my HA instance, however when trying from cast.home-assistant.io casting is successful, but under PICK A VIEW the only option provided is Home, which displays the old (depreciated?), States UI View. Note: Attempting to cast the View Home using the show_lovelace_view service also fails.

Same issue here. Worked fine in 105.

bramkragten commented 4 years ago

This should be fixed now, please clear the cache of cast.home-assistant.io

harfordhawk commented 4 years ago

still not working for me

KentEkl commented 4 years ago

The same for me, cleared the cache but the problem persists.

Logger: homeassistant.components.websocket_api.http.connection.140514568642384 Integration: websocket_api (documentation, issues) First occured: 6:26:16 PM (1 occurences) Last logged: 6:26:16 PM

Received invalid command: lovelace/resources

Logger: homeassistant.components.websocket_api.http.connection.140514568642384 Integration: websocket_api (documentation, issues) First occured: 6:26:16 PM (1 occurences) Last logged: 6:26:16 PM

Error handling message: extra keys not allowed @ data['url_path']. Got None

m4rk89 commented 4 years ago

This should be fixed now, please clear the cache of cast.home-assistant.io

I've got the same error message as KentEkl, but now I can see all of my views on the https://cast.home-assistant.io/ site.

DavidFW1960 commented 4 years ago

@bramkragten still not working after deleting cache. I don't get an error anymore - the screen just goes white instead.

jparthum commented 4 years ago

Casting is working again for me now... In addition to clearing the browser cache for cast.home-assistant.io, I restarted HA, and cleared the cache for my HA instance in the same (desktop) browser I initially had cast.home-assistant.io open in. I don't know if the latter was needed but before doing both I was seeing the same thing @m4rk89 described (Views appearing under PICK A VIEW but not successfully casting). Now casting is working for me (after the several retries that are usually necessary).

Thanks, @bramkragten .

aolley commented 4 years ago

I was experience the same symptoms as jparthum, and can confirm that after clearing my cache I was able to properly cast to my home hub. Thanks.

KentEkl commented 4 years ago

Works fine for me now 😊

m4rk89 commented 4 years ago

I have cleared the cache multiple times, tried in different browsers but I still have the classic unable to find a view error....

jparthum commented 4 years ago

@m4rk89 Try restarting Home Assistant.

m4rk89 commented 4 years ago

@m4rk89 Try restarting Home Assistant.

I have restarted multiple times with clearing the site data and still got the error messages:

Log Details (ERROR)
Logger: homeassistant.components.websocket_api.http.connection.547577529744
Integration: websocket_api (documentation, issues)
First occured: 11:04:00 PM (1 occurences)
Last logged: 11:04:00 PM

Error handling message: extra keys not allowed @ data['url_path']. Got None`
`Log Details (ERROR)
Logger: homeassistant.components.websocket_api.http.connection.547577529744
Integration: websocket_api (documentation, issues)
First occured: 11:04:00 PM (1 occurences)
Last logged: 11:04:00 PM

Error handling message: extra keys not allowed @ data['url_path']. Got None
jparthum commented 4 years ago

Maybe your cache didn't clear correctly? In Chrome/Brave I've found Shift+F5 to be a less reliable method of clearing the cache.
If you have Developer Tools open (F12 or Ctrl+Shift+I) you can long-press the Reload this page button ( ) and select Empty Cache and Hard Reload.

DavidFW1960 commented 4 years ago

and select Empty Cache and Hard Reload.

Yeah I always use that method and still a white screen... no error but a blank white screen

DavidFW1960 commented 4 years ago

so this (for example) works:

          - type: entities
            title: Chromecast Control
            show_header_toggle: false
            entities:
              - type: cast
                name: System
                view: "home_assistant"
                hide_if_unavailable: false

BUT this doesn't:

casthomeassistantfox:
  alias: Cast Home Assistant Foxtel
  sequence:
  - data:
      entity_id: media_player.foxtel_7587
      view_path: home_assistant
    service: cast.show_lovelace_view

For some reason, NONE of my media_player.foxtel_7587 appears in the services list in dev tools. I do see the device/entity in states but it's not available to cast to anymore. image

Doesn't work either

aolley commented 4 years ago

I was experience the same symptoms as jparthum, and can confirm that after clearing my cache I was able to properly cast to my home hub. Thanks.

And today it stopped working again. I can cast fine from the site, but using cast.show_lovelace_view gives the 'unable to find a view...' error again. Nothing changed from yesterday when it was working perfectly.