[GH-ISSUE #7030] yt-dlp: Unable to access browser cookies for authenticated downloads #3459

Closed
opened 2026-05-05 10:00:38 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @hyder365 on GitHub (Jan 13, 2026).
Original GitHub issue: https://github.com/netblue30/firejail/issues/7030

Description

When running yt-dlp in firejail to download YouTube videos, sometimes a rate limit is put in place. This requires the user to log in via a browser to "prove you're not a bot." The yt-dlp program can use the cookies file from the browser with the "--cookies-from-browser firefox" (for example) flag. Firejail blocks access to this needed file.

Steps to Reproduce

Steps to reproduce the behavior

  1. Run "firejail yt-dlp URL-HERE" for an age-restricted video or when under the rate limit

Expected behavior

Download begins.

Actual behavior

Extracting cookies from firefox

ERROR: could not find firefox cookies database in
'/home/user/.config/mozilla/firefox',
'/home/user/.mozilla/firefox',
'/home/user/.var/app/org.mozilla.firefox/config/mozilla/firefox',
'/home/user/.var/app/org.mozilla.firefox/.mozilla/firefox',
'/home/user/snap/firefox/common/.mozilla/firefox'

Environment

  • Latest stable release on Arch Linux

Checklist

  • I am using firejail 0.9.78 or later
  • I am using the full program path (e.g. firejail /usr/bin/vlc instead of firejail vlc; see https://github.com/netblue30/firejail/issues/2877)
  • The issues is caused by firejail (i.e. running the program by path (e.g. /usr/bin/vlc) "fixes" it).
  • I can reproduce the issue without custom modifications (e.g. globals.local).
  • The program has a profile. (If not, request one in https://github.com/netblue30/firejail/issues/1139)
  • The profile (and redirect profile if exists) hasn't already been fixed upstream.
  • I have performed a short search for similar issues (to avoid opening a duplicate).
    • I'm aware of browser-allow-drm yes/browser-disable-u2f no in firejail.config to allow DRM/U2F in browsers.
  • I used --profile=PROFILENAME to set the right profile. (Only relevant for AppImages)

Related commits:

Relates to:

Originally created by @hyder365 on GitHub (Jan 13, 2026). Original GitHub issue: https://github.com/netblue30/firejail/issues/7030 <!-- See the following links for help with formatting: https://guides.github.com/features/mastering-markdown/ https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax --> ### Description When running yt-dlp in firejail to download YouTube videos, sometimes a rate limit is put in place. This requires the user to log in via a browser to "prove you're not a bot." The yt-dlp program can use the cookies file from the browser with the "--cookies-from-browser firefox" (for example) flag. Firejail blocks access to this needed file. ### Steps to Reproduce _Steps to reproduce the behavior_ 1. Run "firejail yt-dlp URL-HERE" for an age-restricted video or when under the rate limit ### Expected behavior Download begins. ### Actual behavior Extracting cookies from firefox ERROR: could not find firefox cookies database in '/home/user/.config/mozilla/firefox', '/home/user/.mozilla/firefox', '/home/user/.var/app/org.mozilla.firefox/config/mozilla/firefox', '/home/user/.var/app/org.mozilla.firefox/.mozilla/firefox', '/home/user/snap/firefox/common/.mozilla/firefox' ### Environment - Latest stable release on Arch Linux ### Checklist - [x] I am using firejail [0.9.78 or later](https://github.com/netblue30/firejail/tree/master/SECURITY.md) - [x] I am using the full program path (e.g. `firejail /usr/bin/vlc` instead of `firejail vlc`; see `https://github.com/netblue30/firejail/issues/2877`) - [x] The issues is caused by firejail (i.e. running the program by path (e.g. `/usr/bin/vlc`) "fixes" it). - [x] I can reproduce the issue without custom modifications (e.g. globals.local). - [x] The program has a profile. (If not, request one in `https://github.com/netblue30/firejail/issues/1139`) - [x] The profile (and redirect profile if exists) hasn't already been fixed [upstream](https://github.com/netblue30/firejail/tree/master/etc). - [x] I have performed a short search for similar issues (to avoid opening a duplicate). - [x] I'm aware of `browser-allow-drm yes`/`browser-disable-u2f no` in `firejail.config` to allow DRM/U2F in browsers. - [x] I used `--profile=PROFILENAME` to set the right profile. (Only relevant for AppImages) Related commits: * d7f903b21 ("more on yt-dlp profile", 2026-01-13) * 26c8d60c6 ("whitespace", 2026-01-13) Relates to: * #6999
Author
Owner

@netblue30 commented on GitHub (Jan 13, 2026):

Grab the latest yt-dlp.profile form git https://github.com/netblue30/firejail/blob/master/etc/profile-m-z/yt-dlp.profile and copy it in /etc/firejail directory.

Uncomment noblacklist ${HOME}/.mozilla line. The profile should also fix deno JavaScript problem.

<!-- gh-comment-id:3745521159 --> @netblue30 commented on GitHub (Jan 13, 2026): Grab the latest yt-dlp.profile form git https://github.com/netblue30/firejail/blob/master/etc/profile-m-z/yt-dlp.profile and copy it in /etc/firejail directory. Uncomment noblacklist ${HOME}/.mozilla line. The profile should also fix deno JavaScript problem.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#3459
No description provided.