Pyhass / Hive-Custom-Component

A custom version of the home assistant hive component
MIT License
33 stars 17 forks source link

Unknown error occurred - trying to authenticate integration [BUG] #113

Closed alexanderjgblair closed 2 years ago

alexanderjgblair commented 2 years ago

Describe the bug The integration had been running flawlessly for me, but had an error pop up with authentication, and as trouble shooting step I deleted the integration and then tried to set it up again. I can enter credentials, and it then sends the 2FA code, once I enter the 2FA code in and press submit, I get an unknown error occurred message

To Reproduce Steps to reproduce the behaviour:

  1. Go to 'Add Integration'
  2. Click on 'Hive'
  3. Enter Username and Password
  4. Click Submit
  5. Enter 2FA code sent to phone
  6. Click Submit
  7. Error Appears above 2FA textbox

Expected behaviour Be able to log in and see devices/assign devices to areas.

Screenshots

Screenshot 2022-06-02 at 23 23 50

Desktop (please complete the following information):

Additional context Have tried uninstalling and reinstalling HACS custom component, refresh/rebooting server etc. Cleared Browser/Cache, and changed password to be something without any special characters to ensure nothing would be throwing hissy fit there.

Logs with error are below: Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request resp = await request_handler(request) File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle resp = await handler(request) File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 117, in impl return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 79, in ban_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 220, in auth_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 137, in handle result = await result File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 205, in post return await super().post(request, flow_id) File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 62, in wrapper result = await method(view, request, *args, **kwargs) File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 109, in post result = await self._flow_mgr.async_configure(flow_id, data) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 260, in async_configure result = await self._async_handle_step( File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 335, in _async_handle_step result: FlowResult = await getattr(flow, method)(user_input) File "/usr/src/homeassistant/homeassistant/components/hive/config_flow.py", line 91, in async_step_2fa return await self.async_setup_hive_entry() File "/usr/src/homeassistant/homeassistant/components/hive/config_flow.py", line 106, in async_setup_hive_entry self.data["device_data"] = await self.hive_auth.getDeviceData() AttributeError: 'HiveAuthAsync' object has no attribute 'getDeviceData'

Any help would be appreciated!

alexanderjgblair commented 2 years ago

@KJonline - This may be a duplicate issue of 70465 feel free to link/close if it is the case!

KJonline commented 2 years ago

This is fixed in the latest version