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

Nabu Casa expiration_date raises ValueError. #100564

Closed
AJediIAm opened this issue Sep 18, 2023 · 6 comments
Closed

Nabu Casa expiration_date raises ValueError. #100564

AJediIAm opened this issue Sep 18, 2023 · 6 comments

Comments

@AJediIAm
Copy link

The problem

Home assistant seems to have trouble with connecting to Nabu Casa.
image
Opening this menu results in an infinite spinner.

System information shows an error as well.
image

Also: see error log below

What version of Home Assistant Core has the issue?

core-2023.9.2

What was the last working version of Home Assistant Core?

core-2023.9.2 I think... (not sure)

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Nabu Casa Cloud

Link to integration documentation on our website

No response

Diagnostics information

Example YAML snippet

-

Anything in the logs that might be useful for us?

-09-18 21:45:02.331 ERROR (MainThread) [homeassistant.components.webhook] Error processing webhook b36c1ac7e2cf16bcf6aeb539702d35d371d175b63ed0c1212240db7f015a3d5f
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/webhook/__init__.py", line 182, in async_handle_webhook
    response = await webhook["handler"](hass, webhook_id, request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/mobile_app/webhook.py", line 266, in handle_webhook
    return await asyncio.shield(
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/mobile_app/webhook.py", line 745, in webhook_get_config
    if cloud.async_active_subscription(hass):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/cloud/__init__.py", line 172, in async_active_subscription
    return async_is_logged_in(hass) and not hass.data[DOMAIN].subscription_expired
                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/hass_nabucasa/__init__.py", line 133, in subscription_expired
    return utcnow() > self.expiration_date + timedelta(days=7)
                      ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/hass_nabucasa/__init__.py", line 139, in expiration_date
    raise ValueError(
ValueError: Invalid expiration date (2023-11-05)

Additional information

I tried (and failed) to setup a domain name for my account. Not sure if it is related, but it might be.

@home-assistant
Copy link

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

Code owner commands

Code owners of cloud 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 cloud Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


cloud documentation
cloud source
(message by IssueLinks)

@ludeeus
Copy link
Member

ludeeus commented Sep 19, 2023

"2023-11-05" is a valid date, but it seems like something is overriding datetime on your system.
Are you running any custom integrations? if so, can you disable (remove) all custom integrations, do you still see the same issue?

@AJediIAm
Copy link
Author

It took some time to figure out what was happening, but it seems to be a custom integration which caused the issue.
I would not have thought this could be caused by a custom integration. Sorry for the inconvenience.

@ludeeus
Copy link
Member

ludeeus commented Sep 23, 2023

Could you share which one it was?

@AJediIAm
Copy link
Author

The Luxtronik2 integration.
I've been running it for a long time. The latest version seemed to have issues and is now changed to a beta release instead of a final release.

@ludeeus
Copy link
Member

ludeeus commented Sep 23, 2023

Thanks!

@github-actions github-actions bot locked and limited conversation to collaborators Oct 23, 2023
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

3 participants