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

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

Closed
OkhammahkO opened this issue Nov 23, 2019 · 104 comments
Closed

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

OkhammahkO opened this issue Nov 23, 2019 · 104 comments
Assignees
Labels
Cast Related to Home Assistant Cast UI

Comments

@OkhammahkO
Copy link

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
Copy link

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

@arnoldpistorius
Copy link

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
Copy link

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
Copy link

Same issue here! Works one time out of five.

@G0GUPA
Copy link

G0GUPA commented Nov 29, 2019

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

@WhimsySpoon
Copy link

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

@RDG88
Copy link

RDG88 commented Nov 30, 2019

Same issue here! can't wait for a fix

@mpfl
Copy link

mpfl commented Dec 3, 2019

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
Copy link

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
Copy link

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
Copy link

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

@daboshman
Copy link

same issue for me also.
not working

@michaudjp
Copy link

Same here. Weird bug.

@derrike
Copy link

derrike commented Dec 11, 2019

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
Copy link

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
Copy link

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
Copy link

derrike commented Dec 13, 2019

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
Copy link

codycodes commented Dec 24, 2019

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
Copy link

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
Copy link

Metus88 commented Jan 2, 2020

Same problem! Thanks

@sameeraman
Copy link

I have the same issue, unfortunately.

@CiquattroFPV
Copy link

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

@YoinkZed
Copy link

YoinkZed commented Jan 6, 2020

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
Copy link

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
Copy link

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

@zhaokoh
Copy link

zhaokoh commented Jan 26, 2020

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
Copy link
Author

@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.

@balloob balloob transferred this issue from home-assistant/core Jan 27, 2020
@jparthum
Copy link

jparthum commented Jan 28, 2020

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
Copy link

BenWoodford commented Feb 4, 2020

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...

@StefanoGiu
Copy link

Same issue

@lindsaymarkward
Copy link

I can confirm that nothing has changed for me - same problem.
Thanks in advance, @bramkragten :)

@ajitam
Copy link

ajitam commented Jan 20, 2021

After some time I tried this thing again and I found out something.

I might found i workaround.

This is the "payload" I'm sending

entity_id: media_player.living_room_tv
dashboard_path: lovelace
view_path: lr-tv-dashboard

By (just) sending this nothing happens, BUT if I send "wrong" payload (for example I write dashboard_path: lovelacex < x at the end) I get "nabu casa" screen with Unable to find a view with path lr-tv-dashboard and then I fix the dashboard_path and send it again - IT WORKS

@kind3r
Copy link

kind3r commented Jan 20, 2021

Try using this blueprint I made to also work around the issue that the hub stops the cast after 10 min : https://community.home-assistant.io/t/cast-and-re-cast-a-lovelace-view-to-a-google-hub/259631

@fgonza2
Copy link

fgonza2 commented Jan 20, 2021

After some time I tried this thing again and I found out something.

I might found i workaround.

This is the "payload" I'm sending

entity_id: media_player.living_room_tv
dashboard_path: lovelace
view_path: lr-tv-dashboard

By (just) sending this nothing happens, BUT if I send "wrong" payload (for example I write dashboard_path: lovelacex < x at the end) I get "nabu casa" screen with Unable to find a view with path lr-tv-dashboard and then I fix the dashboard_path and send it again - IT WORKS

yes, i found this too, that is a good workaround, for automations, it might work. The main issue i have right now is that custom cards don't work and you get a red square instead... why?

@kintaroju
Copy link

I'm also having the same issue too, with the latest HA install but using the OVA VM install with the HassOS.

@nschwing
Copy link

Can confirm that this issue is still present. The workaround from @ajitam works, thanks!

@kintaroju
Copy link

Yea, the workaround is the only way to be able to cast lovelace at the moment. But casting lovelace has some limitations too, eg some camera feeds can't be streamed, or some things with graphs won't/can't be shown.

@lindsaymarkward
Copy link

lindsaymarkward commented Apr 8, 2021

The recent 2021.4 update included: home-assistant/core#47232 (Add support for a list of known hosts to Google Cast). Does this help/affect this issue at all?
I realised from my comment a few weeks ago that I had neglected to update my external_url when it changed. Fixing this and I'm now back to this error here. I can (sometimes) cast with the workaround but it still doesn't show custom cards...

EDIT: I just found that a post in the forums from last August about manually adding duplicate resources with /local/community/ URLs allows me to see custom cards now!
https://community.home-assistant.io/t/custom-element-doesnt-exist-but-only-when-casting/140458/16
(or at least so far I have it working for some but not all custom cards)

Any hope of this being sorted out in the integration without workarounds @bramkragten ? Thanks!

@lindsaymarkward
Copy link

Each release, I check if casting works yet... but it still doesn't.
My previous workaround isn't even working.
Can we get some love for this @bramkragten and others?

@NeilDuToit92
Copy link

If it is too much of a struggle to get the current casting to work, it might even be worth it to look at CATT (Cast All The Things) and potentially pull that into HA core?
https://community.home-assistant.io/t/using-catt/130332

I have been using it as an add-on and it's been working without issues.

@fgonza2
Copy link

fgonza2 commented May 29, 2021

i gave up on casting, the lack of compatibility with the GUI and some lovelace cards + the complex DNS/SSL setup makes it a complicated effort and little value.

It is easier/cheaper to run an RPI in kiosk mode and connect to another HDMI input to TV

@brentk7
Copy link

brentk7 commented Jul 4, 2021

Also intermittently getting this error when casting to Nest Hub. Sometime it works, sometimes it gives the error.

@RyanEwen
Copy link

RyanEwen commented Aug 22, 2021

I believe the issue is that the desired dashboard/view is being loaded before nabu casa is REALLY ready to load it. My rationale is that an Entities card with a Cast entity in it works every time. When you use a Cast entity card, there's a delay between connecting and showing a dashboard/view, because you're required to first connect and then forced to wait before you can click Show.

Until this is fixed I am forced to do the workaround mentioned here. I'm using it in a script like so (note the x in the dashboard_path the first time:

alias: Cast Outside Cameras
mode: single
sequence:
  - service: media_player.turn_off
    target:
      entity_id: media_player.some_chromecast
  - delay:
      hours: 0
      minutes: 0
      seconds: 1
      milliseconds: 0
  - service: cast.show_lovelace_view
    data:
      entity_id: media_player.bedroom_chromecast
      dashboard_path: lovelacex
      view_path: camgrid
  - delay:
      hours: 0
      minutes: 0
      seconds: 5
      milliseconds: 0
  - service: cast.show_lovelace_view
    data:
      entity_id: media_player.bedroom_chromecast
      dashboard_path: lovelace
      view_path: camgrid

@github-actions
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Nov 20, 2021
@lindsaymarkward
Copy link

Every new version of HA, I give this a try. Usually it doesn't work. This time (.11), it worked - once! I was so excited... until it didn't work after the very first time.
Surely the fact that it sometimes works means there's something that can be done here? It would be really valuable for me and many people.
@bramkragten - are you still the right Nabu Casa person to ask to look at this? Thanks in advance.

@lindsaymarkward
Copy link

Thankfully, version 2021.12 seems to have solved this - I'm very happy!
Does it work for others too now? Any edge cases?
I do still have the Custom element doesn't exist problem, so not quite there yet...

@jtonk
Copy link

jtonk commented Jan 13, 2022

yes, for me casting now also works as well. I also suffered from the Custom element doesn't exist afterwards, but reinstalling the cards through HACS and a reboot of the hub solved it for most of them. I think it has to do with the ?hacstag=########## tag that needed a refresh. However I still have a couple of cards that I can't get play nice.

  • browser-mod
  • neerslag-card
  • mini-media-player (works, but doesn't show the artwork)
    other than that, I'm very happy that the timeout issue is solved.

curious to hear what solved the timeout issue and whether it can be solved for CATT as well.

@lindsaymarkward
Copy link

lindsaymarkward commented Jan 14, 2022

@jtonk - does "reinstalling through HACS" mean pressing "Redownload"?
That (including power cycling my Googe hub) didn't change anything for me.

I have some that work: button-card, mini-graph-card
and some that don't: valetudo-map-card, vacuum-card
Also, perhaps these details help debug the issue.
My button-card works with a timer icon, but when I try to use entity_picture, the image doesn't show. The same image shows if I use a normal picture card.
I also notice that my People images in badges don't show, but they do when I touch into them and see the details 🤷

@github-actions
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Apr 14, 2022
@lindsaymarkward
Copy link

lindsaymarkward commented Apr 18, 2022

I'm fairly sure this is all working now!
I haven't had time to update/create my automations, but the things that used to fail now end up showing a screen on the Google Display, so that's really good, thanks 👍

@RCourtenay
Copy link

It’s been working for me for I think 2 or 3 months now too. Can’t quite recall which release but probably Feb or March.

@github-actions github-actions bot removed the stale label Apr 18, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Apr 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Cast Related to Home Assistant Cast UI
Projects
None yet
Development

No branches or pull requests