seproDev / yt-dlp-ChromeCookieUnlock

A yt-dlp plugin to unlock the cookie database of chromium-based browsers
MIT License
75 stars 2 forks source link

Permission denied with Microsoft Edge cookies #2

Open Dyr-Fenrir opened 1 month ago

Dyr-Fenrir commented 1 month ago

Greetings,

The following issue started yesterday:

Extracting cookies from edge
[debug] Extracting cookies from: "C:\Users\CENSORED\AppData\Local\Microsoft\Edge\User Data\Default\Network\Cookies"
[debug] Found local state file at "C:\Users\CENSORED\AppData\Local\Microsoft\Edge\User Data\Local State"
Attempting to unlock cookies
Traceback (most recent call last):
  File "C:\Users\CENSORED\AppData\Roaming\yt-dlp\plugins\yt-dlp-ChromeCookieUnlock\yt_dlp_plugins\postprocessor\chrome_cookie_unlock.py", line 9, in unlock_chrome
    return original_func(database_path, tmpdir)
  File "yt_dlp\cookies.py", line 1071, in _open_database_copy
  File "shutil.py", line 418, in copy
  File "shutil.py", line 264, in copyfile
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\CENSORED\\AppData\\Local\\Microsoft\\Edge\\User Data\\Default\\Network\\Cookies'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "yt_dlp\__main__.py", line 17, in <module>
  File "yt_dlp\__init__.py", line 1081, in main
  File "yt_dlp\__init__.py", line 979, in _real_main
  File "yt_dlp\YoutubeDL.py", line 720, in __init__
  File "yt_dlp\YoutubeDL.py", line 4070, in print_debug_header
  File "functools.py", line 967, in __get__
  File "yt_dlp\YoutubeDL.py", line 4245, in _request_director
  File "yt_dlp\YoutubeDL.py", line 4220, in build_request_director
  File "functools.py", line 967, in __get__
  File "yt_dlp\YoutubeDL.py", line 4116, in cookiejar
  File "yt_dlp\cookies.py", line 94, in load_cookies
  File "yt_dlp\cookies.py", line 115, in extract_cookies_from_browser
  File "yt_dlp\cookies.py", line 302, in _extract_chrome_cookies
  File "C:\Users\CENSORED\AppData\Roaming\yt-dlp\plugins\yt-dlp-ChromeCookieUnlock\yt_dlp_plugins\postprocessor\chrome_cookie_unlock.py", line 12, in unlock_chrome
    unlock_cookies(database_path)
  File "C:\Users\CENSORED\AppData\Roaming\yt-dlp\plugins\yt-dlp-ChromeCookieUnlock\yt_dlp_plugins\postprocessor\chrome_cookie_unlock.py", line 63, in unlock_cookies
    raise RuntimeError(f"RmShutdown returned non-successful result: {result}")
RuntimeError: RmShutdown returned non-successful result: 351
[61952] Failed to execute script '__main__' due to unhandled exception!

It was not doing that last week when I used yt-dlp, is this be a bug or maybe something was updated in Microsoft Edge creating the issue?

May you help me out with this please?

Here are some details that might be useful:

Operating system: Windows 11 (23H2) Operating system build: 22631.3958

Microsoft Edge version: 127.0.2651.86 (please note that it is doing the same error, even when Edge is closed)

yt-dlp version: 2024.8.1.0 yt-dlp-ChromeCookieUnlock version: v2024.04.29 (redownload it yesterday just to make sure)

Download link used: https://x.com/i/status/1820565525832798518

Just let me know if you need any other information.

seproDev commented 1 month ago

Hmm, I am unable to replicate with Edge 127.0.2651.86. This might be related to: https://security.googleblog.com/2024/07/improving-security-of-chrome-cookies-on.html