StyraHem / ShellyForHASS

Shelly smart home platform for Home Assistant
MIT License
623 stars 112 forks source link

[BUG] Config flow could not be loaded: 500 Internal Server Error Server #719

Open lmbd opened 2 years ago

lmbd commented 2 years ago

Environment

Describe the bug

Screenshot 2022-10-04 at 19 28 46

Steps to Reproduce

Screenshots

image

Traceback/Error logs

  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 759, in async_finish_flow
    entry = ConfigEntry(
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 233, in __init__
    self.data = MappingProxyType(data)
TypeError: mappingproxy() argument must be a mapping, not NoneType
2022-10-04 19:33:43.558 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.10/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 82, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 169, in get
    return await super().get(request, flow_id)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 96, in get
    result = await self._flow_mgr.async_configure(flow_id)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 280, in async_configure
    result = await self._async_handle_step(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 400, in _async_handle_step
    result = await self.async_finish_flow(flow, result.copy())
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 759, in async_finish_flow
    entry = ConfigEntry(
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 233, in __init__
    self.data = MappingProxyType(data)
TypeError: mappingproxy() argument must be a mapping, not NoneType

Additional context

RainOrigami commented 2 years ago

I experience this as well.

Home Assistant 2022.10.1 Supervisor 2022.09.1 Operating System 9.0 Frontend 20221006.0

Log:

Logger: aiohttp.server
Source: config_entries.py:244
First occurred: 15:07:46 (2 occurrences)
Last logged: 15:08:01

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.10/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 222, 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 82, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 171, in get
    return await super().get(request, flow_id)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 96, in get
    result = await self._flow_mgr.async_configure(flow_id)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 280, in async_configure
    result = await self._async_handle_step(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 400, in _async_handle_step
    result = await self.async_finish_flow(flow, result.copy())
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 772, in async_finish_flow
    entry = ConfigEntry(
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 244, in __init__
    self.data = MappingProxyType(data)
TypeError: mappingproxy() argument must be a mapping, not NoneType
stoyanovgeorge commented 2 years ago

Same problem here. Is there a workaround? I have installed Shelly Plus 1PM and when trying to configure it, it shows me error 500.

D-Bullock commented 2 years ago

Related / duplicate #699 - I posted a workaround in that task

fudu commented 2 years ago

Same issue... Some updates?

eina84 commented 1 year ago

Also same issue. I uninstalled & removed all Shelly references then added the integration again but got the same problem again.