costastf / locationsharinglib

A library to retrieve coordinates from an google account that has been shared locations of other accounts.
MIT License
170 stars 29 forks source link

Failure to load cookie file #103

Closed JimCordwell closed 1 year ago

JimCordwell commented 1 year ago

I'm trying to use the location sharing lib version 4.1.8. This is my first attempt to use any version. I'm stuck at creating the service. The error I get is "Could not properly load cookie text file." I've used the chrome extension to generate the file and it contains what appears to be cookie content.

Running the source code, the file read fails on the first character of the line. My cookie file starts with comments (lines beginning #) so the error I see is "invalid load key, '#'.". If I remove the comment lines the error I see is "invalid load key, 'm'." where the first cookie is for mail.google.com

JimCordwell commented 1 year ago

My cookie file looks like this... image

costastf commented 1 year ago

You should have logged in the maps.google.com service and not Gmail. Can you try again after getting cookies for maps?

JimCordwell commented 1 year ago

I'm logging out of my gmail account and then choosing to login in on the google maps page. I've done a log out, close chrome, reopen it, clear cookies, log in (on maps page), export the file. It's the same result just tripping up on the first character of the file. The file has a lot more entries than shown above, nothing that is obviously maps though.

costastf commented 1 year ago

@JimCordwell v4.2.0 should be addressing your issue. Thanks a lot for reporting! Apparently the cookies send by google have a few more fields now. I of course deleted the cookies.txt you uploaded as soon as I saw that. Please make sure you terminate that session from your browser in case someone got to those cookies before I deleted them.

JimCordwell commented 1 year ago

Brilliant thanks, working now.

janwillemb commented 1 year ago

Thanks for the update!

janwillemb commented 1 year ago

For anyone having this issue, you have to update the pip package using

pip install --upgrade locationsharinglib