HACS setup fails with could_not_register due to oversized GitHub response header
System Health details
System Information
| version | core-2026.10.3 |
|---|---|
| installation_type | Home Assistant OS |
| dev | false |
| hassio | true |
| docker | true |
| container_arch | amd64 |
| user | root |
| virtualenv | false |
| python_version | 3.14.9 |
| os_name | Linux |
| os_version | 6.18.52-haos |
| arch | x86_64 |
| timezone | America/Detroit |
| config_dir | /config |
Home Assistant Cloud
| logged_in | false |
|---|---|
| can_reach_cert_server | ok |
| can_reach_cloud_auth | ok |
| can_reach_cloud | ok |
Home Assistant Supervisor
| host_os | Home Assistant OS 18.3 |
|---|---|
| update_channel | stable |
| supervisor_version | supervisor-2026.10.3 |
| agent_version | 1.14.0 |
| docker_version | 29.7.2 |
| disk_total | 62.3 GB |
| disk_used | 13.2 GB |
| nameservers | 192.168.1.254 |
| healthy | true |
| supported | true |
| host_connectivity | true |
| supervisor_connectivity | true |
| ntp_synchronized | true |
| virtualization | kvm |
| board | ova |
| supervisor_api | ok |
| version_api | ok |
| installed_addons | ESPHome Device Builder (2026.10.0), Tailscale (0.30.4), Music Assistant (2.10.8), File editor (6.3.0), Terminal & SSH (10.5.0), Get HACS (1.3.1) |
Dashboards
| dashboards | 3 |
|---|---|
| resources | 0 |
| views | 1 |
| mode | storage |
Network Configuration
| adapters | lo (disabled), enp0s3 (enabled, default, auto), hassio (disabled), docker0 (disabled), tailscale0 (disabled), vethc4303e8 (disabled), veth74f79cc (disabled), veth4974898 (disabled), vethd914084 (disabled), vethba8935a (disabled), veth948e172 (disabled), veth29b6400 (disabled), veth5116db6 (disabled) |
|---|---|
| ipv4_addresses | lo (127.0.0.1/8), enp0s3 (192.168.1.142/24), hassio (172.30.32.1/23), docker0 (172.30.232.1/23), tailscale0 (100.115.40.29/32), vethc4303e8 (), veth74f79cc (), veth4974898 (), vethd914084 (), vethba8935a (), veth948e172 (), veth29b6400 (), veth5116db6 () |
| ipv6_addresses | lo (::1/128), enp0s3 (fe80::f749:6e66:855b:5edc/64), hassio (fd0c:ac1e:2100::1/48, fe80::88b8:eff:fe17:d5a9/64), docker0 (fdae:5433:15f5::1/64, fe80::9842:a7ff:fe84:6af6/64), tailscale0 (fd7a:115c:a1e0::2328:281e/128, fe80::ebcb:c62f:6cd1:d84a/64), vethc4303e8 (fe80::5429:51ff:fee8:b97d/64), veth74f79cc (fe80::b0d1:eff:fef3:8a06/64), veth4974898 (fe80::3436:67ff:fe8e:cba2/64), vethd914084 (fe80::40e:a6ff:fe5f:d8ae/64), vethba8935a (fe80::444f:98ff:feaa:5c32/64), veth948e172 (fe80::702d:6aff:fe2a:1f76/64), veth29b6400 (fe80::f464:dfff:fe68:a348/64), veth5116db6 (fe80::647b:a3ff:fed2:36ed/64) |
| announce_addresses | 192.168.1.142, fe80::f749:6e66:855b:5edc |
Recorder
| oldest_recorder_run | October 12, 2026 at 11:36 AM |
|---|---|
| current_recorder_run | October 23, 2026 at 8:12 PM |
| estimated_db_size | 89.60 MiB |
| database_engine | sqlite |
| database_version | 3.53.4 |
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
Environment
Home Assistant installation method: Home Assistant OS
Home Assistant Core: 2026.10.3
Home Assistant Supervisor: 2026.10.3
Home Assistant OS: 18.3
Home Assistant Frontend: 20260930.5
HACS: 2026.10.3
HACS installation method: Official Get HACS app/repository
Host environment: Home Assistant OS running in a VM on TrueNAS SCALE
Client: Google Pixel Slate running a Home Assistant kiosk
Local access URL: http://192.168.1.142:8123
Tailscale is installed on the Home Assistant VM, but the failed setup was performed through the local LAN address.
Problem
HACS installs successfully, but its initial configuration fails when I select Settings → Devices & services → Add integration → HACS, acknowledge the four warnings, and submit.
The integration setup fails with:
could_not_register
The Home Assistant logs show that HACS's request to GitHub's device-code registration endpoint fails because an HTTP response header exceeds 8,190 bytes.
Expected behavior
HACS should successfully initiate GitHub device-code authentication and allow me to complete the initial integration setup.
Actual behavior
HACS fails during device-code registration with could_not_register. Its HTTP client reports that it received more than 8,190 bytes while reading the response, and the error includes the beginning of GitHub's Content-Security-Policy header.
A direct curl request to the same endpoint from Home Assistant OS succeeds with HTTP 200 and JSON, but the response includes a 9,243-character Content-Security-Policy header.
Additional information
My GitHub email address is verified.
The HACS download and installation completed successfully.
I restarted Home Assistant before configuring HACS.
I access Home Assistant locally from my Pixel Slate kiosk using 192.xxx.xxx.xxx:8123.
Tailscale is installed on the Home Assistant VM, but I was not using a Tailscale URL or remote-access route for this attempt.
I have not modified Home Assistant's Python packages, HACS source code, or HTTP client limits.
Questions
Is this a known compatibility issue between HACS's HTTP client and GitHub's current Content-Security-Policy response header size?
Is there a supported workaround or fix for HACS 2026.10.3 on Home Assistant Core 2026.10.3?
Should the HTTP client used by HACS be configured to accept larger response headers, or is GitHub returning an unexpected response for this device-code request?
One technical detail worth preserving: the curl test returned HTTP 200, but the HACS exception reports a 400 in its error message. That discrepancy is important for the maintainers to investigate.
I can provide further diagnostic output if needed.
Reproduction steps
1.Add HACS repository 2. Install HACS 3. Restart HA 4. Got to Apps 5. Got to devices and services 6. Add Integration, search for HACS, select it 7. check the 4 boxes and submit 8. the could not register error is shown ...
Debug logs
2026-10-23 20:01:44.835 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2026-10-23 20:05:16.251 ERROR (MainThread) [custom_components.hacs] Request exception for 'https://github.com/login/device/code' with - 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/login/device/code?client_id=395a8e669c5de9f7c6e8&scope='
File "/config/custom_components/hacs/config_flow.py", line 98, in async_step_device
2026-10-23 20:06:49.402 ERROR (MainThread) [custom_components.hacs] Request exception for 'https://github.com/login/device/code' with - 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/login/device/code?client_id=395a8e669c5de9f7c6e8&scope='
File "/config/custom_components/hacs/config_flow.py", line 98, in async_step_device
2026-10-23 20:12:20.853 ERROR (MainThread) [custom_components.hacs] Request exception for 'https://github.com/login/device/code' with - 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/login/device/code?client_id=395a8e669c5de9f7c6e8&scope='
2026-10-23 20:17:08.943 ERROR (MainThread) [custom_components.hacs] Request exception for 'https://github.com/login/device/code' with - 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/login/device/code?client_id=395a8e669c5de9f7c6e8&scope='
Diagnostics dump
Relevant Home Assistant log output
2026-10-23 20:01:44.835 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2026-10-23 20:05:16.251 ERROR (MainThread) [custom_components.hacs] Request exception for 'https://github.com/login/device/code' with - 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/login/device/code?client_id=395a8e669c5de9f7c6e8&scope=' File "/config/custom_components/hacs/config_flow.py", line 98, in async_step_device
2026-10-23 20:06:49.402 ERROR (MainThread) [custom_components.hacs] Request exception for 'https://github.com/login/device/code' with - 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/login/device/code?client_id=395a8e669c5de9f7c6e8&scope=' File "/config/custom_components/hacs/config_flow.py", line 98, in async_step_device
2026-10-23 20:12:20.853 ERROR (MainThread) [custom_components.hacs] Request exception for 'https://github.com/login/device/code' with - 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/login/device/code?client_id=395a8e669c5de9f7c6e8&scope='
2026-10-23 20:17:08.943 ERROR (MainThread) [custom_components.hacs] Request exception for 'https://github.com/login/device/code' with - 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/login/device/code?client_id=395a8e669c5de9f7c6e8&scope='
The repeated errors occurred during retries of the HACS setup flow.
HACS installation results
The official Get HACS app downloaded and installed HACS successfully.
Relevant installer output:
INFO: Found Home Assistant configuration directory at '/homeassistant' INFO: Changing to the custom_components directory... INFO: Downloading HACS INFO: Creating HACS directory... INFO: Unpacking HACS... INFO: Verifying versions INFO: Current version is 2026.10.3, minimum version is 2024.4.1 INFO: Removing HACS zip file... INFO: Installation complete. INFO: Remember to restart Home Assistant before you configure it
Home Assistant was restarted before attempting to configure the integration.
Diagnostics performed
- Tested the GitHub device-code endpoint from Home Assistant OS
Using the Terminal & SSH app, I ran:
curl -sS -o /dev/null -w 'HTTP status: %{http_code}\nContent type: %{content_type}\n'
-X POST 'https://github.com/login/device/code'
-H 'Accept: application/json'
-H 'Content-Type: application/x-www-form-urlencoded'
--data 'client_id=395a8e669c5de9f7c6e8&scope='
Output:
HTTP status: 200 Content type: application/json; charset=utf-8
This indicates that a direct POST to the endpoint from the Home Assistant OS environment succeeds and returns JSON.
- Measured the response header lengths
I then ran:
curl -sS -D - -o /dev/null
-X POST 'https://github.com/login/device/code'
-H 'Accept: application/json'
-H 'Content-Type: application/x-www-form-urlencoded'
--data 'client_id=395a8e669c5de9f7c6e8&scope=' |
awk '
/^HTTP// {print; next}
/^[^ \t]/ {
name=$0
sub(/:.*/, "", name)
print name ": header-line-length=" length($0)
}'
Output:
HTTP/2 200 date: header-line-length=36 content-type: header-line-length=46 vary: header-line-length=142 etag: header-line-length=43 cache-control: header-line-length=51 set-cookie: header-line-length=134 set-cookie: header-line-length=80 strict-transport-security: header-line-length=72 x-frame-options: header-line-length=22 x-content-type-options: header-line-length=32 x-xss-protection: header-line-length=20 referrer-policy: header-line-length=75 content-security-policy: header-line-length=9243 x-github-request-id: header-line-length=56 x-github-edge-region: header-line-length=26 server: header-line-length=19 : header-line-length=1
The Content-Security-Policy response header was 9,243 characters long, exceeding the 8,190-byte limit reported by HACS's HTTP client.
Duplicate of #5643
I fixed this. Check the Pull Requests.
3. I fixed this. Check the Pull Requests.
@kenpc-git thanks. Does your PR fix my registration problem? I was able to download HACS no problem. Is the header size issue preventing download the sane issue as the could not register issue?
I have the same problem on a Raspberry Pi 3.
I've tried to install HACS in the last 30 minutes, and I'm getting the could_not_register error.
- I'm running the latest version of HAOS (18.3 - Core 2026.10.3) as a VM under UTM on MacOS 15. The install has been working as expected for several months.
- I installed the "Get HACS" app, the log suggested all went well, and restarted HAOS
- When I attempt to add the HACS integration I get the "could_not_register" error.
- I can access GitHub from the machine the VM is running on.
Appreciate there's not really anything new here, but this might help.
Options are being looked at, the cause is known, more details are not needed.
Hi there 👋
GitHub made a change late yesterday that changed the size of the CSP header, so it would start working again. At the same time, Home Assistant released 2026.10.4, which raises this to 64 KiB for all usage inside Home Assistant.
Closing this one.