Closed brewston closed 1 year ago
Hi, I am afraid there is not much more debugging. If the session gets invalidated then you cannot retrieve info. Do you use an unused other than your main g mail account and leave the session open in the browser? Do you by any chance use gsuite email and there is configuration to invalidate the session after some time by the admin account? Throwing some thoughts out there..
Thanks for quick reply. It is my main gmail account - not gsuite (as my family share with me and don't want HA app on their phones) I normally have a maps session open in my browser. This problem started when I had to clear cache/cookies in FF to fix a problem with a different site. Normally the HA maps integration just works..
I have had some erratic behavior reports from people but it was always something with the cookies. Maybe try another add on?
I have an account just for the location sharing and I share mine and my wife's with that so it never interferes with my actual account that I might log out unintentionally. That is what I suggest you do so you can set up a session and then just close the tab and forget about it.
Is there a recommended best way to extract the cookies ? I've tried 'export cookies' on FF and 'get cookies.txt LOCALLY' on Chrome. Thanks.
What domain are you trying? Please try to log in on maps.google.com . I think that either of those two add ons would work.
maps.google.com just re-directs me to https://www.google.com/maps
I guess that should work then.
Weird, I booted up a different laptop, extracted the cookies there and it seems to be updating OK in HA now. One question regarding HA - is the cookies file only read at HA start time ? it seems that dropping a newer cookies file in place without restarting HA has no effect.
I think that it is only reading them on add on loading, so you have to reload for the new cookies to be read. Happy that your issue is solved!
Is it ok to close this?
Yes, of course. Thanks for your help. Great integration for HA
Closing
@costastf I think the problem might due to a particular cookie __Secure-1PSIDTS
see - https://community.home-assistant.io/t/google-maps-location-sharing-problems/603446/14
if you agree, maybe your code could be adapted to strip it out ?
Sure, if we end up realizing that it is indeed the case. Currently I would like people to try with their text cookies and remove (or comment out with a hash) the __Secure-1PSIDTS
and see if that makes a difference. If we end up being very confident that it is the problem we can filter it out on parsing of the file and log a warning about it. Does this make sense?
Yes, perfect sense. Thanks.
Hiya
I'm trying to debug why this lib isn't working in HA. I've had multiple attempts to extract cookies (both from Chrome & Firefox) I have some simple test code :
running in a loop every 30s and within about 10mins, I see GgA= in the return code and it stops working. I extract new cookies, write to the filesystem and it works again. Do you have any tips on how to debug further ? Thanks