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 Exception popping up every 5 seconds #124

Closed
janusn opened this issue Dec 1, 2022 · 21 comments
Closed

Unknown Exception popping up every 5 seconds #124

janusn opened this issue Dec 1, 2022 · 21 comments
Labels
beta (cookie-method) Using the cookie method branch bug Something isn't working

Comments

@janusn
Copy link

janusn commented Dec 1, 2022

The problem

I have got an error popping up on the log every 5 seconds. The Nest Protect Devices and entities seem working fine though.

What version of this integration (ha-nest-protect) has the issue?

0.3.10

What version of Home Assistant Core has the issue?

core-2022.11.5

Device / Model

Nest Protect (Topaz-2.9)

Diagnostics information

config_entry-nest_protect-d9d72164fb1de9ad1884f574ae28ec3c.json.txt

Home Assistant log

Logs ```2022-12-01 05:28:37.479 ERROR (MainThread) [custom_components.nest_protect] Unknown exception. Please create an issue on GitHub with your logfile. Updates paused for 5 minutes. Traceback (most recent call last): File "/config/custom_components/nest_protect/__init__.py", line 173, in _async_subscribe_for_data await entry_data.client.authenticate(entry_data.client.auth.access_token) File "/config/custom_components/nest_protect/pynest/client.py", line 187, in authenticate nest_auth = NestAuthResponse(**result) File "", line 4, in __init__ TypeError: NestAuthClaims.__init__() missing 4 required positional arguments: 'subject', 'expirationTime', 'policyId', and 'structureConstraint' 2022-12-01 05:33:37.682 ERROR (MainThread) [custom_components.nest_protect] Unknown exception. Please create an issue on GitHub with your logfile. Updates paused for 5 minutes. Traceback (most recent call last): File "/config/custom_components/nest_protect/__init__.py", line 173, in _async_subscribe_for_data await entry_data.client.authenticate(entry_data.client.auth.access_token) File "/config/custom_components/nest_protect/pynest/client.py", line 187, in authenticate nest_auth = NestAuthResponse(**result) File "", line 4, in __init__ TypeError: NestAuthClaims.__init__() missing 4 required positional arguments: 'subject', 'expirationTime', 'policyId', and 'structureConstraint' 2022-12-01 05:38:37.819 ERROR (MainThread) [custom_components.nest_protect] Unknown exception. Please create an issue on GitHub with your logfile. Updates paused for 5 minutes. Traceback (most recent call last): File "/config/custom_components/nest_protect/__init__.py", line 173, in _async_subscribe_for_data await entry_data.client.authenticate(entry_data.client.auth.access_token) File "/config/custom_components/nest_protect/pynest/client.py", line 187, in authenticate nest_auth = NestAuthResponse(**result) File "", line 4, in __init__ TypeError: NestAuthClaims.__init__() missing 4 required positional arguments: 'subject', 'expirationTime', 'policyId', and 'structureConstraint' 2022-12-01 05:43:37.958 ERROR (MainThread) [custom_components.nest_protect] Unknown exception. Please create an issue on GitHub with your logfile. Updates paused for 5 minutes. Traceback (most recent call last): File "/config/custom_components/nest_protect/__init__.py", line 173, in _async_subscribe_for_data await entry_data.client.authenticate(entry_data.client.auth.access_token) File "/config/custom_components/nest_protect/pynest/client.py", line 187, in authenticate nest_auth = NestAuthResponse(**result) File "", line 4, in __init__ TypeError: NestAuthClaims.__init__() missing 4 required positional arguments: 'subject', 'expirationTime', 'policyId', and 'structureConstraint' ```

Additional information

No response

@Rustymage
Copy link

This error originated from a custom integration.

Logger: custom_components.nest_protect
Source: custom_components/nest_protect/pynest/client.py:191
Integration: Nest Protect (documentation, issues)
First occurred: 2:37:12 PM (1 occurrences)
Last logged: 2:37:12 PM

Unknown exception. Please create an issue on GitHub with your logfile. Updates paused for 5 minutes.
Traceback (most recent call last):
  File "/config/custom_components/nest_protect/__init__.py", line 162, in _async_subscribe_for_data
    entry_data.client.nest_session = await entry_data.client.authenticate(auth)
  File "/config/custom_components/nest_protect/pynest/client.py", line 191, in authenticate
    "cookie": "G_ENABLED_IDPS=google; eu_cookie_accepted=1; viewer-volume=0.5; cztoken="
TypeError: can only concatenate str (not "NoneType") to str

Same here

@iMicknl
Copy link
Owner

iMicknl commented Dec 8, 2022

@Rustymage @janusn do both of you use the last released version, or the PR from @nicoinch with the new cookie method?

@Rustymage
Copy link

HACs tells me this:

image

@iMicknl
Copy link
Owner

iMicknl commented Dec 8, 2022

@Rustymage on the top I see the commit-id from #121. You are running a test version (which you installed by hand 😉).

@Rustymage
Copy link

Me, no never!

Urm - clearly needs a little tweak if it's a test version ;)

Anything from me to help/support logwise?

@janusn
Copy link
Author

janusn commented Dec 8, 2022

@Rustymage @janusn do both of you use the last released version, or the PR from @nicoinch with the new cookie method?

I use the latest version with google access token. I am not sure how to know the version installed but I have installed through custom repository with the following URL:
https://github.com/nicoinch/ha-nest-protect

@nivek1612
Copy link

Seeing the same I think

This error originated from a custom integration.

Logger: custom_components.nest_protect
Source: custom_components/nest_protect/pynest/client.py:191
Integration: Nest Protect (documentation, issues)
First occurred: 01:39:59 (6 occurrences)
Last logged: 07:53:57

Unknown exception. Please create an issue on GitHub with your logfile. Updates paused for 5 minutes.
Traceback (most recent call last):
File "/config/custom_components/nest_protect/init.py", line 162, in _async_subscribe_for_data
entry_data.client.nest_session = await entry_data.client.authenticate(auth)
File "/config/custom_components/nest_protect/pynest/client.py", line 191, in authenticate
"cookie": "G_ENABLED_IDPS=google; eu_cookie_accepted=1; viewer-volume=0.5; cztoken="
TypeError: can only concatenate str (not "NoneType") to str

@othorp
Copy link

othorp commented Dec 28, 2022

Seeing the same issue reported by Rustymage and nivek1612 here. Log message appears every 30mins but Nest Protect functionality is mostly working so seems to be a transient error.

@iMicknl iMicknl added the beta (cookie-method) Using the cookie method branch label Jan 30, 2023
@hmorkemo
Copy link

hmorkemo commented Feb 6, 2023

The same happens here. Functionality of the units (3) seems ok. The iPhone Nest app reports everything's ok.
Diagnostics file attached.
config_entry-nest_protect-87172a1dcafae6a69f95023c5bdb62b0.json.txt

@Morriz
Copy link

Morriz commented Feb 6, 2023

+1

Verified thrown by this custom component installed from this repo.

Traceback (most recent call last):
  File "/config/custom_components/nest_protect/__init__.py", line 162, in _async_subscribe_for_data
    entry_data.client.nest_session = await entry_data.client.authenticate(auth)
  File "/config/custom_components/nest_protect/pynest/client.py", line 191, in authenticate
    "cookie": "G_ENABLED_IDPS=google; eu_cookie_accepted=1; viewer-volume=0.5; cztoken="
TypeError: can only concatenate str (not "NoneType") to str

@mattesser
Copy link

Using Home Assistant 2023.3.3 and seeing the same. My HA reboots a few times a day because of this error:

This error originated from a custom integration.

Logger: custom_components.nest_protect
Source: custom_components/nest_protect/pynest/client.py:191
Integration: Nest Protect (documentation, issues)
First occurred: 09:42:18 (1 occurrences)
Last logged: 09:42:18

Unknown exception. Please create an issue on GitHub with your logfile. Updates paused for 5 minutes.
Traceback (most recent call last):
File "/config/custom_components/nest_protect/init.py", line 162, in _async_subscribe_for_data
entry_data.client.nest_session = await entry_data.client.authenticate(auth)
File "/config/custom_components/nest_protect/pynest/client.py", line 191, in authenticate
"cookie": "G_ENABLED_IDPS=google; eu_cookie_accepted=1; viewer-volume=0.5; cztoken="
TypeError: can only concatenate str (not "NoneType") to str

@B-double-U
Copy link

