Drakulix / googlehome

Google Home Integration for Home-Assistant
Apache License 2.0
29 stars 3 forks source link

"Unknown error occurred" during config flow #18

Open cicero200272 opened 3 years ago

cicero200272 commented 3 years ago

After entering email + password the config flow stops with an "unknown error occurred" message. The log shows

2021-01-04 10:36:03 ERROR (MainThread) [aiohttp.server] Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request resp = await self._request_handler(request) File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle resp = await handler(request) File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 118, in impl return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 18, in request_context_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 72, in ban_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 127, in auth_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 129, in handle result = await result File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 169, in post return await super().post(request, flow_id) File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 60, in wrapper result = await method(view, request, *args, **kwargs) File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 106, in post result = await self._flow_mgr.async_configure(flow_id, data) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 155, in async_configure result = await self._async_handle_step(flow, cur_step["step_id"], user_input) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 213, in _async_handle_step result: Dict = await getattr(flow, method)(user_input) File "/config/custom_components/googlehome/config_flow.py", line 31, in async_step_user if user_input[CONF_MASTER_TOKEN]: KeyError: 'master_token'

Drakulix commented 3 years ago

Can you try the current master version? (Just select "Reinstall" for the component in hacs and manually select "master" as the version to install.)

I have pushed a fix for this error. If it works for you, I will quickly push a 0.4.1 version.

cicero200272 commented 3 years ago

Thanks, that worked, but error is now "login failed". Nothing in the log.

Drakulix commented 3 years ago

You are likely encountering the same issue, people are having in #14. You can try to work around it by generating a master token on your pc and logging into the integration using that instead of a password.

hugostegeman commented 3 years ago

hey i have the same login failed error how can i make the master token for my google account?