Cookie error dialog misidentifies "fresh cookies required" as "browser DB locked"
Bug: BrowserCookieErrorDialog shown for authentication errors, not just DB lock errors
Describe the bug When downloading Douyin content that requires login cookies, the app shows the "Cookie Access Failed / Browser is blocking cookie access" dialog — even when cookie mode is set to "off". The dialog incorrectly tells the user to close their browser, which is not the actual problem.
Root cause
In DownloadContext.tsx, both YT_COOKIE_DB_LOCKED and YT_FRESH_COOKIES_REQUIRED
are grouped into the same cookieErrorCodes set and both trigger BrowserCookieErrorDialog.
These are two distinct errors that need different messaging:
YT_COOKIE_DB_LOCKED: Browser is open and locking the cookie DB → "Close your browser"YT_FRESH_COOKIES_REQUIRED: Content requires authentication → "Enable cookie mode in Settings"
Expected behavior
YT_COOKIE_DB_LOCKED→ Show current "Browser is blocking cookie access" dialogYT_FRESH_COOKIES_REQUIRED→ Show a different dialog explaining that the content requires login cookies and guiding the user to enable cookie mode in Settings → Network
Steps to reproduce
- Set cookie mode to "Off" in Settings → Network
- Paste a Douyin video URL that requires authentication
- Start download
- Observe: "Cookie Access Failed / Browser is blocking cookie access" dialog appears
Affected files
src/contexts/DownloadContext.tsx(line ~444: cookieErrorCodes set)src/components/BrowserCookieErrorDialog.tsx
Handled and released in v0.13.2