it works if I change the db_path and key_path to chrome's original profile path.
ex)
db_path = "C:\Users\user1\AppData\Local\Google\Chrome\User Data\Default\Network\Cookies"
key_path = "C:\Users\user1\AppData\Local\Google\Chrome\User Data\Local State"
Steps to reproduce
Windows 10 64bit
Chrome 130.0.6723.117
create cookie at custom path by running chrome.exe --user-data-dir="D:\temp\cookie2"
close chrome and run above code as administrator.
What browsers are you seeing the problem on?
Chrome
Relevant log output
DEBUG:rookie.browser.chromium:Admin rights detected
INFO:rookie.windows.shadow_copy:Creating shadow copy to cookies file from D:\temp\cookie2\Default\Network\Cookies to C:\Users\user1\AppData\Local\Temp\.tmpOOHwOj8Xin
DEBUG:rawcopy_rs_next:Saving 20480 bytes of data in "Cookies"...
DEBUG:rawcopy_rs_next:Done! save to C:\Users\user1\AppData\Local\Temp\.tmpOOHwOj8Xin\Cookies
DEBUG:rookie.browser.chromium:shadow copy result: Ok(())
INFO:rookie.browser.chromium:Creating SQLite connection to C:\Users\user1\AppData\Local\Temp\.tmpOOHwOj8Xin\Cookies
DEBUG:rookie.browser.chromium:key type: [118, 49, 48]
WARNING:rookie.browser.chromium:Failed to decode plaintext: Can't decode encrypted value
Traceback (most recent call last):
File "C:\test\test.py", line 4, in <module>
cookies = rookiepy.chromium_based(
^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: decrypt_encrypted_value failed
Location:
rookie-rs\src\browser\chromium.rs:201:3
What happened?
throws "decrypt_encrypted_value failed" error only when passing custom path to chromium_based().
import rookiepy db_path = "D:\temp\cookie2\Default\Network\Cookies" key_path = "D:\temp\cookie2\Local State" cookies = rookiepy.chromium_based( db_path=str(db_path), key_path=str(key_path), domains=None ) print(cookies)
it works if I change the db_path and key_path to chrome's original profile path. ex) db_path = "C:\Users\user1\AppData\Local\Google\Chrome\User Data\Default\Network\Cookies" key_path = "C:\Users\user1\AppData\Local\Google\Chrome\User Data\Local State"
Steps to reproduce
What browsers are you seeing the problem on?
Chrome
Relevant log output