chrisjshull / homebridge-nest

Nest plugin for HomeBridge
694 stars 111 forks source link

Access Token Acquisition Failed #613

Closed AaqilRazak closed 1 year ago

AaqilRazak commented 1 year ago

I've been using this plug in for quite some time with the cookies method since it's proven to me to be more reliable than any other method ($5 API included). However, since tonight I've been unable to get them to work through HomeKit. When checking the logs, all of a sudden the access token no longer works. I got a new set of cookies and access token with the steps from the readme, however the same issue persists.

Here is what I see in the logs:

error: connect EACCES 2607:f8b0:4000:803::200d:443 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16) { errno: -4092, code: 'EACCES', syscall: 'connect', address: '2607:f8b0:4000:803::200d', port: 443, config: { url: 'https://accounts.google.com/o/oauth2/iframerpc?action=issueToken&response_type=token%20id_token&login_hint=AJDLj6LQu-SMCQLMJfOUep6S7tCedfG_qMj24bXFxLEg47pl0hnHpq1Q70DmIfbxmGAFrLvVBDvc5bZ9s7I7d1TF2p1cbvrJVA&client_id=733249279899-44tchle2kaa9afr5v9ov7jbuojfr9lrq.apps.googleusercontent.com&origin=https%3A%2F%2Fhome.nest.com&scope=openid%20profile%20email%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fnest-account&ss_domain=https%3A%2F%2Fhome.nest.com&include_granted_scopes=true',%20%20%20%20method:%20'get',%20%20%20%20headers:%20{%20%20%20%20%20%20Accept:%20'application/json,%20text/plain,%20*/*',%20%20%20%20%20%20'Sec-Fetch-Mode':%20'cors',%20%20%20%20%20%20'User-Agent':%20'Mozilla/5.0%20(Macintosh;%20Intel%20Mac%20OS%20X%2010_15_0)%20AppleWebKit/537.36%20(KHTML,%20like%20Gecko)%20Chrome/77.0.3865.120%20Safari/537.36',%20%20%20%20%20%20'X-Requested-With':%20'XmlHttpRequest',%20%20%20%20%20%20Referer:%20'https://accounts.google.com/o/oauth2/iframe',%20%20%20%20%20%20cookie:%20'NID=511=qEORQg3Z7i5sdgZW1C9xbS12IN8jkuZqVZ0Eupl-fYDmwZJeiSpnJIyG1FPKekqR10M7OR0Q6iJ8FWk_W3_O18gXwaKe5CFj1FMlu-Q_6wtJKfDNl9YBUiBNVtKrwDv0MVwBK7JJudzdzqWcoTXsEbuFk1dVps8IG3DpTSrWNgxF09R7c-J0-iB-fJc8m1Utyr2Q7Q;%20__Secure-3PSID=WQjE9LKNkqqGeEyOfDREXAyqPEGLq42rpgP0FkcAIdxMS_va4dPRJX1LdmdvbDMIqX23FA.;%20__Secure-3PAPISID=LgaqjM9Jvq9Fvltt/AcRCmYU672fu5lHzT;%20__Host-3PLSID=s.youtube:WQjE9P7n4yOB9ZxukPEeXs6WM60aqIaDGEp7pmCbW-Pu0Qu31pwdnebUS4HGt5VFha9Wng.;%20__Secure-3PSIDCC=AP8dLtxrGYTNEKQcmfFo8F6WrpJRg-NuS1iORedevHSy4pUjZFRItN8NzcO6YxyRMk1fpDwNQg'%20%20%20%20},%20%20%20%20transformRequest:%20[%20[Function:%20transformRequest]%20],%20%20%20%20transformResponse:%20[%20[Function:%20transformResponse]%20],%20%20%20%20timeout:%2040000,%20%20%20%20adapter:%20[Function:%20httpAdapter],%20%20%20%20xsrfCookieName:%20'XSRF-TOKEN',%20%20%20%20xsrfHeaderName:%20'X-XSRF-TOKEN',%20%20%20%20maxContentLength:%20-1,%20%20%20%20maxBodyLength:%20-1,%20%20%20%20validateStatus:%20[Function:%20validateStatus],%20%20%20%20transitional:%20{%20%20%20%20%20%20silentJSONParsing:%20true,%20%20%20%20%20%20forcedJSONParsing:%20true,%20%20%20%20%20%20clarifyTimeoutError:%20false%20%20%20%20},%20%20%20%20data:%20undefined%20%20},%20%20request:%20%3Cref%20*1%3E%20Writable%20{%20%20%20%20_writableState:%20WritableState%20{%20%20%20%20%20%20objectMode:%20false,%20%20%20%20%20%20highWaterMark:%2016384,%20%20%20%20%20%20finalCalled:%20false,%20%20%20%20%20%20needDrain:%20false,%20%20%20%20%20%20ending:%20false,%20%20%20%20%20%20ended:%20false,%20%20%20%20%20%20finished:%20false,%20%20%20%20%20%20destroyed:%20false,%20%20%20%20%20%20decodeStrings:%20true,%20%20%20%20%20%20defaultEncoding:%20'utf8',%20%20%20%20%20%20length:%200,%20%20%20%20%20%20writing:%20false,%20%20%20%20%20%20corked:%200,%20%20%20%20%20%20sync:%20true,%20%20%20%20%20%20bufferProcessing:%20false,%20%20%20%20%20%20onwrite:%20[Function:%20bound%20onwrite],%20%20%20%20%20%20writecb:%20null,%20%20%20%20%20%20writelen:%200,%20%20%20%20%20%20afterWriteTickInfo:%20null,%20%20%20%20%20%20buffered:%20[],%20%20%20%20%20%20bufferedIndex:%200,%20%20%20%20%20%20allBuffers:%20true,%20%20%20%20%20%20allNoop:%20true,%20%20%20%20%20%20pendingcb:%200,%20%20%20%20%20%20constructed:%20true,%20%20%20%20%20%20prefinished:%20false,%20%20%20%20%20%20errorEmitted:%20false,%20%20%20%20%20%20emitClose:%20true,%20%20%20%20%20%20autoDestroy:%20true,%20%20%20%20%20%20errored:%20null,%20%20%20%20%20%20closed:%20false,%20%20%20%20%20%20closeEmitted:%20false,%20%20%20%20%20%20[Symbol(kOnFinished)]:%20[]%20%20%20%20},%20%20%20%20_events:%20[Object:%20null%20prototype]%20{%20%20%20%20%20%20response:%20[Function:%20handleResponse],%20%20%20%20%20%20error:%20[Function:%20handleRequestError],%20%20%20%20%20%20socket:%20[Function:%20destroyOnTimeout]%20%20%20%20},%20%20%20%20_eventsCount:%203,%20%20%20%20_maxListeners:%20undefined,%20%20%20%20_options:%20{%20%20%20%20%20%20maxRedirects:%2021,%20%20%20%20%20%20maxBodyLength:%2010485760,%20%20%20%20%20%20protocol:%20'https:',%20%20%20%20%20%20path:%20'/o/oauth2/iframerpc?action=issueToken&response_type=token%20id_token&login_hint=AJDLj6LQu-SMCQLMJfOUep6S7tCedfG_qMj24bXFxLEg47pl0hnHpq1Q70DmIfbxmGAFrLvVBDvc5bZ9s7I7d1TF2p1cbvrJVA&client_id=733249279899-44tchle2kaa9afr5v9ov7jbuojfr9lrq.apps.googleusercontent.com&origin=https%3A%2F%2Fhome.nest.com&scope=openid%20profile%20email%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fnest-account&ss_domain=https%3A%2F%2Fhome.nest.com&include_granted_scopes=true',%20%20%20%20%20%20method:%20'GET',%20%20%20%20%20%20headers:%20[Object],%20%20%20%20%20%20agent:%20undefined,%20%20%20%20%20%20agents:%20[Object],%20%20%20%20%20%20auth:%20undefined,%20%20%20%20%20%20hostname:%20'accounts.google.com',%20%20%20%20%20%20port:%20null,%20%20%20%20%20%20nativeProtocols:%20[Object],%20%20%20%20%20%20pathname:%20'/o/oauth2/iframerpc',%20%20%20%20%20%20search:%20'?action=issueToken&response_type=token%20id_token&login_hint=AJDLj6LQu-SMCQLMJfOUep6S7tCedfG_qMj24bXFxLEg47pl0hnHpq1Q70DmIfbxmGAFrLvVBDvc5bZ9s7I7d1TF2p1cbvrJVA&client_id=733249279899-44tchle2kaa9afr5v9ov7jbuojfr9lrq.apps.googleusercontent.com&origin=https%3A%2F%2Fhome.nest.com&scope=openid%20profile%20email%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fnest-account&ss_domain=https%3A%2F%2Fhome.nest.com&include_granted_scopes=true'%20%20%20%20},%20%20%20%20_ended:%20true,%20%20%20%20_ending:%20true,%20%20%20%20_redirectCount:%200,%20%20%20%20_redirects:%20[],%20%20%20%20_requestBodyLength:%200,%20%20%20%20_requestBodyBuffers:%20[],%20%20%20%20_onNativeResponse:%20[Function%20(anonymous)],%20%20%20%20_currentRequest:%20ClientRequest%20{%20%20%20%20%20%20_events:%20[Object:%20null%20prototype],%20%20%20%20%20%20_eventsCount:%207,%20%20%20%20%20%20_maxListeners:%20undefined,%20%20%20%20%20%20outputData:%20[],%20%20%20%20%20%20outputSize:%200,%20%20%20%20%20%20writable:%20true,%20%20%20%20%20%20destroyed:%20false,%20%20%20%20%20%20_last:%20true,%20%20%20%20%20%20chunkedEncoding:%20false,%20%20%20%20%20%20shouldKeepAlive:%20false,%20%20%20%20%20%20maxRequestsOnConnectionReached:%20false,%20%20%20%20%20%20_defaultKeepAlive:%20true,%20%20%20%20%20%20useChunkedEncodingByDefault:%20false,%20%20%20%20%20%20sendDate:%20false,%20%20%20%20%20%20_removedConnection:%20false,%20%20%20%20%20%20_removedContLen:%20false,%20%20%20%20%20%20_removedTE:%20false,%20%20%20%20%20%20strictContentLength:%20false,%20%20%20%20%20%20_contentLength:%200,%20%20%20%20%20%20_hasBody:%20true,%20%20%20%20%20%20_trailer:%20'',%20%20%20%20%20%20finished:%20true,%20%20%20%20%20%20_headerSent:%20true,%20%20%20%20%20%20_closed:%20false,%20%20%20%20%20%20socket:%20[TLSSocket],%20%20%20%20%20%20_header:%20'GET%20/o/oauth2/iframerpc?action=issueToken&response_type=token%20id_token&login_hint=AJDLj6LQu-SMCQLMJfOUep6S7tCedfG_qMj24bXFxLEg47pl0hnHpq1Q70DmIfbxmGAFrLvVBDvc5bZ9s7I7d1TF2p1cbvrJVA&client_id=733249279899-44tchle2kaa9afr5v9ov7jbuojfr9lrq.apps.googleusercontent.com&origin=https%3A%2F%2Fhome.nest.com&scope=openid%20profile%20email%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fnest-account&ss_domain=https%3A%2F%2Fhome.nest.com&include_granted_scopes=true%20HTTP/1.1\r\n'%20+%20%20%20%20%20%20%20%20'Accept:%20application/json,%20text/plain,%20*/*\r\n'%20+%20%20%20%20%20%20%20%20'Sec-Fetch-Mode:%20cors\r\n'%20+%20%20%20%20%20%20%20%20'User-Agent:%20Mozilla/5.0%20(Macintosh;%20Intel%20Mac%20OS%20X%2010_15_0)%20AppleWebKit/537.36%20(KHTML,%20like%20Gecko)%20Chrome/77.0.3865.120%20Safari/537.36\r\n'%20+%20%20%20%20%20%20%20%20'X-Requested-With:%20XmlHttpRequest\r\n'%20+%20%20%20%20%20%20%20%20'Referer:%20https://accounts.google.com/o/oauth2/iframe\r\n'%20+%20%20%20%20%20%20%20%20'cookie:%20NID=511=qEORQg3Z7i5sdgZW1C9xbS12IN8jkuZqVZ0Eupl-fYDmwZJeiSpnJIyG1FPKekqR10M7OR0Q6iJ8FWk_W3_O18gXwaKe5CFj1FMlu-Q_6wtJKfDNl9YBUiBNVtKrwDv0MVwBK7JJudzdzqWcoTXsEbuFk1dVps8IG3DpTSrWNgxF09R7c-J0-iB-fJc8m1Utyr2Q7Q;%20__Secure-3PSID=WQjE9LKNkqqGeEyOfDREXAyqPEGLq42rpgP0FkcAIdxMS_va4dPRJX1LdmdvbDMIqX23FA.;%20__Secure-3PAPISID=LgaqjM9Jvq9Fvltt/AcRCmYU672fu5lHzT;%20__Host-3PLSID=s.youtube:WQjE9P7n4yOB9ZxukPEeXs6WM60aqIaDGEp7pmCbW-Pu0Qu31pwdnebUS4HGt5VFha9Wng.;%20__Secure-3PSIDCC=AP8dLtxrGYTNEKQcmfFo8F6WrpJRg-NuS1iORedevHSy4pUjZFRItN8NzcO6YxyRMk1fpDwNQg\r\n'%20+%20%20%20%20%20%20%20%20'Host:%20accounts.google.com\r\n'%20+%20%20%20%20%20%20%20%20'Connection:%20close\r\n'%20+%20%20%20%20%20%20%20%20'\r\n',%20%20%20%20%20%20_keepAliveTimeout:%200,%20%20%20%20%20%20_onPendingData:%20[Function:%20nop],%20%20%20%20%20%20agent:%20[Agent],%20%20%20%20%20%20socketPath:%20undefined,%20%20%20%20%20%20method:%20'GET',%20%20%20%20%20%20maxHeaderSize:%20undefined,%20%20%20%20%20%20insecureHTTPParser:%20undefined,%20%20%20%20%20%20joinDuplicateHeaders:%20undefined,%20%20%20%20%20%20path:%20'/o/oauth2/iframerpc?action=issueToken&response_type=token%20id_token&login_hint=AJDLj6LQu-SMCQLMJfOUep6S7tCedfG_qMj24bXFxLEg47pl0hnHpq1Q70DmIfbxmGAFrLvVBDvc5bZ9s7I7d1TF2p1cbvrJVA&client_id=733249279899-44tchle2kaa9afr5v9ov7jbuojfr9lrq.apps.googleusercontent.com&origin=https%3A%2F%2Fhome.nest.com&scope=openid%20profile%20email%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fnest-account&ss_domain=https%3A%2F%2Fhome.nest.com&include_granted_scopes=true',%20%20%20%20%20%20_ended:%20false,%20%20%20%20%20%20res:%20null,%20%20%20%20%20%20aborted:%20false,%20%20%20%20%20%20timeoutCb:%20null,%20%20%20%20%20%20upgradeOrConnect:%20false,%20%20%20%20%20%20parser:%20null,%20%20%20%20%20%20maxHeadersCount:%20null,%20%20%20%20%20%20reusedSocket:%20false,%20%20%20%20%20%20host:%20'accounts.google.com',%20%20%20%20%20%20protocol:%20'https:',%20%20%20%20%20%20_redirectable:%20[Circular%20*1],%20%20%20%20%20%20[Symbol(kCapture)]:%20false,%20%20%20%20%20%20[Symbol(kBytesWritten)]:%200,%20%20%20%20%20%20[Symbol(kEndCalled)]:%20true,%20%20%20%20%20%20[Symbol(kNeedDrain)]:%20false,%20%20%20%20%20%20[Symbol(corked)]:%200,%20%20%20%20%20%20[Symbol(kOutHeaders)]:%20[Object:%20null%20prototype],%20%20%20%20%20%20[Symbol(errored)]:%20null,%20%20%20%20%20%20[Symbol(kUniqueHeaders)]:%20null%20%20%20%20},%20%20%20%20_currentUrl:%20'https://accounts.google.com/o/oauth2/iframerpc?action=issueToken&response_type=token%20id_token&login_hint=AJDLj6LQu-SMCQLMJfOUep6S7tCedfG_qMj24bXFxLEg47pl0hnHpq1Q70DmIfbxmGAFrLvVBDvc5bZ9s7I7d1TF2p1cbvrJVA&client_id=733249279899-44tchle2kaa9afr5v9ov7jbuojfr9lrq.apps.googleusercontent.com&origin=https%3A%2F%2Fhome.nest.com&scope=openid%20profile%20email%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fnest-account&ss_domain=https%3A%2F%2Fhome.nest.com&include_granted_scopes=true',%20%20%20%20_timeout:%20null,%20%20%20%20[Symbol(kCapture)]:%20false%20%20},%20%20response:%20undefined,%20%20isAxiosError:%20true,%20%20toJSON:%20[Function:%20toJSON],%20%20status:%20undefined}[5/6/2023,%201:20:55%E2%80%AFAM]%20[Nest]%20Access%20token%20acquisition%20via%20googleAuth%20failed%20(code%20EACCES).[5/6/2023,%201:20:55%E2%80%AFAM]%20[Nest]%20Unable%20to%20authenticate%20with%20Google/Nest.[5/6/2023,%201:20:55%E2%80%AFAM]%20[Nest]%20NOTE:%20Because%20we%20couldn't%20connect%20to%20the%20Nest%20service,%20your%20Nest%20devices%20in%20HomeKit%20will%20not%20be%20responsive.

Any ideas for what the issue could be? Something new from Google? There isn't anything new in my Homebridge set up or network so I'm struggling to fix the issue. Thanks!

AaqilRazak commented 1 year ago

Apologies for bothering you, I did stop and start winnat and it is back to working!