youwee icon indicating copy to clipboard operation
youwee copied to clipboard

Cookie error dialog misidentifies "fresh cookies required" as "browser DB locked"

Open TTAWDTT opened this issue 9 months ago • 1 comments

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" dialog
  • YT_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

  1. Set cookie mode to "Off" in Settings → Network
  2. Paste a Douyin video URL that requires authentication
  3. Start download
  4. 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

TTAWDTT avatar Mar 04 '26 09:03 TTAWDTT

Handled and released in v0.13.2

vanloctech avatar May 10 '26 08:05 vanloctech