core: After upgrade to 118 broken OAuth2 with aiohttp 3.7.1

The problem

Environment

  • Home Assistant Core release with the issue: 118
  • Last working Home Assistant Core release (if known): 117.6
  • Operating environment (OS/Container/Supervised/Core): debian
  • Integration causing this issue: https://github.com/dmitry-k/yandex_smart_home
  • Link to integration documentation on our website:

Problem-relevant configuration.yaml


Traceback/Error logs

custom not have error, broken OAuth2 after https://github.com/home-assistant/core/pull/42305 trouble with aiohttp 3.7.1 version library old version as 3.5 work normally with this version aiohttp 3.7.1 not worked Oauth2 authorization foк request and refresh token.

Integration cant pass authorization. and show error some Attempt to login or request with invalid authentication from a0d7b954-nginxproxymanager.local.hass.io (172.30.33.3) (Mozilla / 5.0 (Windows NT 6.2; WOW64) AppleWebKit / 536.5 (KHTML like Gecko) YaBrowser / 1.0.1084.5402 Chrome / 19.0 .1084.5409 Safari / 536.5) trouble after this pull https://github.com/home-assistant/core/pull/42305

Additional information

There are a lot of people using this integration. and nothing depends on the author of the component

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 32
  • Comments: 16 (5 by maintainers)

Most upvoted comments

@MartinHjelmare don’t worry. Problem on the side of Yandex servers.

New aiohttp uses new compression params (wbits) for Content-Encoding: deflate compression. There are no mistakes.

Yandex servers, for some unknown reason, cannot read the response /auth/token with this new compression.

https://docs.python.org/3/library/zlib.html#zlib.compressobj

aiohttp==3.6.2

https://github.com/aio-libs/aiohttp/blob/v3.6.2/aiohttp/web_response.py#L683-L684

aiohttp==3.7.1

https://github.com/aio-libs/aiohttp/blob/v3.7.1/aiohttp/web_response.py#L736-L738

I made a fix to disable compression in Home Assistant and everything works:

https://github.com/AlexxIT/yandex_smart_home_fix

Thanks to @Anonym-tsk here description whats happened with deflate compression:

https://github.com/aio-libs/aiohttp/issues/4506

We don’t track issues with custom integrations in this issue tracker.