2

My application using sqlite.connect is trying to connect Cookies file present in \AppData\Local\Google\Chrome\User Data\Default\Network and we were able to read cookies but suddenly issue started coming that its unable to open the Cookie file. \

During my investigation I found that, when Chrome is open I'm unable to open the file manually as well. Only when the chrome is closed I can open the file. This is causing lot of issues.

I believe the cookie file is being locked by chrome and not allowing anyone to read the file.

Can someone please help me?

Prashanth
  • 93
  • 11

1 Answers1

3

This is due to a recent Chrome update. Version 114.0.5735.110 Launch chrome from command line with:

chrome.exe --disable-features=LockProfileCookieDatabase

To help protect Chrome users against malware attempting to steal cookie information, Chrome 114 on Windows holds an exclusive lock on the profile cookie files on disk. To ensure this behavior does not interfere with any sanctioned software on your system, you can run Chrome with the -enable-features=LockProfileCookieDatabase command-line flag

carmel
  • 902
  • 7
  • 24
lovetofail
  • 46
  • 1
  • 1
  • Thanks a lot for the comment. I tried "chrome.exe -disable-features=LockProfileCookieDatabase" and with this I'm able to open the cookie file. However, if I run "chrome.exe -enable-features=LockProfileCookieDatabase". This does not help in opening the file. In your comment you have mentioned Santioned Software, may I know what you are referring to. – Prashanth Jun 10 '23 at 19:00
  • `code` "chrome.exe -enable-features=LockProfileCookieDatabase" `code` This means that if you want to lock your cookies you use this command. – lovetofail Jun 15 '23 at 18:20
  • Thanks for this fix: Sadly now need to start my chrome.exe instance with this flag. I need the file to be openable because I use https://www.npmjs.com/package/chrome-cookies-secure/v/2.1.1 to retrieve the cookie. – Kami Jun 19 '23 at 07:17