"RuntimeError: No header in request" setting up Nest Integration (2020.12.1)

Hi,

I’m setting up a new Nest integration and I believe I’ve followed the steps in https://www.home-assistant.io/integrations/nest correctly, however when I get to “Device Setup”, after choosing Nest, it just returns to the list of integrations.

Looking in the log, there is the following error:

2020-12-17 10:59:00 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 136, in post
return await super().post(request)
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 69, in post
result = await self._flow_mgr.async_init(
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 130, in async_init
result = await self._async_handle_step(
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 213, in _async_handle_step
result: Dict = await getattr(flow, method)(user_input)
File "/usr/src/homeassistant/homeassistant/components/nest/config_flow.py", line 112, in async_step_user
return await super().async_step_user(user_input)
File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 243, in async_step_pick_implementation
return await self.async_step_auth()
File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 267, in async_step_auth
url = await self.flow_impl.async_generate_authorize_url(self.flow_id)
File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 147, in async_generate_authorize_url
redirect_uri = self.redirect_uri
File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 136, in redirect_uri
raise RuntimeError("No header in request")
RuntimeError: No header in request

I haven’t pasted the config as it is exactly what is in the example except I have my secrets in there rather than the example values.

I do already have google home and dialog flow set up successfully.

Any suggestions as to what I may have done wrong?

Thanks in advance

I just ran into this. It looks like this PR added a new header that our browser is not setting. I was using Safari and just switched to Chrome and it worked.

I just ran into this as well with Firefox when trying to add the Nest integration. It worked when I tried Chrome. I also got it to work by closing the browser completely and opening the HA page again.

When I look at the network console in Firefox developer tools I see that after the browser restart the header: HA-Frontend-Base is now populated. Before the browser restart that header wasn’t filled in on the /api/config/config_entries/flow API call.