You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and I can see a sqlite file where I am pointing with valid contents (I can browse the tables in pycharm)
Traceback (most recent call last):
File "E:\mpr\venv39\lib\site-packages\browser_cookie3\__init__.py", line 317, in _decrypt
return self._decrypt_windows_chromium(value, encrypted_value)
File "E:\mpr\venv39\lib\site-packages\browser_cookie3\__init__.py", line 308, in _decrypt_windows_chromium
_, data = crypt_unprotect_data(encrypted_value)
File "E:\mpr\venv39\lib\site-packages\browser_cookie3\__init__.py", line 98, in crypt_unprotect_data
raise RuntimeError('Failed to decrypt the cipher text with DPAPI')
RuntimeError: Failed to decrypt the cipher text with DPAPI
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:\mpr\venv39\lib\site-packages\browser_cookie3\__init__.py", line 333, in _decrypt
data = aes.decrypt_and_verify(encrypted_value[12:-16], tag)
File "E:\mpr\venv39\lib\site-packages\Crypto\Cipher\_mode_gcm.py", line 567, in decrypt_and_verify
File "E:\mpr\venv39\lib\site-packages\Crypto\Cipher\_mode_gcm.py", line 508, in verify
raise ValueError("MAC check failed")
ValueError: MAC check failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:\mpr\code\selenium-test.py", line 160, in <module>
main()
File "E:\mpr\code\selenium-test.py", line 154, in main
cookies = browser_cookie3.chrome(cookie_file="C:\\temp\\profile2\\Default\\Cookies")
File "E:\mpr\venv39\lib\site-packages\browser_cookie3\__init__.py", line 596, in chrome
return Chrome(cookie_file, domain_name, key_file).load()
File "E:\mpr\venv39\lib\site-packages\browser_cookie3\__init__.py", line 293, in load
value = self._decrypt(item[5], item[6])
File "E:\mpr\venv39\lib\site-packages\browser_cookie3\__init__.py", line 335, in _decrypt
raise BrowserCookieError('Unable to get key for cookie decryption')
browser_cookie3.BrowserCookieError: Unable to get key for cookie decryption
Exception ignored in: <function ChromiumBased.__del__ at 0x00000202566FDEE0>
Traceback (most recent call last):
File "E:\mpr\venv39\lib\site-packages\browser_cookie3\__init__.py", line 256, in __del__
os.remove(self.tmp_cookie_file)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\HOWARD~1\\AppData\\Local\\Temp\\tmprktw7dzz.sqlite'
The text was updated successfully, but these errors were encountered:
You have to pass the key_file argument too to the chrome method. The key file is named Local State. And it should be on user data dir ('c:\temp\profile2\Local State' in your case.)
This seems to be #44 but that was before PR #48 which supposedly fixed it. I guess something has changed again since?
Python 3.9.5 on Windows 10.
I am loading cookies from a non-standard location, written to by my Selenium session:
and I can see a sqlite file where I am pointing with valid contents (I can browse the tables in pycharm)
The text was updated successfully, but these errors were encountered: