Giter VIP home page Giter VIP logo

Comments (21)

jxchlee avatar jxchlee commented on July 16, 2024 20

Edition Windows 11 Pro
Version 22H2
Installed on ‎1/‎19/‎2023
OS build 22621.1702
Experience Windows Feature Experience Pack 1000.22641.1000.0
Python 3.11.2
pip 23.1.2
Chrome Version 114.0.5735.110 (Official Build) (64-bit)

It's not working on new Chrome version in windows.
https://stackoverflow.com/questions/76440733/unable-to-open-cookie-file
That link is the post about this issue.

So I solved this issue temporarily by following the post.
It's working when I typed the command below in the target section from properties like image.
--disable-features=LockProfileCookieDatabase
2023-06-12 12_00_52-Google Chrome Properties

from browser_cookie3.

csm10495 avatar csm10495 commented on July 16, 2024 2

See yt-dlp/yt-dlp#7271 (comment) for a possible non-admin solution here!

from browser_cookie3.

omineko1 avatar omineko1 commented on July 16, 2024 1

I am on windows 64 bit and I rolled chrome back to 114.0.5735.110 to get it working again

from browser_cookie3.

darthwalsh avatar darthwalsh commented on July 16, 2024 1

The LockProfileCookieDatabase temp flag solution will go away once Chrome decides this change is permanent :(

This thread has some more context: yt-dlp/yt-dlp#7271 (comment). On that project, there's a new PR showing using Win32 ShadowCopy API that sounds like it works even when Cookies is locked, but requires the python process to be elevated...

from browser_cookie3.

csm10495 avatar csm10495 commented on July 16, 2024 1

Hey folks, I wrote that PR for yt-dlp.. and somehow found this thread. It uses ShadowCopy and works just fine when elevated. Another way of potentially getting cookies is to read off the disk directly. Basically you would find the NTFS info for the file (including offset) and then you would read it (and i guess have similar issues for other file systems).

Unfortunately that needs elevation as well. I don't think there will be a way to get the locked file content without elevation on Windows unfortunately.

TLDR: ShadowCopy seems like the best way at the moment, but requires elevation.

from browser_cookie3.

csm10495 avatar csm10495 commented on July 16, 2024 1

Sweet. I've made it really easy. https://pypi.org/project/shadowcopy/

pip install shadowcopy

Then to use it:

from shadowcopy import shadow_copy

# Internally this creates a shadow copy instance via WMI, copies the file, then deletes the shadow copy.
shadow_copy("source.txt", "destination.txt")

This will raise if not admin or if called on non-Windows.

from browser_cookie3.

csm10495 avatar csm10495 commented on July 16, 2024 1

Woot: #185

from browser_cookie3.

rafiibrahim8 avatar rafiibrahim8 commented on July 16, 2024

Possible duplicate of #179.
Maybe the Chrome update changed something.

Having a look.

from browser_cookie3.

zhaotong1121 avatar zhaotong1121 commented on July 16, 2024

Can't it be used anymore?

from browser_cookie3.

omineko1 avatar omineko1 commented on July 16, 2024

same issue. began after latest chrome update.

from browser_cookie3.

zhaotong1121 avatar zhaotong1121 commented on July 16, 2024

There will be issues with the latest version of Chrome, and if the version is rolled back to 104.0.5112.102, there will be no issues

from browser_cookie3.

rafiibrahim8 avatar rafiibrahim8 commented on July 16, 2024

@zhaotong1121 @omineko1 Is the issue happing only on windows? I've checked on Linux, works fine there.

from browser_cookie3.

rafiibrahim8 avatar rafiibrahim8 commented on July 16, 2024

Can not reproduce :(.

Need help.
Can anyone provide the Python version windows version etc. (as much as you can)?

from browser_cookie3.

zhenyahacker avatar zhenyahacker commented on July 16, 2024

Win10 22H2 64bit [Version 10.0.19045.2965] with all updates installed. System has the only user account.
Python 3.11.2
Pip upgraded to latest version.
Wheel installed.
All packages installed via pip as site-packages.
Chrome installed as usual using official installer and autoupdated.

from browser_cookie3.

Xdynix avatar Xdynix commented on July 16, 2024

So I solved this issue temporarily by following the post.
It's working when I typed the command below in the target section from properties like image.
--disable-features=LockProfileCookieDatabase

@jxchlee Confirmed it works, thanks for saving my day!

from browser_cookie3.

gameuser1982 avatar gameuser1982 commented on July 16, 2024

Is that temp solution to use "--disable-features=LockProfileCookieDatabase" the only option still for windows? Not a ideal work around since default Chrome settings still don't allow the cookie reading functionality to work right.

from browser_cookie3.

githublyff avatar githublyff commented on July 16, 2024

Windows 10 64
python 3.7.9
chrome 114.0.5735.199

browser-cookie3 0.13.0

browser-cookie3 Unable to read cookie data from Chrome, it used to be normal。

from browser_cookie3.

rafiibrahim8 avatar rafiibrahim8 commented on July 16, 2024

@csm10495 Do you want to write a patch for this package too? I'll appreciate your contribution.

from browser_cookie3.

csm10495 avatar csm10495 commented on July 16, 2024

I think best bet would be for me to take the logic i wrote in yt-dlp and move it out to a simple/small lib. Probably only one function: copy_from_shadow or something like that.

Then browser_cookie3 would be able to import it. I'm a bit nervous about making that exact same change again over here and would honestly rather just have both yt-dlp and browser_cookie3 use the same lib.

That way if there are future issues its a fix in one place instead of multiple.

Would using a lib for this be ok?

from browser_cookie3.

rafiibrahim8 avatar rafiibrahim8 commented on July 16, 2024

@csm10495 Sure!

from browser_cookie3.

pgh268400 avatar pgh268400 commented on July 16, 2024
browser-cookie3  0.19.1
Version 116.0.5845.111
Python 3.11.4
Windows 10 22H2

At first, I had a privilege problem in the above environment, but at some point, I was able to access the cookie value without a privilege problem.

I'm using the latest version of Chrome and I still have access to the cookie value without any permission issues.

image
However, if Python is not installed at all through pyinstaller and uac-admin, and if you run a packaged exe in an environment with the latest Chrome version, the above permission problems occur.

I don't really understand why it works on my computer and it doesn't work on other computers.

from browser_cookie3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.