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

4 Different Errors at Once. Unknown pynest exception. Could not interpret nest response. Authentication Error. #267

Open
TonyMontuna opened this issue Oct 19, 2023 · 11 comments
Labels
beta (cookie-method) Using the cookie method branch bug Something isn't working

Comments

@TonyMontuna
Copy link

The problem

Hello,

I consistently have gotten these alerts and notifications that say

"Login attempt or request with invalid authentication from sonoszp.lan (IP Address). See the log for details."

Then when I check the logs, I got 4 different alerts, 2 are the same but show up more than 50 times. This is what I have:

This error originated from a custom integration.

Logger: custom_components.nest_protect
Source: custom_components/nest_protect/__init__.py:163
Integration: Nest Protect (documentation, issues)
First occurred: October 15, 2023 at 10:22:55 AM (59 occurrences)
Last logged: 8:46:36 AM

Unknown pynest exception. Please create an issue on GitHub with your logfile. Updates paused for 1 minute.
Traceback (most recent call last):
  File "/config/custom_components/nest_protect/pynest/client.py", line 217, in authenticate
    self.nest_session = NestResponse(**nest_response)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: NestResponse.__init__() got an unexpected keyword argument 'error_description'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/config/custom_components/nest_protect/__init__.py", line 163, 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 224, in authenticate
    raise PynestException(
custom_components.nest_protect.pynest.exceptions.PynestException: 400 error while authenticating - {"error":"invalid_request","error_description":"missing user credentials"}. Please create an issue on GitHub.

AND

This error originated from a custom integration.

Logger: custom_components.nest_protect.pynest
Source: custom_components/nest_protect/pynest/client.py:214
Integration: Nest Protect (documentation, issues)
First occurred: October 15, 2023 at 10:22:55 AM (59 occurrences)
Last logged: 8:46:36 AM

Authentication error: invalid_request

AND

This error originated from a custom integration.

Logger: custom_components.nest_protect.pynest
Source: custom_components/nest_protect/pynest/client.py:222
Integration: Nest Protect (documentation, issues)
First occurred: October 15, 2023 at 10:22:55 AM (59 occurrences)
Last logged: 8:46:36 AM

Could not interpret Nest response

AND

This error originated from a custom integration.

Logger: custom_components.nest_protect
Source: custom_components/nest_protect/__init__.py:166
Integration: Nest Protect (documentation, issues)
First occurred: October 15, 2023 at 10:21:55 AM (44 occurrences)
Last logged: 8:45:35 AM

Unknown pynest exception. Please create an issue on GitHub with your logfile. Updates paused for 1 minute.
Traceback (most recent call last):
  File "/config/custom_components/nest_protect/pynest/client.py", line 298, in subscribe_for_data
    result = await response.json()
             ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/aiohttp_client.py", line 72, in json
    return await super().json(*args, loads=loads, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 1104, in json
    raise ContentTypeError(
aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/plain', url=URL('https://czfe18-front01-iad01.transport.home.nest.com/v6/subscribe')

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/config/custom_components/nest_protect/__init__.py", line 166, in _async_subscribe_for_data
    result = await entry_data.client.subscribe_for_data(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/nest_protect/pynest/client.py", line 302, in subscribe_for_data
    raise PynestException(
custom_components.nest_protect.pynest.exceptions.PynestException: 200 error while subscribing - 

I see it's related to a media file I have in my HA IO system. Unsure how it's related from these logs.

Any help is appreciated.

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

0.3.12

What version of Home Assistant Core has the issue?

HA OS - Home Assistant 2023.10.3

Device / Model

Nest Protect (Battery)

Diagnostics information

No response

Home Assistant log

No response

Additional information

I cannot input the logs or dianostic information because it is too long

@TonyMontuna TonyMontuna added the bug Something isn't working label Oct 19, 2023
@iMicknl
Copy link
Owner

iMicknl commented Oct 19, 2023

Are you using the cookie method or the old authentication method?

@TonyMontuna
Copy link
Author

Are you using the cookie method or the old authentication method?

I’m not entirely sure, how would I check that?

@iMicknl
Copy link
Owner

iMicknl commented Oct 19, 2023

How did you login / setup the integration? Did you just login on your Google account, or did you had to do manual steps where you retrieved cookies etc.

@TonyMontuna
Copy link
Author

How did you login / setup the integration? Did you just login on your Google account, or did you had to do manual steps where you retrieved cookies etc.

Login on my Google account

@TonyMontuna
Copy link
Author

How did you login / setup the integration? Did you just login on your Google account, or did you had to do manual steps where you retrieved cookies etc.

Login on my Google account

any suggestions?

@iMicknl
Copy link
Owner

iMicknl commented Oct 20, 2023

Does your integration still work? If so; just ignore the errors for now. At the moment I am really busy and don't have time to work a lot on this.

@TonyMontuna
Copy link
Author

No, it doesn’t work

@stiltjack
Copy link

I have the same errors. Beta version of the integration set up using the cookie method. The integration still appears to be working (changes to the configuration switches in HA are reflected in the Nest app).

I'm ignoring them!

@silenceleaf
Copy link

Same error here

@mbhforum
Copy link

mbhforum commented Nov 6, 2023

Same error here, but integration appears to be working. I am just going through the logs to try and eliminate any errors I am seeing ATM.

@SoccerCore11
Copy link

Working, but errors. I used Cookie auth IIRC.

This error originated from a custom integration.

Logger: custom_components.nest_protect
Source: custom_components/nest_protect/__init__.py:163
Integration: Nest Protect (documentation, issues)
First occurred: 10:54:49 AM (5 occurrences)
Last logged: 4:00:28 PM

Unknown pynest exception. Please create an issue on GitHub with your logfile. Updates paused for 1 minute.
Traceback (most recent call last):
  File "/config/custom_components/nest_protect/pynest/client.py", line 217, in authenticate
    self.nest_session = NestResponse(**nest_response)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: NestResponse.__init__() got an unexpected keyword argument 'error_description'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/config/custom_components/nest_protect/__init__.py", line 163, 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 224, in authenticate
    raise PynestException(
custom_components.nest_protect.pynest.exceptions.PynestException: 400 error while authenticating - {"error":"invalid_request","error_description":"missing user credentials"}. Please create an issue on GitHub.

@iMicknl iMicknl added the beta (cookie-method) Using the cookie method branch label Dec 12, 2023
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

6 participants