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

Error 403 for renault integration #68483

Closed
jugla opened this issue Mar 21, 2022 · 3 comments
Closed

Error 403 for renault integration #68483

jugla opened this issue Mar 21, 2022 · 3 comments
Assignees

Comments

@jugla
Copy link
Contributor

jugla commented Mar 21, 2022

The problem

The renault integration cannot retrieve information from kameron server :
aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url=URL('https://api-wired-prod-1-euw1.wrd-aws.com/commerce/v1/persons/4d8f7c83-027f-4ec3-8025-a975098a1fff?country=FR')

On integration creation via UI, it stucks
If integration exists, sensors are no more updated

What version of Home Assistant Core has the issue?

2022.3.5

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Core

Integration causing the issue

renault

Link to integration documentation on our website

https://www.home-assistant.io/integrations/renault/

Diagnostics information

Looks like hacf-fr/renault-api#181

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Here after the stack of exception :
`
2022-03-21 22:52:46 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File "/srv/homeassistant/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/srv/homeassistant/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
    return await handler(request)
  File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
    return await handler(request)
  File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
  File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/http/ban.py", line 79, in ban_middleware
    return await handler(request)
  File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/http/auth.py", line 219, in auth_middleware
    return await handler(request)
  File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/http/view.py", line 137, in handle
    result = await result
  File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/config/config_entries.py", line 166, in post
    return await super().post(request, flow_id)
  File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/http/data_validator.py", line 62, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/data_entry_flow.py", line 111, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
  File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/data_entry_flow.py", line 252, in async_configure
    result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
  File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/data_entry_flow.py", line 325, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
  File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/renault/config_flow.py", line 44, in async_step_user
    return await self.async_step_kamereon()
  File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/renault/config_flow.py", line 75, in async_step_kamereon
    accounts = await self.renault_hub.get_account_ids()
  File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/renault/renault_hub.py", line 107, in get_account_ids
    for account in await self._client.get_api_accounts():
  File "/srv/homeassistant/lib/python3.9/site-packages/renault_api/renault_client.py", line 58, in get_api_accounts
    response = await self.get_person()
  File "/srv/homeassistant/lib/python3.9/site-packages/renault_api/renault_client.py", line 54, in get_person
    return await self.session.get_person()
  File "/srv/homeassistant/lib/python3.9/site-packages/renault_api/renault_session.py", line 175, in get_person
    return await kamereon.get_person(
  File "/srv/homeassistant/lib/python3.9/site-packages/renault_api/kamereon/__init__.py", line 171, in get_person
    await request(
  File "/srv/homeassistant/lib/python3.9/site-packages/renault_api/kamereon/__init__.py", line 153, in request
    http_response.raise_for_status()
  File "/srv/homeassistant/lib/python3.9/site-packages/aiohttp/client_reqrep.py", line 1004, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url=URL('https://api-wired-prod-1-euw1.wrd-aws.com/commerce/v1/persons/4d8f7c83-027f-4ec3-8025-a975098a1fff?country=FR')
`

Additional information

No response

@probot-home-assistant
Copy link

renault documentation
renault source
(message by IssueLinks)

@probot-home-assistant
Copy link

Hey there @epenet, mind taking a look at this issue as it has been labeled with an integration (renault) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@epenet
Copy link
Contributor

epenet commented Mar 22, 2022

Duplicate #68251

@epenet epenet closed this as completed Mar 22, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Apr 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants