Errors with Chrome version 59

Issue #15 new
Anonymous created an issue

Chrome version: 59.0.3071.115 (Official Build) (64-bit) Operating System: Mac

I encounter the following error when trying to retrieve my cookies from Chrome:

cj = browsercookie.load() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/site-packages/browsercookie/", line 260, in load for cookie in sorted(_get_cookies(), key=lambda cookie: cookie.expires): File "/usr/local/lib/python2.7/site-packages/browsercookie/", line 249, in _get_cookies for cookie in klass().get_cookies(): File "/usr/local/lib/python2.7/site-packages/browsercookie/", line 121, in get_cookies value = self._decrypt(item[5], item[6], key=key) File "/usr/local/lib/python2.7/site-packages/browsercookie/", line 148, in _decrypt return clean(decrypted) File "/usr/local/lib/python2.7/site-packages/browsercookie/", line 143, in clean return x[:-ord(last)].decode('utf8') File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/encodings/", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode byte 0xd5 in position 0: invalid continuation byte

Comments (4)

  1. Richard repo owner

    I tested and can confirm the problem - seems new versions of Chrome use a different algorithm for encrypting cookies. Patches welcome.

  2. Paco Gomez

    Thanks for making this module available. I can confirm also the problem with Chrome Version 60.0.3112.113. I just created PR-11 to work around, not fix, the issue, at least we can retrieve the cookies that can be decrypted.

  3. Paco Gomez

    your module can decrypt some of them, others don't and throw the error documented in this issue. The one that I'm interested in is decrypted successfully, so I put this try-catch block to at least be able to use the cookie. I haven't looked into the root cause of the error.

  4. Log in to comment