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.
Yes! Can't wait to get this fixed! Thanks, everyone!
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:)
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.
Same issue here! Works one time out of five.
Thanks, I have same issue. I'm waiting for a long time to be solved.
I too have this issue. It used to work fine, now I get this every time I attempt to cast from an automation.
Same issue here! can't wait for a fix
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:
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?
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
Same here, it works after the pre-authorise step and otherwise it fails
same issue for me also.
not working
Same here. Weird bug.
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
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.
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.
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"
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!
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).
Same problem! Thanks
I have the same issue, unfortunately.
Same issue here.. I resolved using the automation with view_path: "5" (you need to replace the number with your desidered view)
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.
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"
I am having the same issues as everyone else! Would love to see this fixed! Cheers š
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.
@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.
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._
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...
Is this a problem even if you run nabucasa?
Im not using nabucasa and i face the same issues as above.
Same problem!!
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???
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.
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
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
Connectedat the bottom, then when any other View is cast (to the already connected device), underneathConnectedI getError: Unable to find a view with path <valid Lovelace View path>.The previous issues occur when using the
show_lovelace_viewservice from my HA instance, however when trying from cast.home-assistant.io casting is successful, but underPICK A VIEWthe only option provided isHome, which displays the old (depreciated?), States UI View.
Note: Attempting to cast the ViewHomeusing theshow_lovelace_viewservice also fails.
Same issue here. Worked fine in 105.
This should be fixed now, please clear the cache of cast.home-assistant.io
still not working for me
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
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.
@bramkragten still not working after deleting cache. I don't get an error anymore - the screen just goes white instead.
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 .
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.
Works fine for me now š
I have cleared the cache multiple times, tried in different browsers but I still have the classic unable to find a view error....
@m4rk89 Try restarting Home Assistant.
@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
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.
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
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.

Doesn't work either
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.
Are y'all retrying a few times to establish the initial connection?
Even when casting is 'working' for me, several retries are often needed initially. Sometimes I just get the white/logo screen with connected, sometimes I get the Unable to find a view with path ... error, and sometimes the View I cast appears. Typically within 5 attempts I get a successful cast, but not always. This has been the case from the very beginning for me (maybe trouble authenticating?).
However, _after_ the initial retries with my initial View successfully cast, any/all other Views are successfully cast as quickly as I can select them (either via cast.home-assistant.io or the cast.show_lovelace_view service), navigation from the hub touchscreen is responsive, and the connection remains active and stable for days at a time. So this is what I'm referring to as 'working'.
I wouldnāt classify that as āworkingā in that case. A lot of the usefulness comes from being able to automate casting, so having to retry multiple times isnāt terrible useful.
Iāve generally had luck with the cast site, but the service is very unpredictable.
@BenWoodford How would you classify the ability to cast after a few retries as opposed to being unable to cast at all?
I have retries automated through Node-Red using node-red-contrib-cast. Setting msg.status to true should return msg.payload.applications[0].statusText containing the title that's configured in ui-lovelace.yaml. If it doesn't, I have it retry every 5 seconds with a 21 second timeout.
I had video feeds from my cameras automagically casting long before casting Lovelace Views was an option, and the ~5 second inherent delay in establishing cast sessions (even with no retries) was too long to be very useful for me (whatever had triggered the camera was usually gone). By establishing a casting session ahead of time, the Views with my camera feeds appear instantly when motion is detected. So having an _initial_ delay of up to 21 seconds with every camera feed being instant is far superior to having a ~5 second delay for _every_ camera feed, IMHO.
Just throwing it in there that I have the same issue. Around the time 106.2 was released casting broke for me entirely. Until that point I had been using a startup automation to start casting. Around a week after 106.2 was released (106.4 or .5 had been released by then from memory) casting worked again as normal for 2 or 3 days. After that it broke again and has been at least partially broken since.
Around 107.x I found I can cast if I log into cast.home-assistant.io and as others have stated, basically 'pre-authenticate' my device. After doing this I can then change cast views via the HA Dev Tools. Since a reboot breaks this I can't have casting automated at startup however. I've also noticed different behaviour from trying to cast from my startup automation and the dev console.
Quick summary of the behaviour is
My other observation is that while I said the issues occurred around the time 106.2 was released, I don't believe I did any upgrade the moment I had it working for those 3 days or so and certainly didn't upgrade when it broke the second time. To me it seems like there's a cloud service failure somewhere for certain scenarios, scenarios that using cast.home-asssitant.io doesn't trigger but automations and service calls do.
- From the dev tools, services page, if I manually call cast either I get a view where all my custom cards are broken (non custom ones work)
Not sure if this is relevant to your case but I also had some custom cards broken while casting.
It turned out that these cards had resource type JavaScript File (Deprecated) or something like that (type: js in raw config). Changing it to JavaScript Module (type: module) resolved the issue completely for me.
Hello @bramkragten , I just wanted to confirm if you believe this issue is still open/active and is clear enough for you? I am still having similar symptoms to the OP. I can provide more details if required. Thank you.
I'm having issues with casting to Google Nest Hub. First time I call the service the HA screen shows up and says 'Connected', but lovelace doesn't come up. I have to call the service again (some times several times) until it shows the dashboard.
I would really like to know what's happening with this as well.
Thanks @bramkragten for your work.
I had this working mostly, then not. I've never used the cast.home-assistant URL.
I changed from using the http SSL to using NGINX as a reverse proxy to serve the SSL via my duckdns.org domain (internal_url is now the IP via http), and casting and TTS to my Google Home Hub worked great!
A day or two later and it stopped. The best I can do is the ā¤ļø screen and the error that's the title of this issue.
Google Assistant and Google TTS work fine.
I'm running 0.110.4 via venv on Raspbian.
Interesting points:
I CAN cast the 'default_view' it seems. It doesn't look like my normal lovelace default_view and seems to have every entity on it.
I was also able to get Rick Rolled by playing the youtube clip in the docs using the service: media_player.play_media and media_content_type: cast.
Why aren't the 'normal' views able to be found?
...
After lots of tries and tests, I called the service again with a normal view and it worked. I imagine it will stop working again soon, since I'm doing nothing different than when it didn't work a few minutes ago.
Any updates? Thanks!
This is hard to debug as I have to be able to reproduce it and it is kinda hit and miss with no clear sign what the problem could be.
I will look into it shortly.
Thanks! That's what I hear on the forums and discord as well - people say it works x% of the time (x < 100). I tried again this morning and got 3 different experiences when trying to cast:
default_view but it's the auto-generated one (no other views work)I tried this a few times every day for the last week and am getting the same issue 100% of the time:
Can this perhaps be caused by a timeout between the app and my HA instance? This is assuming the hub loads the view via the hosted app, and it's not a direct connection between the hub and my HA.
@bramkragten - What do you think it means that I get a different view for default_view when I cast it?
This morning I cast two custom views I've made with YAML and got the usual "unable to find error" (but it did respond first go).
Then when I cast default_view, I got what I think is the auto-generated, everything-on-one-page view.
@NeilDuToit92 - is this the same for you? Is your default_view specified with YAML and/or does it match your normal UI?
Does this say something about where/how it's looking for views? If it only finds the one with the default name and it's not one of my actual views?
@lindsaymarkward default_view displays the auto generated page for me as well. I can't get it to display any other page 99% of the time.
view_paths 'home' and 'dashboard' doesn't work, but 'default_view' shows the auto generate mess of things.
cards:
- name: Show Home on Hub
tap_action:
action: call-service
service: cast.show_lovelace_view
service_data:
entity_id: media_player.living_room_display
view_path: home
theme: default
type: button
- name: Show Dashboard on Hub
tap_action:
action: call-service
service: cast.show_lovelace_view
service_data:
entity_id: media_player.living_room_display
view_path: dashboard
theme: default
type: button
- name: Stop cast
tap_action:
action: call-service
service: media_player.turn_off
service_data:
entity_id: media_player.living_room_display
theme: default
type: button
entity: media_player.living_room_display
show_icon: false
show_name: true
- name: Show Default View on Hub
tap_action:
action: call-service
service: cast.show_lovelace_view
service_data:
entity_id: media_player.living_room_display
view_path: default_view
theme: default
type: button
And in case anyone asks, I do have the paths set up for 'home' and 'dashboard':
...
path: home
title: Home
...
path: dashboard
title: dashboard
...
@NeilDuToit92 you might want to try the Lovelace Cast row instead of the service call if you don't use it in automation.
@bramkragten doesn't that require using Chrome on a desktop? The service call can be triggered by a mobile device or Firefox, etc.
@NeilDuToit92 you might want to try the Lovelace Cast row instead of the service call if you don't use it in automation.
I want to use it in an automation, basically have zigbee button next to the Nest Hub to trigger the HA cast to it. So it's a service call on the button so I can test it before building the automation
The process described here https://community.home-assistant.io/t/google-cast-error-unable-to-find-a-view-with-path-xxxx/138180/92 has yielded a 100% success rate for me.
It's not perfect as it still renders an error message until the second command is called five seconds later. Hopefully it might provide some clues as to the cause of the underlying issue.
Thanks @WhimsySpoon, that might help.
Mine seems to have taken a step backwards when testing today (was a bit excited about @WhimsySpoon 's work-around). I can't even get past the 'unable to connect to websocket API' error (rather than the 'Unable to find a view with path [X]' error). Can cast from https://cast.home-assistant.io though.
The user radar posted a solution on the thread linked above I removed the 5s delay he had in there and it it seems to be working for me.
- entity_id: input_boolean.test
platform: state
to: 'on'
action:
- data:
entity_id: media_player.nest_hub
service: media_player.turn_off
- delay: "00:00:01"
- data:
entity_id: media_player.nest_hub
service: media_player.turn_on
- data:
entity_id: media_player.nest_hub
view_path: test
service: cast.show_lovelace_view
- data:
dashboard_path: lovelace
entity_id: media_player.nest_hub
view_path: test
service: cast.show_lovelace_view
@bramkragten if this does continue to work for me over the next 2-3 days I will update this thread. Hopefully more users can test and see if this works.
@NeilDuToit92 can confirm that this is working for me aswell! Nice catch!
Okay, so I have found a scenario where my previous post didn't work.
When you ask the hub to play a YouTube video, then tell HA to cast, it didn't always show, updated config to add a delay and a second cast action which seems to fix it 99% of the time.
- id: cast-test
alias: Test Nest Hub
trigger:
- entity_id: input_boolean.cast_dashboard
platform: state
to: 'on'
action:
- data:
entity_id: media_player.living_room_display
service: media_player.turn_off
- delay: 00:00:01
- data:
entity_id: media_player.living_room_display
service: media_player.turn_on
- data:
entity_id: media_player.living_room_display
view_path: dashboard
service: cast.show_lovelace_view
- delay: 00:00:05
- data:
dashboard_path: lovelace
entity_id: media_player.living_room_display
view_path: dashboard
service: cast.show_lovelace_view
- entity_id: input_boolean.cast_dashboard
service: homeassistant.turn_off
Without making any changes to my automation, it has stopped working again.
Here's a new experience to add.
Today, I tested one of my scripts that shows a view on the home hub and it worked :) ...
but I got the error:
Custom element doesn't exist: button-card
So, it displays the stock UI elements OK (e.g. a switch), but not the custom resource one.
It works fine on my web and iOS view.
I see this has happened before: https://community.home-assistant.io/t/custom-element-doesnt-exist-but-only-when-casting/140458
All of my custom cards are up to date, and I'm on HA 0.112
Here's a new experience to add.
Today, I tested one of my scripts that shows a view on the home hub and it worked :) ...
but I got the error:Custom element doesn't exist: button-cardSo, it displays the stock UI elements OK (e.g. a switch), but not the custom resource one.
It works fine on my web and iOS view.
I see this has happened before: https://community.home-assistant.io/t/custom-element-doesnt-exist-but-only-when-casting/140458
All of my custom cards are up to date, and I'm on HA 0.112
Oh I can confirm that. It happened to me just a couple of months ago in a very random manner but currently (starting from 0.111 or 0.110, I guess) it happens every time.
Same here, docker , ngix proxy, hacs install for custom cards. Custom cards work through the browser from remote url and local url, so I guess the path is accessible. This has been haunting me occasionally prior to 0.110, but now itās persistently failing.
Hi @bramkragten and others. Is there anything we/I can do to help with this?
I have a few automations I'm really keen to get working, but this is still "unable".
@lindsaymarkward, it seems like people are having more success using 'catt' to cast their lovelace dashboards. I haven't tried it myself, but it looks promising. At least until the cast component is eventually fixed it may be a good alternative.
I see that some new work has been done for casting and stream in 0.115.6. Is there any chance that any of this helps get us closer to showing HA views on via cast?
Thanks @bramkragten :)
We are working on some things yeah, and that also includes fixing this issue.
Most helpful comment
This is hard to debug as I have to be able to reproduce it and it is kinda hit and miss with no clear sign what the problem could be.
I will look into it shortly.