mitch-dc / volkswagen_we_connect_id

Apache License 2.0
195 stars 51 forks source link

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

Open cmd85 opened 2 months ago

cmd85 commented 2 months ago

Version of the custom_component

Installation method (hacs / manual)

hacs

Installation method of hass (venv, docker, hassio,...)

Configuration

HACS


## Describe the bug

We connect stopped working, tried removing it and set it up again and stuck here:
Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble

## Debug log

Logger: homeassistant.util.package
Source: util/package.py:123
First occurred: June 9, 2024 at 12:01:56 PM (3 occurrences)
Last logged: June 9, 2024 at 12:02:00 PM

Unable to install package weconnect==0.59.5: ERROR: Cannot install weconnect==0.59.5 because these package versions have conflicting dependencies. ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

```text

Logger: aiohttp.server
Source: /usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py:421
First occurred: 3:54:15 PM (3 occurrences)
Last logged: 4:18:33 PM

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, 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 85, 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/http/data_validator.py", line 70, in wrapper
    return await method(view, request, data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 172, in post
    return await self._post_impl(request, data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 179, in _post_impl
    return await super()._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/config_entries.py", line 1262, in async_init
    flow, result = await self._async_init(flow_id, handler, context, data)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1282, in _async_init
    flow = await self.async_create_flow(handler, context=context, data=data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1418, in async_create_flow
    handler = await _async_get_flow_handler(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2776, in _async_get_flow_handler
    await _load_integration(hass, domain, hass_config)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2753, in _load_integration
    await async_process_deps_reqs(hass, hass_config, integration)
  File "/usr/src/homeassistant/homeassistant/setup.py", line 561, in async_process_deps_reqs
    await requirements.async_get_integration_with_requirements(
  File "/usr/src/homeassistant/homeassistant/requirements.py", line 54, in async_get_integration_with_requirements
    return await manager.async_get_integration_with_requirements(domain)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/requirements.py", line 176, in async_get_integration_with_requirements
    await self._async_process_integration(integration, done)
  File "/usr/src/homeassistant/homeassistant/requirements.py", line 192, in _async_process_integration
    await self.async_process_requirements(
  File "/usr/src/homeassistant/homeassistant/requirements.py", line 274, in async_process_requirements
    self._raise_for_failed_requirements(name, missing)
  File "/usr/src/homeassistant/homeassistant/requirements.py", line 302, in _raise_for_failed_requirements
    raise RequirementsNotFound(integration, [req])
homeassistant.requirements.RequirementsNotFound: Requirements for volkswagen_we_connect_id not found: ['weconnect==0.59.5'].
dewet22 commented 2 months ago

I've worked around it by editing custom_components/volkswagen_we_connect_id/manifest.json and updating the dependency on weconnect to the latest version (0.60.3) which seems to work fine.

cmd85 commented 2 months ago

Ok, can you post how your edits looked like so I can copy it? :)

dewet22 commented 2 months ago

You just need to update the requirements key:

  "requirements": ["weconnect==0.60.3", "ascii_magic>=2.0.0"],
prezervos commented 2 months ago

After newest update v0.2.3, I have problem with weconnect package version.:

Setup failed for custom integration 'volkswagen_we_connect_id': Requirements for volkswagen_we_connect_id not found: ['weconnect==0.60.3'].
dewet22 commented 2 months ago

@prezervos works for me 🤷 and weconnect 0.60.3 is definitely published on pypi – there might be something about your particular setup that's preventing it being found (network problem, other add-ons with clashing dependencies). I didn't realise there was a new version - 0.2.3 just showed up in HACS for me just now (I was on 0.2.0) and the update worked fine.

prezervos commented 2 months ago

@dewet22 Thank you for info. I will edit the version in manifest to 0.60.2, this is installed currently .

cmd85 commented 2 months ago

Awesome, thx for the help everyone and for a great addon!

bagges commented 2 months ago

After newest update v0.2.3, I have problem with weconnect package version.:

Setup failed for custom integration 'volkswagen_we_connect_id': Requirements for volkswagen_we_connect_id not found: ['weconnect==0.60.3'].

same here. had to downgrade to 0.60.2

uougaard commented 2 months ago

Version 0.2.3 was made because of conflicts betweeen version 0.2.2 and home Assistant Core version 2024.6.x - Have you upgraded your home assistant core to version 2024.6.x - if not, that could be the reason

bagges commented 2 months ago

Yes I am still on 2024.5.x. I'll try to upgrade.

EDIT: yes, 2024.6.x fixed the issue. Thanks!

Ephigenia commented 2 months ago

I can also confirm that upgrading to 2024.6.x fixed the issue.