You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Server won't start when server-signing-key.bin is empty ("Mac.key: An HMAC key cannot be empty") #32026
"It did not start after an update." The desktop app showed "The server could not start (code=1)" with CryptoError: Mac.key: An HMAC key cannot be empty. The backend failed on every start and the app kept retrying about every 10 seconds. An earlier run of the same failure reached about 2,950 attempts overnight.
Diagnosis
ServerSecretStore.getOrCreateRandom returns any existing secret file without checking its length, so a 0-byte server-signing-key.bin counts as a valid key.
Before #30501 and #30523, signing used NodeCrypto.createHmac, which accepts an empty key, so the bad file went unnoticed. SessionStore now calls PayloadSigner.fromSecret while the server starts, and Mac.key rejects empty keys, so the server exits. Going back to nightly 20261104.4165, which has neither PR, starts normally.
How the file became empty is unknown. It was last modified on 2026-04-11. Current code writes these keys through a temp file and a link, so it may come from an older build.
The code paths are the same on main @ 6577c6b. A possible fix: treat an empty secret as missing or corrupt in getOrCreateRandom, and generate a new one.
Steps to reproduce
Quit T3 Code.
Replace <state dir>/secrets/server-signing-key.bin with a 0-byte file.
The backend exits with code 1 and the error above.
Inferred from the source and this install. Not run on a clean setup.
Version
0.1.8-nightly.20261106.4262 (desktop); first failure 2026-11-04 22:48 UTC, build not recorded
Environment
macOS (Darwin 27.0.0), arm64; desktop app (Nightly) with its local server
Evidence
CryptoError: Mac.key: An HMAC key cannot be empty
at PayloadSigner.fromSecret (Nightly)
at server.runServerCommand (Nightly)
at server.runDefaultServerCommand (Nightly)
Trace: ServerSecretStore.getOrCreateRandom succeeds, then PayloadSigner.fromSecret fails about 0.1 ms later.
File sizes: server-signing-key.bin 0 bytes; mcp-oauth-signing-key.bin and asset-access-signing-key.bin 32 bytes.
Related issues
No matching issue found. Related PRs: #30501, #30523.
Fix applied or workaround
Deleted the 0-byte server-signing-key.bin and reopened the app. The server generated a new 32-byte key and started on the same build. Existing sessions may need to sign in again.
Issue watch found Julius has taken this over in #32053 at fa43bdc, which closes this issue. The current ServerSecretStore path still returns an existing empty file, matching the reported cause. The PR includes empty-key recovery and concurrent-caller regression coverage, plus a before/after server startup transcript. I am stopping this duplicate job. I did not run additional tests or verify the macOS or Linux desktop app.
Activity
shivamhwp commentedon Nov 7, 2026
Issue watch found Julius has taken this over in #32053 at fa43bdc, which closes this issue. The current ServerSecretStore path still returns an existing empty file, matching the reported cause. The PR includes empty-key recovery and concurrent-caller regression coverage, plus a before/after server startup transcript. I am stopping this duplicate job. I did not run additional tests or verify the macOS or Linux desktop app.