Same issue here. HA on latest version. Integration seems to work fine though...

This error originated from a custom integration.

Logger: custom_components.nest_protect
Source: custom_components/nest_protect/pynest/client.py:191
Integration: Nest Protect (documentation, issues)
First occurred: March 25, 2023 at 18:18:28 (14 occurrences)
Last logged: 10:12:47

Unknown exception. Please create an issue on GitHub with your logfile. Updates paused for 5 minutes.
Traceback (most recent call last):
File "/config/custom_components/nest_protect/init.py", line 162, in _async_subscribe_for_data
entry_data.client.nest_session = await entry_data.client.authenticate(auth)
File "/config/custom_components/nest_protect/pynest/client.py", line 191, in authenticate
"cookie": "G_ENABLED_IDPS=google; eu_cookie_accepted=1; viewer-volume=0.5; cztoken="
TypeError: can only concatenate str (not "NoneType") to str

@Cruguah
Copy link

Cruguah commented Mar 27, 2023

I've implemented a fix, please let me know if this works

@janusn
Copy link
Author

janusn commented Mar 30, 2023

I've implemented a fix, please let me know if this works

Could you tell me how do I get the updated version?

@Cruguah
Copy link

Cruguah commented Mar 31, 2023

Because the version number can't be updated, you need to reinstall the integration by manualy update the sourcecode of the integration. When using HACS you can do this by opening the nest integration and redownload the integration
image
Restart HA and you're using the latest code

@janusn
Copy link
Author

janusn commented Apr 1, 2023

Thanks for the tips.

I have updated and HA has been upped this morning by watchtower. The unknown exception still pops up around every 1.5 hours. Please consult the attached log.

ha.log

@Cruguah
Copy link

Cruguah commented Apr 4, 2023

Hello Janus,

I've looked at your logfile, it almost feels like the credentials are not stored and can't be retrieved/used to call the google services.
Have you reinstalled the integration with new credentials?

Kind regards.

@janusn
Copy link
Author

janusn commented Apr 4, 2023

Hello Janus,

I've looked at your logfile, it almost feels like the credentials are not stored and can't be retrieved/used to call the google services. Have you reinstalled the integration with new credentials?

Kind regards.

You are right. I didn't change the credentials after redownloaded the plugin.

In fact, I don't know how to change the credentials. Could you enlighten me?

Cheers.

@Cruguah
Copy link

Cruguah commented Apr 5, 2023

Hello Janus,
I've looked at your logfile, it almost feels like the credentials are not stored and can't be retrieved/used to call the google services. Have you reinstalled the integration with new credentials?
Kind regards.

You are right. I didn't change the credentials after redownloaded the plugin.

In fact, I don't know how to change the credentials. Could you enlighten me?

Cheers.

To help you, I've implemented a reconfiguration option in the integration, sorry, you need to reinstall the integration, the same way you did last time. But when you and you've restarted HA you see a configuration option in the nest integration, like this:
image

Hope this helps you solve the issue

@janusn
Copy link
Author

janusn commented Apr 6, 2023

Thank you very much for your help.

  1. I have tried to redownload and restart HA again as suggested. But no configuration option was shown as illustrated below.

Screen Shot 2023-04-06 at 3 47 15 pm

  1. I removed all the integration and deleted the HACS integration. Then I added the nest_protect integration again in HACS. One thing I noticed. There were 2 nest protect repositories shown when I have entered "nest" in the search box. They are both showing exactly the same descriptions. And yours was the second one sorted by default "star" option. Too bad I didn't take a screencap at it. Could you add some indications to distinguish them for users?

  2. I went ahead and authenticated as the readme said, with issue_token and cookies. One remark though. The intl translation has missed English as illustrated below.

Screen Shot 2023-04-06 at 4 05 14 pm

  1. Finally I have got it up and running. No error related this issue has been shown so far. Finger crossed. However, issue [homeassistant.helpers.frame] Detected integration that called async_setup_platforms instead of awaiting async_forward_entry_setups #194 is still logged.

@iMicknl
Copy link
Owner

iMicknl commented Jun 15, 2024

Please update to latest beta (now v0.4.0b5) and create a new issue if you face issues.

@iMicknl iMicknl closed this as completed Jun 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta (cookie-method) Using the cookie method branch bug Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants