[Bug]: Downloads fail with "Got more than 8190 bytes when reading" due to GitHub's new 9KB+ CSP header on release redirects
System Health details
System Information
| Key | Value |
|---|---|
| Home Assistant Core | 2026.10.2 |
| Home Assistant Supervisor | 2026.10.3 |
| Home Assistant OS | 18.3 |
| HACS | 2.0.5 |
| Frontend | 20261001.0 |
Checklist
- [x] I'm running the newest version of HACS https://github.com/hacs/integration/releases/latest
- [x] I have enabled debug logging for my installation.
- [x] I have filled out the issue template to the best of my ability.
- [x] I have read https://hacs.xyz/docs/help/issues/
- [x] This issue is related to the backend (integration part) of HACS.
- [x] This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
- [x] This is a bug and not a feature request.
- [x] This issue is not a duplicate issue of currently open or issues pending release.
Describe the issue
Summary
Root Cause Analysis (RCA)
Primary Cause: Upstream change by GitHub on their edge proxies / release endpoints.
Mechanism: GitHub recently updated their global edge headers, inflating the Content-Security-Policy (CSP) header on release download redirects (https://github.com/<owner>/<repo>/releases/download/...) to 9,217 bytes.
The Failure:
- HACS requests a release asset from GitHub via Python's
aiohttpclient. - GitHub responds with an HTTP
302 Foundredirect pointing torelease-assets.githubusercontent.com. - Attached to this 302 response is the inflated 9,217-byte
Content-Security-Policyheader line. aiohttpenforces a strict, hardcoded default single-line buffer limit of 8,190 bytes (max_line_size = 8190).- Because GitHub's CSP header exceeds this limit by over 1 KB,
aiohttpaborts the connection at the HTTP parser stage before the redirect can be followed, throwing:custom_components.hacs: Download failed - 400, message='Got more than 8190 bytes when reading: b"default-src \'none\'; base-uri \'self\'; child-src github.githubassets.com..."'
All HACS package downloads of GitHub release assets (archives, frontend cards, zip bundles) currently fail with an HTTP 400 ClientResponseError: Got more than 8190 bytes when reading....
This is caused by GitHub's edge proxies returning an oversized Content-Security-Policy header (~9,217 bytes) on HTTP 302 redirect responses from https://github.com/<owner>/<repo>/releases/download/....
Because aiohttp.ClientSession defaults to max_line_size = 8190, the response parser aborts before following the redirect to release-assets.githubusercontent.com or codeload.github.com.
Environment
- Home Assistant Version: 2026.10.x
- HACS Version: 2.0.x
- Affected Repositories: Any integration or frontend card distributing release assets via GitHub Releases (e.g.,
Clooos/Bubble-Card,rroller/dahua)
Error Trace in Home Assistant System Logs
custom_components.hacs: Download failed - 400, message='Got more than 8190 bytes when reading: b"default-src \'none\'; base-uri \'self\'; child-src github.githubassets.com github.com/assets-cdn/worker/...\".', url='https://github.com/Clooos/Bubble-Card/releases/download/v3.4.2/bubble-card.js'
### Reproduction steps
1. Attempt to install or update any HACS component that downloads release assets from GitHub (e.g. Clooos/Bubble-Card v3.4.2 or rroller/dahua 1.3.1).
2. The download immediately fails with error 400.
3. System log records: `Download failed - 400, message='Got more than 8190 bytes when reading: b"default-src \'none\'; base-uri \'self\'..."'`
Can be reproduced directly in Python:
```python
import aiohttp, asyncio
# Fails with 400: Got more than 8190 bytes
async def test():
async with aiohttp.ClientSession() as s:
await s.get('https://github.com/Clooos/Bubble-Card/releases/download/v3.4.2/bubble-card.js')
# Succeeds with 200 OK
async def test_fixed():
async with aiohttp.ClientSession(max_line_size=65536, max_field_size=65536) as s:
resp = await s.get('https://github.com/Clooos/Bubble-Card/releases/download/v3.4.2/bubble-card.js')
print(resp.status)
### Debug logs
```text
Download failed - 400, message='Got more than 8190 bytes when reading: b"default-src \'none\'; base-uri \'self\'; child-src github.githubassets.com github.com/assets-cdn/worker/...\".', url='https://github.com/Clooos/Bubble-Card/releases/download/v3.4.2/bubble-card.js'
Diagnostics dump
7. Diagnostics dump
(Note: HACS requires text in this field or the form won't submit. Paste this into the box:)
Home Assistant 2026.10.2
HACS 2.0.5
aiohttp default max_line_size: 8190
GitHub redirect response Content-Security-Policy length: 9,217 bytes
Also experiencing this issue.
same for me ! Here is the log !
This log entry is from a custom integration.
Logger: custom_components.hacs Source: custom_components/hacs/websocket/repository.py:242 Integration: HACS (documentation, issues) First occurred: 23:35:22 (4 occurrences) Last logged: 23:40:27
<Plugin piitaya/lovelace-mushroom> Downloading piitaya/lovelace-mushroom with version v5.2.3 failed with (Could not download, see log for details) <Plugin piitaya/lovelace-mushroom> Downloading piitaya/lovelace-mushroom with version v5.2.2 failed with (Could not download, see log for details)
Same here — HA 2026.10.2, HACS 2.0.5. Reproduced with dbuezas/lovelace-plotly-graph-card v4.0.2 (104 release assets, all failing).
Header lengths from the GitHub 302 response, served from a different edge region:
12: HTTP/2 302
919: location: https://release-assets.githubu...
9243: content-security-policy: default-src 'no...
39: x-github-edge-region: switzerlandnorth
Confirmed workaround: patching async_download_file in custom_components/hacs/base.py (line ~699) to use a dedicated session works. After a restart, all 104 assets downloaded normally:
if getattr(self, "_dl_session", None) is None:
self._dl_session = ClientSession(max_field_size=32768)
request = await self._dl_session.get(
url=url,
timeout=ClientTimeout(total=60),
headers=headers,
)
Note: the traceback is raised from cb_on_header_value against _max_field_size, so raising max_field_size alone is enough; max_line_size isn't needed.
Same here, custom integration funkadelic/ha-acwd v1.2.0 (zip_release: true). Older release assets of the same repo (v1.1.1) get the same 9243-byte content-security-policy header on the 302, so it's not release-specific.
Logger: custom_components.hacs
Source: custom_components/hacs/base.py:699
First occurred: 14:54:36 (2 occurrences)
Last logged: 14:54:50
Download failed - 400, message='Got more than 8190 bytes when reading: b"default-src \'none\'; base-uri \'self\'; child-src github.githubassets.com github.com/assets-cdn/worker/...".', url='https://github.com/funkadelic/ha-acwd/releases/download/v1.2.0/acwd.zip'
Traceback (most recent call last):
File "/usr/local/lib/python3.14/site-packages/aiohttp/client_proto.py", line 359, in data_received
messages, upgraded, tail = self._parser.feed_data(data)
File "aiohttp/_http_parser.pyx", line 925, in aiohttp._http_parser.cb_on_header_value
raise LineTooLong(value[:100] + b"...", pyparser._max_field_size)
aiohttp.http_exceptions.LineTooLong: 400, message:
Got more than 8190 bytes when reading: b"default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/..."
...
File "/config/custom_components/hacs/base.py", line 699, in async_download_file
request = await self.session.get(
...
aiohttp.client_exceptions.ClientResponseError: 400, message='Got more than 8190 bytes when reading: ...', url='https://github.com/funkadelic/ha-acwd/releases/download/v1.2.0/acwd.zip'
Logger: custom_components.hacs
Source: custom_components/hacs/repositories/base.py:979
<Integration funkadelic/ha-acwd> Failed to download https://github.com/funkadelic/ha-acwd/releases/download/tags/v1.2.0/acwd.zip
same versions of HA and HACS as @THE-KINGDOM
Same here:
Issue Summary: Following an update attempt via HACS, two integrations (BavarianData and Alexa Media Player) encountered download failures and are no longer working.
Current Behavior: Initiating the update button for both integrations resulted in a download error. Other integrations installed through HACS without pending updates continue to function normally.
Log details (ERROR)
This log entry is from HACS, a custom integration. If you think it indicates a bug, you can report it on its issue tracker. Logger: custom_components.hacs Source: custom_components/hacs/base.py:699 Integration: HACS (documentation, issues) First occurred: 23:58:54 (1 occurrence) Last logged: 23:58:54
Download failed - 400, message='Got more than 8190 bytes when reading: b"default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/...".', url='https://github.com/alandtse/alexa_media_player/releases/download/v5.18.0/alexa_media.zip' Traceback (most recent call last): File "/usr/local/lib/python3.14/site-packages/aiohttp/client_proto.py", line 359, in data_received messages, upgraded, tail = self._parser.feed_data(data) ~~~~~~~~~~~~~~~~~~~~~~^^^^^^ File "aiohttp/_http_parser.pyx", line 723, in aiohttp._http_parser.HttpParser.feed_data File "aiohttp/_http_parser.pyx", line 925, in aiohttp._http_parser.cb_on_header_value raise LineTooLong(value[:100] + b"...", pyparser._max_field_size) aiohttp.http_exceptions.LineTooLong: 400, message: Got more than 8190 bytes when reading: b"default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/...".
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/local/lib/python3.14/site-packages/aiohttp/client_reqrep.py", line 745, in start message, payload = await protocol.read() # type: ignore[union-attr] ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.14/site-packages/aiohttp/streams.py", line 716, in read await self._waiter aiohttp.http_exceptions.HttpProcessingError: 400, message: Got more than 8190 bytes when reading: b"default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/...".
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/config/custom_components/hacs/base.py", line 699, in async_download_file request = await self.session.get( ^^^^^^^^^^^^^^^^^^^^^^^ ...<3 lines>... ) ^ File "/usr/local/lib/python3.14/site-packages/aiohttp/client.py", line 900, in _request resp = await handler(req) ^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.14/site-packages/aiohttp/client_middlewares.py", line 36, in single_middleware_handler return await middleware(req, handler) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/aiohttp_client.py", line 70, in _ssrf_redirect_middleware resp = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.14/site-packages/aiohttp/client.py", line 878, in _connect_and_send_request await resp.start(conn) File "/usr/local/lib/python3.14/site-packages/aiohttp/client_reqrep.py", line 747, in start raise ClientResponseError( ...<5 lines>... ) from exc aiohttp.client_exceptions.ClientResponseError: 400, message='Got more than 8190 bytes when reading: b"default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/...".', url='https://github.com/alandtse/alexa_media_player/releases/download/v5.18.0/alexa_media.zip'
Proposed fix in #5644: set a bounded 64 KiB max_field_size on HACS file-download requests, using the existing Home Assistant session.
The PR includes six regression cases with aiohttp's real parser, covering direct responses and redirects. I also reproduced the default-limit failure on the Alexa Media Player v5.18.0 release download and verified that the adjusted limit downloads the archive with the published SHA-256 checksum.
A fix release (for example PR 5644) has the same problem on installs that do not have the fix yet. HACS updates itself from https://github.com/hacs/integration/releases/download/<version>/hacs.zip, and that download fails with the same error.
The get.hacs.xyz install script is not affected. It downloads hacs.zip with wget, and wget accepts the large header. I tested the download step with BusyBox wget 1.37.0 (as in the Home Assistant container image) and GNU Wget 1.25.0. Both got the full hacs.zip.
Also, aiohttp 3.9.3 accepts the per-request max_field_size argument that PR 5644 uses. Home Assistant 2024.4.1, the minimum in hacs.json, uses that aiohttp version.
Same failure here, and I can confirm the one-line fix from #5644 works.
Setup: HAOS on an Intel N100, Core 2026.10.2, HACS 2.0.5 (aiohttp 3.14.5).
Failing download: wuwentao/midea_ac_lan v2026.10.0 (zip release). 7 attempts between 23:22 and 00:19 CEST, all failing with Got more than 8190 bytes when reading: b"default-src 'none'; ....
Measurement: curl -D - -o /dev/null https://github.com/wuwentao/midea_ac_lan/releases/download/v2026.10.0/midea_ac_lan.zip returns HTTP/2 302 with a content-security-policy header of 9243 bytes (edge region fra). The asset itself is fine (274 KB, state: uploaded in the API).
Fix test: added max_field_size=64 * 1024 to the session.get(...) call in async_download_file (custom_components/hacs/base.py, exactly as in #5644) and restarted HA: the update downloaded and installed on the first try, nothing else changed. That session.get is the only download path in base.py, so it covers zip releases and single-file downloads alike.
Thank you rfoust, the fix worked for me.
Since HACS itself can't be updated right now, will we need to manually update HACS by downloading the files and placing them directly into Home Assistant, even after a fix is released?
17. Since HACS itself can't be updated right now, will we need to manually update HACS by downloading the files and placing them directly into Home Assistant, even after a fix is released?
Or you could run the install script through the terminal app in HA. Just applying the fix also worked for me though, so if you want a quick fix i would do that
I can confirm that the same aiohttp.exceptions.LineTooLong issue also affects the initial HACS setup / GitHub device authorization flow, not just component downloads.
Environment:
- Home Assistant Core: 2026.10.3
- Home Assistant OS: 18.3
- HACS: 2.0.5
When attempting to configure HACS, the request to https://github.com/login/device/code fails with:
Got more than 8190 bytes when reading
The HACS configuration flow then displays cloud_not_register.
I also tested the same endpoint using curl directly from the Home Assistant terminal. It returned HTTP/2 200 OK, including the oversized Content-Security-Policy header.
This means the issue also prevents new users from completing HACS installation, since the GitHub authorization code is never displayed.
+1 same issue here. Just reinstalled HA and can no longer setup HACS
+1 Experiencing this issue as well
I can no longer download anything from the store.
Installationstyp | Home Assistant OS Entwicklung | false Supervisor | true Docker | true Container-Architektur | amd64 Benutzer | root Virtuelle Umgebung | false Python-Version | 3.14.6 Betriebssystem-Familie | Linux Betriebssystem-Version | 6.18.52-haos CPU-Architektur | x86_64
HACS GitHub API Calls Remaining | 4952 Installed Version | 2.0.6-dev-b3bce77 Stage | running Available Repositories | 5063 Downloaded Repositories | 28
Dieser Protokolleintrag stammt von einer benutzerdefinierten Integration.
Logger: custom_components.hacs Quelle: custom_components/hacs/base.py:691 Integration: HACS (Dokumentation, Probleme) Erstmals aufgetreten: 02:10:00 (845 Vorkommnisse) Zuletzt protokolliert: 02:25:14
Download failed - 400, message='Got more than 8190 bytes when reading: b"default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/...".', url='https://github.com/pkissling/clock-weather-card/releases/download/v3.0.0-beta.5/wind-alert-DK25X7VV.svg' Download failed - 400, message='Got more than 8190 bytes when reading: b"default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/...".', url='https://github.com/pkissling/clock-weather-card/releases/download/v3.0.0-beta.5/wind-DKBU3uOC.svg' Download failed - 400, message='Got more than 8190 bytes when reading: b"default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/...".', url='https://github.com/pkissling/clock-weather-card/releases/download/v3.0.0-beta.5/wind-BmvJoCwv.svg' Download failed - 400, message='Got more than 8190 bytes when reading: b"default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/...".', url='https://github.com/pkissling/clock-weather-card/releases/download/v3.0.0-beta.5/wind-CuuJYGe_.svg' Download failed - 400, message='Got more than 8190 bytes when reading: b"default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/...".', url='https://github.com/pkissling/clock-weather-card/releases/download/v3.0.0-beta.5/wind-m9RV3nT4.svg' Traceback (most recent call last): File "/usr/local/lib/python3.14/site-packages/aiohttp/client_proto.py", line 359, in data_received messages, upgraded, tail = self._parser.feed_data(data) ~~~~~~~~~~~~~~~~~~~~~~^^^^^^ File "aiohttp/_http_parser.pyx", line 723, in aiohttp._http_parser.HttpParser.feed_data File "aiohttp/_http_parser.pyx", line 925, in aiohttp._http_parser.cb_on_header_value raise LineTooLong(value[:100] + b"...", pyparser._max_field_size) aiohttp.http_exceptions.LineTooLong: 400, message: Got more than 8190 bytes when reading: b"default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/...".
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/local/lib/python3.14/site-packages/aiohttp/client_reqrep.py", line 745, in start message, payload = await protocol.read() # type: ignore[union-attr] ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.14/site-packages/aiohttp/streams.py", line 716, in read await self._waiter aiohttp.http_exceptions.HttpProcessingError: 400, message: Got more than 8190 bytes when reading: b"default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/...".
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/config/custom_components/hacs/base.py", line 691, in async_download_file request = await self.session.get( ^^^^^^^^^^^^^^^^^^^^^^^ ...<3 lines>... ) ^ File "/usr/local/lib/python3.14/site-packages/aiohttp/client.py", line 900, in _request resp = await handler(req) ^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.14/site-packages/aiohttp/client_middlewares.py", line 36, in single_middleware_handler return await middleware(req, handler) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/aiohttp_client.py", line 70, in _ssrf_redirect_middleware resp = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.14/site-packages/aiohttp/client.py", line 878, in _connect_and_send_request await resp.start(conn) File "/usr/local/lib/python3.14/site-packages/aiohttp/client_reqrep.py", line 747, in start raise ClientResponseError( ...<5 lines>... ) from exc aiohttp.client_exceptions.ClientResponseError: 400, message='Got more than 8190 bytes when reading: b"default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/...".', url='https://github.com/pkissling/clock-weather-card/releases/download/v3.0.0-beta.5/clear-night-8HzEXXT7.svg'
Dieser Protokolleintrag stammt von einer benutzerdefinierten Integration.
Logger: custom_components.hacs Quelle: custom_components/hacs/repositories/base.py:976 Integration: HACS (Dokumentation, Probleme) Erstmals aufgetreten: 02:10:21 (845 Vorkommnisse) Zuletzt protokolliert: 02:25:15
<Plugin pkissling/clock-weather-card> [wind-alert-DK25X7VV.svg] was not downloaded. <Plugin pkissling/clock-weather-card> [wind-DKBU3uOC.svg] was not downloaded. <Plugin pkissling/clock-weather-card> [wind-BmvJoCwv.svg] was not downloaded. <Plugin pkissling/clock-weather-card> [wind-CuuJYGe_.svg] was not downloaded. <Plugin pkissling/clock-weather-card> [wind-m9RV3nT4.svg] was not downloaded.
Same here, won't share logs as seems problem well known. Guess wait for a change?
Not just HACS, OS updates too.
AI says it's a HA aiohttp issue.
GitHub recently updated its Content Security Policy (CSP) headers, making them over 9KB on release download redirects. Because Home Assistant OS updates, Supervisor updates, and HACS components all rely heavily on pulling direct release files from GitHub, aiohttp’s rigid 8KB default buffer completely chokes and crashes the download stream across your entire system.
I can confirm a very similar issue on an existing HACS installation.
Environment:
- Home Assistant Core 2026.10.3
- Home Assistant OS 18.3
- Python 3.14.9
- HACS 2.0.5
Unlike the original report, HACS is already configured and running successfully. However, downloading updates for two unrelated repositories fails:
- "elax46/custom-brand-icons" (2026.10.2)
- "alandtse/alexa_media_player" (v5.18.0)
Both fail with:
aiohttp.http_exceptions.LineTooLong: Got more than 8190 bytes when reading: b"default-src 'none'; base-uri 'self'; child-src github.githubassets.com ..."
Additional diagnostics:
- GitHub API: OK
- GitHub Content: OK
- GitHub Web: unreachable
- Measured GitHub Content-Security-Policy header: 9,464 bytes
- Direct download of the Custom Brand Icons release asset using curl: HTTP 200
- HACS debug logging reproduces the same error during the update process.
This suggests that the oversized GitHub response header affects not only initial HACS authentication, but also GitHub release asset downloads in existing HACS installations.
Also getting this issue. Unable to update Alexa Media Player.
1 line fix from https://github.com/hacs/integration/pull/5644 that @rodylog mentioned worked for me, I can update again