Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble on Configure #57

Closed
wunnle opened this issue Jan 14, 2025 · 10 comments

Comments

@wunnle
Copy link

wunnle commented Jan 14, 2025

Hello,

I've completed the installation/configuration steps according to the documenation using HACS.

After adding the custom integration I've entered client ID and secret then completed the authorization using the link. After that is completed, when I click configure I'm getting the following error:

"Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble"

Any idea what might be causing this?

image
image

@RogerSelwyn
Copy link
Owner

Are there any errors in the logs? Always worth looking in there.

@wunnle
Copy link
Author

wunnle commented Jan 14, 2025

You're right! I found this in the logs

`Logger: aiohttp.server
Source: /usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py:448
First occurred: 11:33:52 AM (8 occurrences)
Last logged: 11:46:27 AM

Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 477, in _handle_request
resp = await request_handler(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 567, in _handle
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/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 92, in security_filter_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 86, in ban_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware
response = await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle
result = await handler(request, **request.match_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 81, in with_admin
return await func(self, request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 262, in post
return await super().post(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 74, in wrapper
return await method(view, request, data, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 77, in post
return await self._post_impl(request, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 84, in _post_impl
result = await self._flow_mgr.async_init(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 342, in async_init
result = await self._async_handle_step(flow, flow.init_step, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 517, in _async_handle_step
result: _FlowResultT = await getattr(flow, method)(user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/ms365_todo/integration/config_flow_integration.py", line 103, in async_step_init
return await self.async_step_user()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/ms365_todo/integration/config_flow_integration.py", line 122, in async_step_user
CONF_ENTITY_NAME: self.config_entry.data[CONF_ENTITY_NAME]
^^^^^^^^^^^^^^^^^
AttributeError: 'MS365OptionsFlowHandler' object has no attribute 'config_entry'`

@RogerSelwyn
Copy link
Owner

I'll take a look

@RogerSelwyn
Copy link
Owner

What version of home Assistant are you on?

@RogerSelwyn
Copy link
Owner

Assuming you are using 2024.11.0, then you should use v1.0.1 until you upgrade to 2024.12.0 when you can use the latest version. This is my error, I missed putting the dependency in the releases are 1.0.1.

@wunnle
Copy link
Author

wunnle commented Jan 14, 2025

Actually I'm using 2024.11.3. I can upgrade to 2025.1.2 and let you know if this solved the issue

@wunnle
Copy link
Author

wunnle commented Jan 14, 2025

Working flawlessly in 2025.1.2. Thanks @RogerSelwyn

@wunnle wunnle closed this as completed Jan 14, 2025
@wunnle
Copy link
Author

wunnle commented Jan 14, 2025

Now tasks are syncing pretty much instantly, which I really like.

However all tasks are disabled and cannot be modified via HA:

image

Shall I open another issue for this, or do you think this is releated?

Here my api permissions FYI

image

@wunnle wunnle reopened this Jan 14, 2025
@RogerSelwyn
Copy link
Owner

Did you enable update in the configuration of the integration. If not reconfigure (not Configure) the integration, and re-auth.

@wunnle
Copy link
Author

wunnle commented Feb 4, 2025 via email

@wunnle wunnle closed this as completed Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants