Repository navigation
[Windows] Repeated launches fail with Web authentication error after loopback Cookie header reaches 431 #12080
qingtiannew
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
On Windows, DSH Desktop 0.2.1-rc.5 can fail during startup after repeated launches with
desktop welcome: Web authentication failed.Confirmed cause
A Chromium NetLog from the failed launch showed Electron's request to the local Host (
127.0.0.1:<ephemeral port>) carrying a Cookie header of about 16 KB. The Host responded withHTTP/1.1 431 Request Header Fields Too Large.The DSH Chromium cookie database contained 71 cookies for
127.0.0.1with names beginningdsh-auth-(about 15.9 KB of stored cookie data). Cookies are scoped to the host, not the port, so entries left by previous Host instances were sent to the new ephemeral port. The persistent Chromium cookie jar kept these entries across restarts. The Desktop code then surfaced the non-2xxnet.fetch()response as the generic Web authentication failure.Disabling all third-party bundles and launching with
--no-proxy-serverdid not change the failure, isolating it to the Desktop/Host local-auth path.Workaround verified
With DSH closed, back up the Chromium
Network/CookiesSQLite database and remove only rows wherehost_keyis127.0.0.1and the cookie name starts withdsh-auth-. After removing the 71 stale local-auth cookies, DSH started normally again with the original profile and plugins; no new Host crash log was produced.Suggested fix
Clear obsolete loopback
dsh-auth-*cookies before authenticating a new Host, or otherwise replace or clean old entries when a Host exits. Add a regression test that exercises repeated Host starts and verifies the auth request header stays below the server limit.Environment
All reactions