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

Unknown Error occurred when setting up integration #165

Closed
kjetilpp opened this issue Mar 22, 2022 · 5 comments · Fixed by #166
Closed

Unknown Error occurred when setting up integration #165

kjetilpp opened this issue Mar 22, 2022 · 5 comments · Fixed by #166
Labels
bug Something isn't working teslajsonpy Issue with dependency

Comments

@kjetilpp
Copy link

kjetilpp commented Mar 22, 2022

Whenever I try to add the integration to my Home Assistant I get "Unknown Error occurred".
I have tried two different tesla accounts on two different home assistant installations so I suspect tesla may have changed something on their side.

Here's the log entry:

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.9/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 79, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 219, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 137, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 166, in post
    return await super().post(request, flow_id)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 62, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 111, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 252, in async_configure
    result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 325, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
  File "/config/custom_components/tesla_custom/config_flow.py", line 63, in async_step_user
    info = await validate_input(self.hass, user_input)
  File "/config/custom_components/tesla_custom/config_flow.py", line 182, in validate_input
    result = await controller.connect(test_login=True)
  File "/usr/local/lib/python3.9/site-packages/teslajsonpy/controller.py", line 393, in connect
    cars = await self.get_vehicles()
  File "/usr/local/lib/python3.9/site-packages/backoff/_async.py", line 133, in retry
    ret = await target(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/teslajsonpy/controller.py", line 523, in get_vehicles
    return (await self.api("VEHICLE_LIST"))["response"]
  File "/usr/local/lib/python3.9/site-packages/teslajsonpy/controller.py", line 171, in wake_up
    result = await wrapped(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/teslajsonpy/controller.py", line 1754, in api
    return await self.__connection.post("", method="get", data=kwargs, url=uri)
  File "/usr/local/lib/python3.9/site-packages/teslajsonpy/connection.py", line 162, in post
    access_token=auth["access_token"], expires_in=auth["expires_in"]
KeyError: 'access_token'

Running Home Assistant core-2022.3.6
Integration version 1.6.1

@haakonhh
Copy link

I am also experiencing exactly the same behavior today! :(

@jwelt91
Copy link

jwelt91 commented Mar 22, 2022

Having the same issues setting up a new Home Assistance Instance

@wayneclancy
Copy link

Exactly the same issues. Tried a 1.60 rollback too. Home Assistant 2022.3.6

@alandtse
Copy link
Owner

Change to API is discussed here. timdorr/tesla-api#548

@alandtse alandtse added bug Something isn't working teslajsonpy Issue with dependency labels Mar 22, 2022
alandtse added a commit that referenced this issue Mar 23, 2022
Removes deprecated get_bearer_step
closes #165
alandtse added a commit that referenced this issue Mar 23, 2022
fix: bump teslajsonpy to 1.9.0
@alandtse
Copy link
Owner

Grab 1.6.2 if you're having this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working teslajsonpy Issue with dependency
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants