`google_assistant` step broken: `AUTH_CODE_EXCHANGE`, also intents with `EXECUTION_GAL_NOT_FOUND`
suvl opened this issue · 4 comments
The problem
Yesterday I upgraded from 2024.7 to 2024.10 and the google_assistant
integration immediately broke.
On the cloud's side I started observing action results failing with EXECUTION_GAL_NOT_FOUND
:
As well as SMART_HOME_QUERY
s failing.
No relevant logs on the container's side. Well, actually, no relevant logs at all.
Then today I tried to unlink the Actions integration from my Google Home, and then while trying to add it back I get a failure on the AUTH_CODE_EXCHANGE oauth step.
The trouble seems to be that home assistant is returning a 403 status code with an HTML body instead of the proper oauth JSON response.
Trying to build on that 403 unauthorized status code, I have even reviewed my Action configuration and checked that, in step 2 of Google Cloud Platform configuration, we can read:
Client ID: https://oauth-redirect.googleusercontent.com/r/[YOUR_PROJECT_ID]. (Replace [YOUR_PROJECT_ID] with your project ID from above)
However, the first time I set this up back in 2020 the Client ID was only https://oauth-redirect.googleusercontent.com/
so I figured that could be the source of the unauthorized response. The print screen we see below in step 8 of those docs still refers to the old setting, but nevertheless it was worth a try.
But the same result remains, and hassio is still returning a 403 while account linking. Going back to the "old config" does not fix the problem.
Also checked my service account permissions, the service account key is still valid.
What version of Home Assistant Core has the issue?
core-2024.10.3
What was the last working version of Home Assistant Core?
core-2024.7.3
What type of installation are you running?
Home Assistant Container
Integration causing the issue
Google Assistant
Link to integration documentation on our website
https://www.home-assistant.io/integrations/google_assistant/
Diagnostics information
Integration does not provide diagnostics information.
Example YAML snippet
# this is my config piece:
google_assistant:
# https://oauth-redirect.googleusercontent.com/r/homeautomation-2aa56
project_id: homeautomation-2aa56
service_account: !include service_account.json
report_state: true
expose_by_default: true
exposed_domains:
- camera
- climate
- cover
- event
- group
- input_boolean
- input_select
- light
- media_player
- sensor
- scene
- script
- select
- switch
Anything in the logs that might be useful for us?
These are relevant logs, but from the google cloud's side:
// for EXECUTION_GAL_NOT_FOUND
{
"insertId": "h8gx64fdro19z",
"jsonPayload": {
"executionLog": {
"executionResults": [
{
"latencyMsec": "16",
"actionResults": [
{
"device": {
"deviceType": "LIGHT"
},
"status": {
"isSuccess": false,
"externalDebugString": "Failed to add authorization token to the HTTP header.",
"statusType": "EXECUTION_GAL_NOT_FOUND"
},
"action": {
"actionType": "STATE_QUERY"
}
},
{
"action": {
"actionType": "STATE_QUERY"
},
"device": {
"deviceType": "LIGHT"
},
"status": {
"externalDebugString": "Failed to add authorization token to the HTTP header.",
"statusType": "EXECUTION_GAL_NOT_FOUND",
"isSuccess": false
}
},
{
"device": {
"deviceType": "LIGHT"
},
"status": {
"statusType": "EXECUTION_GAL_NOT_FOUND",
"isSuccess": false,
"externalDebugString": "Failed to add authorization token to the HTTP header."
},
"action": {
"actionType": "STATE_QUERY"
}
},
{
"status": {
"externalDebugString": "Failed to add authorization token to the HTTP header.",
"statusType": "EXECUTION_GAL_NOT_FOUND",
"isSuccess": false
},
"device": {
"deviceType": "LIGHT"
},
"action": {
"actionType": "STATE_QUERY"
}
}
],
"executionType": "PARTNER_CLOUD",
"requestId": "8814767232391872181"
}
]
},
"locale": "en-US"
},
"resource": {
"type": "assistant_action_project",
"labels": {
"project_id": "homeautomation-2aa56"
}
},
"timestamp": "2024-10-18T22:22:53.995835002Z",
"severity": "ERROR",
"logName": "projects/homeautomation-2aa56/logs/assistant_smarthome%2Fassistant_smarthome_logs",
"receiveTimestamp": "2024-10-18T22:22:53.995835002Z"
}
// for AUTH_CODE_EXCHANGE
{
"insertId": "jpy20bc4u2",
"jsonPayload": {
"errorReason": "Can't parse the response. The response needs to be JSON format.",
"step": "AUTH_CODE_EXCHANGE",
"response": {
"status": 403,
"body": "<!DOCTYPE html><html lang=\"en-US\"><head><title>Just a moment...</title><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"><meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge\"><meta name=\"robots\" content=\"noindex,nofollow\"><meta name=\"viewport\" content=\"width=device-width,initial-scale=1\"><style>*{box-sizing:border-box;margin:0;padding:0}html{line-height:1.15;-webkit-text-size-adjust:100%;color:#313131;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}body{display:flex;flex-direction:column;height:100vh;min-height:100vh}.main-content{margin:8rem auto;max-width:60rem;padding-left:1.5rem}@media (width <= 720px){.main-content{margin-top:4rem}}.h2{font-size:1.5rem;font-weight:500;line-height:2.25rem}@media (width <= 720px){.h2{font-size:1.25rem;line-height:1.5rem}}#challenge-error-text{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iI0IyMEYwMyIgZD0iTTE2IDNhMTMgMTMgMCAxIDAgMTMgMTNBMTMuMDE1IDEzLjAxNSAwIDAgMCAxNiAzbTAgMjRhMTEgMTEgMCAxIDEgMTEtMTEgMTEuMDEgMTEuMDEgMCAwIDEtMTEgMTEiLz48cGF0aCBmaWxsPSIjQjIwRjAzIiBkPSJNMTcuMDM4IDE4LjYxNUgxNC44N0wxNC41NjMgOS41aDIuNzgzem0tMS4wODQgMS40MjdxLjY2IDAgMS4wNTcuMzg4LjQwNy4zODkuNDA3Ljk5NCAwIC41OTYtLjQwNy45ODQtLjM5Ny4zOS0xLjA1Ny4zODktLjY1IDAtMS4wNTYtLjM4OS0uMzk4LS4zODktLjM5OC0uOTg0IDAtLjU5Ny4zOTgtLjk4NS40MDYtLjM5NyAxLjA1Ni0uMzk3Ii8+PC9zdmc+);background-repeat:no-repeat;background-size:contain;padding-left:34px}@media (prefers-color-scheme:dark){body{background-color:#222;color:#d9d9d9}}</style><meta http-equiv=\"refresh\" content=\"390\"></head><body class=\"no-js\"><div class=\"main-wrapper\" role=\"main\"><div class=\"main-content\"><noscript><div class=\"h2\"><span id=\"challenge-error-text\">Enable JavaScript and cookies to continue</span></div></noscript></div></div><script>(function(){window._cf_chl_opt={cvId: '3',cZone: \"<REDACTED>\",cType: 'managed',cNounce: '55840',cRay: '8d50535adf156ec6',cHash: '64c1d982ccd09cb',cH: 'of7vKPW1mrtgwrAWinlyOr17P8KrsLUFlF9galiD8qs-1729336267-1.1.1.1-PXpZphJnIIt.iCB9a1DgSuCISeXMpbOoUP3NiM_Sj7nZkj8_iOXPk1pGQ.3AYEve',cUPMDTk: \"\\/auth\\/token?__cf_chl_tk=(…)\",cFPWv: 'b',cITimeS: '1729336267',cTTimeMs: '1000',cMTimeMs: '390000',cTplV: 5,cTplB: 'cf',cK: \"\",fa: \"\\/auth\\/token?(…)\",md: \"(…)\",mdrd: \"
(…)\",cRq: {ru: 'aHR0cHM6Ly9ob21lLmp0c29hci5lcw==',ra: 'T3BlbkF1dGg=',d: '(…)',cT: Math.floor(Date.now() / 1000),m: '(…)/ymBY=',i1: '…==',i2: '…==',zh: '…=',uh: '…=',hh: '…',}};var cpo = document.createElement('script');cpo.src = '/cdn-cgi/challenge-platform/h/b/orchestrate/chl_page/v1?ray=8d50535adf156ec6';window._cf_chl_opt.cOgUHash = location.hash === '' && location.href.indexOf('#') !== -1 ? '#' : location.hash;window._cf_chl_opt.cOgUQuery = location.search === '' && location.href.slice(0, location.href.length - window._cf_chl_opt.cOgUHash.length).indexOf('?') !== -1 ? '?' : location.search;if (window.history && window.history.replaceState) {var ogU = location.pathname + window._cf_chl_opt.cOgUQuery + window._cf_chl_opt.cOgUHash;history.replaceState(null, null, \"\\/auth\\/token?__cf_chl_rt_tk=YIdN4ljnsVYseZBj.PEFx2D13OkbzpgzhMVpoYh97Qk-1729336267-1.0.1.1-PgzHEApQ8NmFXjvm6anuPouSSvZGD2RTFXJufaaQ8.M\" + window._cf_chl_opt.cOgUHash);cpo.onload = function() {history.replaceState(null, null, ogU);}}document.getElementsByTagName('head')[0].appendChild(cpo);}());</script></body></html>"
},
"@type": "type.googleapis.com/google.identity.accountlinking.type.AccountLinkingError"
},
"resource": {
"type": "assistant_action_project",
"labels": {
"project_id": "homeautomation-2aa56"
}
},
"timestamp": "2024-10-19T11:11:08.067Z",
"severity": "ERROR",
"logName": "projects/homeautomation-2aa56/logs/accountlinking-pa.googleapis.com%2Ferror",
"receiveTimestamp": "2024-10-19T11:11:08.535227004Z"
}
Additional information
could not find google docs explaining EXECUTION_GAL_NOT_FOUND, but for AUTH_CODE_EXCHANGE we have https://developers.google.com/identity/account-linking/error-logs-monitoring
Hey there @home-assistant/cloud, mind taking a look at this issue as it has been labeled with an integration (google_assistant
) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of google_assistant
can trigger bot actions by commenting:
@home-assistant close
Closes the issue.@home-assistant rename Awesome new title
Renames the issue.@home-assistant reopen
Reopen the issue.@home-assistant unassign google_assistant
Removes the current integration label and assignees on the issue, add the integration domain after the command.@home-assistant add-label needs-more-information
Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.@home-assistant remove-label needs-more-information
Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.
(message by CodeOwnersMention)
google_assistant documentation
google_assistant source
(message by IssueLinks)