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

Home Assistant pages fail to load due to CORS policy / security errors #19911

Open
3 of 4 tasks
mprobst opened this issue Feb 28, 2024 · 1 comment
Open
3 of 4 tasks

Comments

@mprobst
Copy link

mprobst commented Feb 28, 2024

Checklist

  • I have updated to the latest available Home Assistant version.
  • I have cleared the cache of my browser.
  • I have tried a different browser to see if it is related to my browser.
  • I have tried reproducing the issue in safe mode to rule out problems with unsupported custom resources.

Describe the issue you are experiencing

Various sub-pages in Home Assistant fail to load on my installation. It appears that some CORS header isn't set correctly in the server response when dynamically loading additional JavaScript snippets.

Screenshot 2024-02-28 200921

Note the log entries:

Access to script at 'http://lokalhorst:8123/frontend_latest/44356.ka0DMKv3Wu4.js' from origin 'http://lokalhorst:8123' has been blocked by CORS policy: The request client is not a secure context and the resource is in more-private address space `private`.
44356.ka0DMKv3Wu4.js:1 
Failed to load resource: net::ERR_FAILED

This happens in latest Chrome (121.0.6167.185), but not (yet?) in latest Firefox (123.0).

Describe the behavior you expected

Should load the pages on navigation.

Steps to reproduce the issue

  1. Clear all browser caches.
  2. Navigate to my Home Assistant (http://lokalhorst:8123, i.e. non-SSL, using a hostname. Not sure if that's required)
  3. Navigate to a sub-page, e.g. media or energy
  4. Observe the failure

Strangely enough this appears to only happen on first attempt (and then persistently), but when I close the tab and try again, things work. Maybe there's some caching effect?

What version of Home Assistant Core has the issue?

core-2024.2.4

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

Google Chrome 121.0.6167.185

Which operating system are you using to run this browser?

Windows 11

State of relevant entities

No response

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

@WarMasterNL
Copy link

I have the same issue with increasing frequency. Weirdly not so many people with the same issue it seems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants