home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
69.71k stars 28.87k forks source link

Xbox integration can not load of refresh #120865

Open XalaTheShepard opened 2 days ago

XalaTheShepard commented 2 days ago

The problem

Dear, Starting today, the Xbox integration failed to load and refresh. Deleting the integration and readding it does also not solve the issue. Logs are included.

What version of Home Assistant Core has the issue?

2024.6.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

XBox

Link to integration documentation on our website

https://www.home-assistant.io/integrations/xbox/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.config_entries
Source: config_entries.py:594
First occurred: 4:32:59 PM (3 occurrences)
Last logged: 4:35:45 PM

Error setting up entry Home Assistant Cloud for xbox
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/xbox/__init__.py", line 48, in async_setup_entry
    consoles: SmartglassConsoleList = await client.smartglass.get_console_list()
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/xbox/webapi/api/provider/smartglass/__init__.py", line 54, in get_console_list
    resp = await self._fetch_list("devices", params, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/xbox/webapi/api/provider/smartglass/__init__.py", line 359, in _fetch_list
    resp = await self.client.session.get(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/xbox/webapi/api/client.py", line 86, in get
    return await self.request(hdrs.METH_GET, url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/xbox/webapi/api/client.py", line 60, in request
    await self._auth_mgr.refresh_tokens()
  File "/usr/src/homeassistant/homeassistant/components/xbox/api.py", line 28, in refresh_tokens
    await self._oauth_session.async_ensure_token_valid()
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 531, in async_ensure_token_valid
    new_token = await self.implementation.async_refresh_token(self.token)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 103, in async_refresh_token
    new_token = await self._async_refresh_token(token)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/cloud/account_link.py", line 140, in _async_refresh_token
    new_token = await account_link.async_fetch_access_token(
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/hass_nabucasa/account_link.py", line 122, in async_fetch_access_token
    resp.raise_for_status()
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 1070, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 500, message='Internal Server Error', url=URL('https://account-link.nabucasa.com/refresh_token/xbox')

Additional information

No response

home-assistant[bot] commented 2 days ago

Hey there @hunterjm, mind taking a look at this issue as it has been labeled with an integration (xbox) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `xbox` 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 xbox` 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)


xbox documentation xbox source (message by IssueLinks)

XalaTheShepard commented 2 days ago

Dear,

Please close the ticket. I had to change my password die to a security breach of my Microsoft account, and forget that to update the 2FA.

Kind regards,

Robin