Custom components and home assistant cast- Solved

Tags: #<Tag:0x00007f73994d33c0> #<Tag:0x00007f73994d31b8>

Hi, I’ve been using home assistant cast to show a lovelace dashboard on my nest hub. Previously i had no issues and the custom components that i used showed up fine. After updating from 110 to 111 the red boxed with “could not load …” appeared instead of the component. Using any of the built in components works fine still.
The issue have been persistent through version 111, 112 and now 113.
I have tried manually adding the required addresses to the cors configuration but that didn’t do anything. Also i have tried resetting the nest hub as i suspected the issue to be related to the nest hub.
Running on a pi4 with HassOS. Custom components are installed using HACS
Have anyone experienced anything similar and maybe have a fix?

Did you update all custom components and custom cards to the newest version?

Yes everything is updated to latest version.

Can you please show a screenshot of one of the errors?

I will once i get home.
In the meantime I found this image online showing the same error.

In case anyone stumbles across this issue with the same problem i managed to fix the problem. Apparently when installing components using hacs the resource is automatically added as
/hacsfiles/THEPLUGIN and this does not work when casting. So adding a second resource as
/local/community/THEPLUGIN fixes the issue.
As an example if using the mini-media-player the resouce
/hacsfiles/mini-media-player/mini-media-player-bundle.js
is added automatically. To use the plugin when casting the following resource
/local/community/mini-media-player/mini-media-player-bundle.js
also needs to be added.