Skip to content

fix: empty vault passphrase no longer triggers a decrypt-config boot loop - #11985

Merged
Eugeny merged 2 commits into
Eugeny:masterfrom
Esir98:fix/11963-empty-passphrase-decrypt
Dec 1, 2026
Merged

Eugeny merged 2 commits into
Eugeny:masterfrom
Esir98:fix/11963-empty-passphrase-decrypt

Conversation

@Esir98

@Esir98 Esir98 commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

With config sync and vault encryption enabled, pressing Enter or cancelling the unlock passphrase prompt returns { passphrase: undefined }. The fix in #11356 only checks if (!result), so that empty passphrase still reaches Buffer.from(undefined), throws ERR_INVALID_ARG_TYPE, and Tabby shows a "Could not decrypt config" dialog (Try again / Erase config / Quit) on every startup.

This change:

  • Treats an empty or missing passphrase as cancellation and rejects it before touching crypto
  • Rejects incomplete vault data with a clear error
  • Does not submit the unlock dialog on empty Enter
  • Actually aborts the decrypt loop when Quit is chosen
  • Restores the previous local config if a sync download fails

Fixes #11963

Pressing Enter or cancelling the vault unlock prompt returned
{passphrase: undefined}. The Eugeny#11356 guard only checked if (!result),
so an empty passphrase reached Buffer.from() and threw
ERR_INVALID_ARG_TYPE, which then surfaced as a "Could not decrypt
config" loop on every startup.

Treat an empty passphrase as cancellation before touching crypto,
reject incomplete vault data, do not submit on empty Enter, abort
on Quit, and restore the previous local config if a sync download
fails.

Fixes Eugeny#11963
@Esir98

Esir98 commented Nov 30, 2026

Copy link
Copy Markdown
Contributor Author

@Eugeny when you have a moment, could you take a look at this one? It fixes the Could not decrypt config boot loop in #11963 (empty passphrase on the vault unlock prompt slipping past the if (!result) guard added in #11356). Small change, happy to adjust anything. Thanks!

@Eugeny
Eugeny merged commit 7b4a1d3 into Eugeny:master Dec 1, 2026
10 checks passed
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

Successfully merging this pull request may close these issues.

[Bug] Unhandled TypeError [ERR_INVALID_ARG_TYPE] and startup crash loop when cancelling config sync passphrase prompt

2 participants