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

ConnectionResetError during Integration setup with config_flow #387

Closed
ramibouaoun opened this issue Sep 22, 2019 · 2 comments
Closed

ConnectionResetError during Integration setup with config_flow #387

ramibouaoun opened this issue Sep 22, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@ramibouaoun
Copy link

Home Assistant 0.99.2
HACS alexa_media_player 2.2.1

custom_components/alexa_media/config_flow.py
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 924, in _wrap_create_connection
await self._loop.create_connection(*args, **kwargs))
File "/usr/local/lib/python3.7/asyncio/base_events.py", line 981, in create_connection
ssl_handshake_timeout=ssl_handshake_timeout)
File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1009, in _create_connection_transport
await waiter
ConnectionResetError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 73, in async_init
return await self._async_handle_step(flow, flow.init_step, data)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 132, in _async_handle_step
result: Dict = await getattr(flow, method)(user_input)
File "/config/custom_components/alexa_media/config_flow.py", line 138, in async_step_import
return await self.async_step_user(import_config)
File "/config/custom_components/alexa_media/config_flow.py", line 192, in async_step_user
await self.login.login_with_cookie()
File "/usr/local/lib/python3.7/site-packages/alexapy/alexalogin.py", line 168, in login_with_cookie
await self.login(cookies=self._cookies)
File "/usr/local/lib/python3.7/site-packages/alexapy/alexalogin.py", line 373, in login
ssl=self._ssl)
File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 476, in _request
timeout=real_timeout
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 522, in connect
proto = await self._create_connection(req, traces, timeout)
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 854, in _create_connection
req, traces, timeout)
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 992, in _create_direct_connection
raise last_exc
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 974, in _create_direct_connection
req=req, client_error=client_error)
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 931, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host alexa.amazon.com:443 ssl:<ssl.SSLContext object at 0x7185a6f0> [None]

data_entry_flow.py ERROR
Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
resp = await task
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/real_ip.py", line 40, in real_ip_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 73, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 231, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 128, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 155, in get
return await super().get(request, flow_id)
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 78, in get
result = await self._flow_mgr.async_configure(flow_id)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 86, in async_configure
if cur_step.get("data_schema") is not None and user_input is not None:
AttributeError: 'NoneType' object has no attribute 'get'

@alandtse
Copy link
Owner

Can you explain what you were doing when this error occurred? Was this a reboot? A manual integration add?

@ramibouaoun
Copy link
Author

I was trying to configure alexa from integrations tab

@alandtse alandtse changed the title config_flow & data_entry_flow ERROR ConnectionResetError during Integration setup with config_flow Sep 23, 2019
@alandtse alandtse added the bug Something isn't working label Sep 23, 2019
alandtse added a commit that referenced this issue Sep 27, 2019
fix: fix config_flow connection handling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants