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

Integration Setup Unknown error occurred #128382

Closed
GtAnders opened this issue Oct 14, 2024 · 23 comments
Closed

Integration Setup Unknown error occurred #128382

GtAnders opened this issue Oct 14, 2024 · 23 comments

Comments

@GtAnders
Copy link

The problem

Integration Setup is not working. Gets Unknown erroor occurred.

What version of Home Assistant Core has the issue?

2024.10.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

2024.10.0

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

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

Code owner commands

Code owners of vicare can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign vicare Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


vicare documentation
vicare source
(message by IssueLinks)

@CFenner
Copy link
Contributor

CFenner commented Oct 14, 2024

Please Share log and diagnostic file.

@GtAnders
Copy link
Author

GtAnders commented Oct 15, 2024 via email

@GtAnders
Copy link
Author

Please Share log and diagnostic file.

Hello @CFenner!

Is it something more you need from me?

Best Regards

//Anders

@CFenner
Copy link
Contributor

CFenner commented Oct 24, 2024

Yes, the diagnostic file. Select the vicare integration, click '...' and download diagnostic file.

My is my name in your log file..

'statusCode': 401, 'errorType': 'UNAUTHORIZED', 'message': 'Request contain invalid token', 'error': 'NO TOKEN AVAILABLE'} Den 14 okt. 2024 21:19, kI 21:19, Christopher Fenner ***@***.***> skrev:

@GtAnders
Copy link
Author

GtAnders commented Oct 24, 2024 via email

@CFenner
Copy link
Contributor

CFenner commented Oct 24, 2024

The credentials seem to be invalid. There is no valid token generated.

@GtAnders
Copy link
Author

GtAnders commented Oct 24, 2024 via email

@CFenner
Copy link
Contributor

CFenner commented Oct 24, 2024

The token is generated from username password and clientID in PyViCare. You do not need to create a token yourself.

@CFenner
Copy link
Contributor

CFenner commented Oct 24, 2024

Just the clientID

@GtAnders
Copy link
Author

GtAnders commented Oct 24, 2024 via email

@CFenner
Copy link
Contributor

CFenner commented Oct 24, 2024

Can you post the log again, what is the error now?

It could be that your clientID is not activated yet or deactivated due to API plan change.

@GtAnders
Copy link
Author

GtAnders commented Oct 24, 2024 via email

@GtAnders
Copy link
Author

GtAnders commented Oct 24, 2024 via email

@CFenner
Copy link
Contributor

CFenner commented Oct 24, 2024

Please verify that you use the same Account for ViCare app, ViCare Developer Portal and ViCare Home Assistant integration.

So the ClientID must be created with the account that is linked to your heating device.

@GtAnders
Copy link
Author

GtAnders commented Oct 25, 2024 via email

@FrancescoFdd5
Copy link

I have the same issue

@MrAurik
Copy link

MrAurik commented Dec 13, 2024

Same here, Have you found something ? :-)

@CFenner
Copy link
Contributor

CFenner commented Dec 13, 2024

You both have also NO TOKEN AVAILABLE in the logs?

PyViCare.PyViCareUtils.PyViCareInvalidDataError: {'viErrorId': 'req-7714ee57915e46889fe83e6a84551508', 'statusCode': 401, 'errorType': 'UNAUTHORIZED', 'message': 'Request contain invalid token', 'error': 'NO TOKEN AVAILABLE'}

@MrAurik
Copy link

MrAurik commented Dec 17, 2024

Hello.

Yes it seems to :

`Logger: aiohttp.server
Source: /usr/local/lib/python3.13/site-packages/aiohttp/web_protocol.py:451
First occurred: 06:47:59 (2 occurrences)
Last logged: 06:48:44

Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/aiohttp/web_protocol.py", line 480, in _handle_request
resp = await request_handler(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/aiohttp/web_app.py", line 569, in _handle
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/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 210, 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 222, in post
return await super().post(request, flow_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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 122, in post
result = await self._flow_mgr.async_configure(flow_id, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 367, in async_configure
result = await self._async_configure(flow_id, user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 414, 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 517, in _async_handle_step
result: _FlowResultT = await getattr(flow, method)(user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/vicare/config_flow.py", line 65, in async_step_user
await self.hass.async_add_executor_job(
vicare_login, self.hass, user_input
)
File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/vicare/init.py", line 69, in vicare_login
vicare_api.initWithCredentials(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
entry_data[CONF_USERNAME],
^^^^^^^^^^^^^^^^^^^^^^^^^^
...<2 lines>...
hass.config.path(STORAGE_DIR, _TOKEN_FILENAME),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/local/lib/python3.13/site-packages/PyViCare/PyViCare.py", line 25, in initWithCredentials
self.initWithExternalOAuth(ViCareOAuthManager(
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
username, password, client_id, token_file))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/PyViCare/PyViCare.py", line 30, in initWithExternalOAuth
self.__loadInstallations()
~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/PyViCare/PyViCare.py", line 45, in __loadInstallations
raise PyViCareInvalidDataError(installations)
PyViCare.PyViCareUtils.PyViCareInvalidDataError: {'viErrorId': 'req-0b4016df2e624121851a8ab5efef3d20', 'statusCode': 401, 'errorType': 'UNAUTHORIZED', 'message': 'Request contain invalid token', 'error': 'NO TOKEN AVAILABLE'}
`

@CFenner
Copy link
Contributor

CFenner commented Dec 17, 2024

Please go to config/.storage and remove the token file vicare_token.save. When you now reload the integration it should create a new one. If that still fails, please remove the integration and setup again.

@MrAurik
Copy link

MrAurik commented Dec 17, 2024

perfect, it works !

Thank's a lot ! :-D

@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@issue-triage-workflows issue-triage-workflows bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants