Skip to content
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

After upgrade to 118 broken OAuth2 with aiohttp 3.7.1 #43425

Closed
tayanov opened this issue Nov 20, 2020 · 16 comments
Closed

After upgrade to 118 broken OAuth2 with aiohttp 3.7.1 #43425

tayanov opened this issue Nov 20, 2020 · 16 comments

Comments

@tayanov
Copy link

tayanov commented Nov 20, 2020

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 #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
#42305

Additional information

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

@megachammer
Copy link

megachammer commented Nov 20, 2020

Same problem. Had to downgrade core to 117.6

@AntoxaSa
Copy link

the same problem, authorization fails.

@Blacksli
Copy link

I confirm the problem.

@rust-resisting
Copy link

the same problem

@Shulyaka
Copy link
Contributor

I have the following error in the logs on attempt to flip a switch from yandex station, probably it is related:

Nov 19 20:47:29 shulyaka hass[15355]: 2020-11-19 23:47:29 DEBUG (MainThread) [homeassistant.components.http.view] Serving /auth/token to 5.45.207.7 (auth: False)

@Shulyaka
Copy link
Contributor

I also can confirm that downgrading to aiohttp-3.6.3 resolves the issue.

@Ljar68
Copy link

Ljar68 commented Nov 20, 2020

similar problem

@sala2000
Copy link

I have the same, had to go downgrade HA to 117.6

@mrNumb
Copy link

mrNumb commented Nov 20, 2020

++

@MartinHjelmare
Copy link
Member

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

@Shulyaka
Copy link
Contributor

@MartinHjelmare I think the issue was raised here as a "buggy aiohttp core dependency", not exactly as "we have an issue with the custom code", which could be true of course but not obvious. There is a separate issue for the custom component.

@tayanov
Copy link
Author

tayanov commented Nov 20, 2020

Мы не отслеживаем проблемы с пользовательской интеграцией в этом средстве отслеживания проблем.

in your opinion aiohttp is custom integration? broken auth method

@MartinHjelmare
Copy link
Member

We need information and log info from home assistant that shows the problem where no custom integration is used to be able to solve it. Please open a new issue when you can provide that.

@db0nd
Copy link

db0nd commented Nov 20, 2020

This is the problem of problems. All voice control fell apart. And the authority of HA in the eyes of my family members fell as never before (((

@AlexxIT
Copy link

AlexxIT commented Nov 21, 2020

@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:

aio-libs/aiohttp#4506

@ARNik
Copy link

ARNik commented Nov 23, 2020

The same problem!

@github-actions github-actions bot locked and limited conversation to collaborators Dec 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests