Since i had issues several times with this integration, i've removed it and tried to add it again. After i've entered my credentials and clicked on "Submit" , this error "Unexpected error" and i'm not able to set it up again.
Logger: homeassistant.components.wolflink.config_flow
Source: components/wolflink/config_flow.py:46
Integration: Wolf SmartSet Service (documentation, issues)
First occurred: October 22, 2020, 2:08:43 PM (3 occurrences)
Last logged: 8:56:24 AM
Unexpected exception
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/wolflink/config_flow.py", line 46, in async_step_user
self.fetched_systems = await wolf_client.fetch_system_list()
File "/usr/local/lib/python3.8/site-packages/wolf_smartset/wolf_client.py", line 67, in fetch_system_list
system_list = await self.__request('get', 'api/portal/GetSystemList')
File "/usr/local/lib/python3.8/site-packages/wolf_smartset/wolf_client.py", line 33, in __request
await self.__authorize()
File "/usr/local/lib/python3.8/site-packages/wolf_smartset/wolf_client.py", line 58, in __authorize
await self.__authorize_and_session()
File "/usr/local/lib/python3.8/site-packages/wolf_smartset/wolf_client.py", line 63, in __authorize_and_session
self.session_id = await create_session(session, self.tokens.access_token)
File "/usr/local/lib/python3.8/site-packages/wolf_smartset/create_session.py", line 12, in create_session
return resp.json()['BrowserSessionId']
KeyError: 'BrowserSessionId'
Hey there @adamkrol93, mind taking a look at this issue as its been labeled with an integration (wolflink) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)
Same issue
That was a problem with changed API requirements at WOLF's side. In https://github.com/home-assistant/core/issues/41771 I have already fixed that, but I am now working on another bug.
@adamkrol93 Should we leave this issue open, until the other bugs are also fixed or do you think we can close it and track it with #41771 ?
Is fix #43351 already in HA 0.118.2 ?? I have 0.118.2 and get the Unexpected error...
It should be there. Today I will update my HA and will check if I have such issue. And also I did some improvements in case you had the integration and you had ConnectTimeout during integration setup, and this is not in 0.118.2 it was merged later.
I got this error only after few hours (all my entities are unavaible):
`Logger: homeassistant.components.wolflink
Source: components/wolflink/__init__.py:53
Integration: Wolf SmartSet Service (documentation, issues)
First occurred: 22 November 2020, 2:11:39 (6 occurrences)
Last logged: 22 November 2020, 11:23:17
Unexpected error fetching wolflink data:
Unexpected error fetching wolflink data: [Errno -3] Try again
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/httpx/_exceptions.py", line 326, in map_exceptions
yield
File "/usr/local/lib/python3.8/site-packages/httpx/_client.py", line 1502, in _send_single_request
(status_code, headers, stream, ext,) = await transport.arequest(
File "/usr/local/lib/python3.8/site-packages/httpcore/_async/connection_pool.py", line 218, in arequest
response = await connection.arequest(
File "/usr/local/lib/python3.8/site-packages/httpcore/_async/connection.py", line 92, in arequest
self.socket = await self._open_socket(timeout)
File "/usr/local/lib/python3.8/site-packages/httpcore/_async/connection.py", line 118, in _open_socket
return await self.backend.open_tcp_stream(
File "/usr/local/lib/python3.8/site-packages/httpcore/_backends/auto.py", line 44, in open_tcp_stream
return await self.backend.open_tcp_stream(
File "/usr/local/lib/python3.8/site-packages/httpcore/_backends/asyncio.py", line 243, in open_tcp_stream
return SocketStream(
File "/usr/local/lib/python3.8/contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.8/site-packages/httpcore/_exceptions.py", line 12, in map_exceptions
raise to_exc(exc) from None
httpcore.ConnectTimeout
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 144, in async_refresh
self.data = await self._async_update_data()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 132, in _async_update_data
return await self.update_method()
File "/usr/src/homeassistant/homeassistant/components/wolflink/__init__.py", line 53, in async_update_data
values = await wolf_client.fetch_value(gateway_id, device_id, parameters)
File "/usr/local/lib/python3.8/site-packages/wolf_smartset/wolf_client.py", line 111, in fetch_value
res = await self.__request('post', 'api/portal/GetParameterValues', json=data,
File "/usr/local/lib/python3.8/site-packages/wolf_smartset/wolf_client.py", line 44, in __request
resp = await self.__execute(headers, kwargs, method, path)
File "/usr/local/lib/python3.8/site-packages/wolf_smartset/wolf_client.py", line 62, in __execute
return await client.request(method, f"{BASE_URL}/{path}", *dict(kwargs, headers=Headers(headers)))
File "/usr/local/lib/python3.8/site-packages/httpx/_client.py", line 1371, in request
response = await self.send(
File "/usr/local/lib/python3.8/site-packages/httpx/_client.py", line 1406, in send
response = await self._send_handling_auth(
File "/usr/local/lib/python3.8/site-packages/httpx/_client.py", line 1444, in _send_handling_auth
response = await self._send_handling_redirects(
File "/usr/local/lib/python3.8/site-packages/httpx/_client.py", line 1476, in _send_handling_redirects
response = await self._send_single_request(request, timeout)
File "/usr/local/lib/python3.8/site-packages/httpx/_client.py", line 1502, in _send_single_request
(status_code, headers, stream, ext,) = await transport.arequest(
File "/usr/local/lib/python3.8/contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.8/site-packages/httpx/_exceptions.py", line 343, in map_exceptions
raise mapped_exc(message, *kwargs) from exc # type: ignore
httpx.ConnectTimeout`
Ok. So wait a second when this PR https://github.com/home-assistant/core/pull/43418 will be in dev branch (next release I guess). I am guessing that this is a problem that I imported wrong exception ConnectTimeout.
I am expecting httpcore.ConnectTimeout and library raises httpx.ConnectTimeout. I that PR i fixed this package issue and it should solve this problem.
Most helpful comment
Ok. So wait a second when this PR https://github.com/home-assistant/core/pull/43418 will be in dev branch (next release I guess). I am guessing that this is a problem that I imported wrong exception ConnectTimeout.
I am expecting httpcore.ConnectTimeout and library raises httpx.ConnectTimeout. I that PR i fixed this package issue and it should solve this problem.