-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PSA: for Google accounts, use cookies method #575
Comments
I'm having the same issue as maodelg. I wonder if Google changed the way their authentication cookies work recently? |
@garthand yes they did. I've been having the same issue with homeassistant nest-protect (hacs). It seems to be related to this: https://support.google.com/accounts/answer/12379384 |
@quargin @maodelg I figured it out; I was opening the console in one tab and logging in on another, and I wasn't seeing anything. I had to go to home.nest.com, open the console (and change its size so I could see both the console and the browser window), and then log in. Then the issueToken filter produced results for me. |
@garthand How do you get the actual token? |
I'm trying to use the cookie method but getting an error:
Also noticing that part of the cookie in the request header has Also, I tried replacing with |
The cookie method is not working. I tried it with the Sidecar extension and the manual configuration. I click save, and the system acts like it's doing something, then it goes back to the same screen - see attached.. The Nest bridge QR will work in Homekit, but no accessories (thermostats, smoke detectors) show up. |
Can you try following the instructions in the README to edit the |
I've followed the readme instructions and edited the config manually. The issue wasn't trying to save an option via the UI for me. The issue was that the external request that was being made was failing due to an invalid character in the request payload. This invalid character came from the google cookie. I addressed the issue by using a refresh token from another instance that I already had working, but others may not be able to do this and I'm not sure how long the refresh token will last. |
Any progress on fixing this? Still stuck on the filter showing nothing... @adriancable is this working for you? |
@tscanlin - the … is not part of the cookie. It’s the browser shortening things. Need to make sure the whole cookie is shown before copying and pasting. Try clicking on the … or ‘Show more’ or whatever is needed to show the whole cookie string. |
@maodelg - yes, it’s working for me. Try incognito mode, check ‘Third-party requests’, make sure ‘All’ is selected in the network tab etc. |
I noticed my Nest Thermostat not responding in the Home app. After trying everything in the documentation, I uninstalled and reinstalled. Now, I'm getting this message in the Homebridge console: I did see something about only using the coockie method, but when I took the Refresh Token out, the console said that field was required. Can someone give me a hand with this? Please and thank you!! |
Never mind! The configurator through the HB UI wasn't helpful and I ended up manually removing the "Refresh Token" entry and added a "cookie" entry under the "GoogleAuth" section on the config file. Works now! |
Anyone else have some accessores missing after changing the authentication from refresh token to the cookie method? After rebooting today, my accessories all disappeared. Found this PSA and noted that I was using the refresh token method. Modified my config file to use the cookie method after following the instructions in the README. Now only one of my two Yale x Nest locks shows up in the accessories tab. Logs are consistent with that - the only Lock-related entry is:
I've tried restarting Homebridge several times and I've even restarted the Docker container just to be thorough. Still have only 1 of 2 locks showing up... |
Restarted the Docker container this morning and both of my locks showed up. Everything looks good. Thanks for the PSA! |
This is very likely a dumb question, but I'm assuming the Chrome instance from which the IssueToken and cookie are extracted needs to be running on the same machine that is running HomeBridge? I have HomeBridge running on my Synology NAS (DSM 7), but as far as I can tell there is no way of running even "headless" Chrome on a Synology NAS. I've tried logging into home.nest.com and copying the IssueToken and Cookie from Chrome running on my Windows 10 machine that is accessing my NAS over my home network, but (not surprisingly) get "Google Authorization Error" messages. Feels like I will need to cave in and buy a Starling Home Hub for $99, but wanted to see if I was missing something. |
It does not need to be the same machine. If you are getting an error, it means you are not copying and pasting the cookie string correctly. If you post your config.json here, then I can help. |
Thanks for the clarification (very encouraging) and the help offer, but ... I finally got it to work, on the 7th or 8th try. I perhaps was missing/adding a stray character. Some notes that others may find helpful (although honestly I'm not sure whether #2-#4 are critical):
|
The README has been updated to show that the Refresh Token Method doesn't work anymore, but that hasn't been pushed to NPM yet, which is where I was reading the docs. Just an FYI. |
@foothook - sorry, this is the wrong place to ask. This plug-in has no connection with Home Assistant, or the Home Assistant Nest Protect add-on. I can't help you with other people's software. |
hi @adriancable - i appreciate for quick reply, you are totally right I messed the threads up since an issue on the other end linked here for reference and I wrongly postet my quesrtions here. I will repost there, should i delete it here? thank you, I wish you a good day. |
The switch to the cookie method had been working well for me over since switch post google changes. However I notice in the home bridge logs the repeated message _currentUrl[1/20/2023, 6:40:47 AM] [Nest] Access token acquisition via googleAuth failed (code ENOTFOUND). This just repeats I have tried creating a new cookie method token via the instructions on this here but still get the same results and it just repeats every 15 seconds UPDATE: Turned out my homebridge lost it's dns IP's added them back and all is good |
Well after wasting a ton of time trying everything else listed above, this is what eventually worked for me. Thanks for updating your post @pacmanbnenl |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@pacmanbnenl can you clarify what this means? I'm facing the same issue. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Oh, this is weird. I've been using the refresh token until I started changing all my passwords. |
For me, the cookie method works great...for a few hours. But eventually, things stop working and when I reset the Nest Bridge (using HOOBs), I get the "Google auth. was unsuccessful" error, and have to log back into home.nest.com and get the token and cookie again. As I said, I'm using a HOOBs All-in-one (Raspberry Pi) and logging into the device thru Chrome via the web interface from my M2 Pro Mac mini. Any thoughts? -Scott |
I tried to customize the script so I can get the refresh token for myself, but it still gives me a 401 error. Not sure why |
Commenting on this stickied post to raise visibility for others I was curious why you don't support auth via the $5 "Device Access" program route like ProNestheus does. Looks like doing so would remove access to nest temp sensor data. |
For anyone having the problem of the "..." in the cookie field, with it giving the error "ERR_INVALID_CHAR" what worked to see the whole cookie (I'm on Firefox), was selecting view raw, then going to the cookie field. |
The documentation describes two possible methods to connect to Google accounts: the 'cookies' method, and the 'refresh token' method.The documentation has been updated to describe only the 'cookies' method for connecting the plug-in to Google accounts.Google has deprecated the 'refresh token' method. It does not work any more. It will give you errors. No need to file an issue saying that this method no longer works.
Please use the cookies method only with Google accounts. Thank you!
The text was updated successfully, but these errors were encountered: