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

Nest Protect integration for Home Assistant looses authentication after home assistant restarts #341

Open
channafam opened this issue Jul 3, 2024 · 11 comments
Labels
bug Something isn't working

Comments

@channafam
Copy link

channafam commented Jul 3, 2024

The problem

Nest Protect integration for Home Assistant looses authentication after every home assistant restart. This issue only started recently.

It’s seems I need to gather issue token and cookies after each restart. Gathering the details now seems to work intermittently. Following the instructions provided https://github.com/iMicknl/ha-nest-protect/tree/beta#retrieving-issue_token-and-cookies, the gathered token and cookie does not always work. Seems I need to follow procedure multiple times before on combination is finally accepted and allows authentication

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

0.4.0b5

What version of Home Assistant Core has the issue?

2024.7.0 And previous 2 versions

Device / Model

Nest Protect

Diagnostics information

No response

Home Assistant log

Logs
Copy/paste any log here, between the starting and ending backticks (`)

Additional information

@iMicknl - any thoughts?
No response

@channafam channafam added the bug Something isn't working label Jul 3, 2024
@atharayanil
Copy link

I am having an identical issue; HA is running off a dedicated NUC [no docker]

@horse-pants
Copy link

I'm having the same issue, except tonight no combinations of token / cookie will work

@prenazol
Copy link

Same hre: tried several times and the cookies moethod works randomly and whe it works HA looses authentication after a restart.
Never had such issue in the past year.

@channafam
Copy link
Author

@ViPeR5000 , and @iMicknl - any suggestions?

@atharayanil
Copy link

follow up -- I was able to eventually get this reauthenticated and it's been stable/signed in for 7+days

@jaburges
Copy link

using the beta (and master) but after restart I get the LOGGED_OUT issue

@iMicknl
Copy link
Owner

iMicknl commented Aug 29, 2024

@channafam I don't have any suggestions at the moment.

@millerim
Copy link

millerim commented Sep 1, 2024

This has been happening to me also. I was able to authenticate using the documented procedure, but only once and not since. I keep getting "Unexpected error". Any advice is appreciated.

This seems to be the relevant log entry:

2024-09-01 12:34:04.285 ERROR (MainThread) [custom_components.nest_protect] Flow aborted: already_in_progress
Traceback (most recent call last):
File "/config/custom_components/nest_protect/config_flow.py", line 102, in async_step_account_link
[issue_token, cookies, email] = await self.async_validate_input(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/nest_protect/config_flow.py", line 64, in async_validate_input
await self.async_set_unique_id(nest.user)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2389, in async_set_unique_id
raise data_entry_flow.AbortFlow("already_in_progress")
homeassistant.data_entry_flow.AbortFlow: Flow aborted: already_in_progress

UPDATE: I was able to authenticate by deleting all the re-authentication prompts. I didn't have to delete the integration itself. I'm guessing that it can't support more than one authentication flow at a time?

@hausmanconsulting
Copy link

This just happened to me as well (I've restarted HA many times in the last month or so and this is the first time I've lost my Nest authentication; I'm still on HA 2024.5.3, no recent updates there).

I wasn't 100% sure what @millerim meant by "deleting all the re-authentication prompts" but when I obtained a new issue token and cookies, I got an error about "invalid flow" when I tried entering them in the authentication popup that showed up when I initially restarted HA. So I closed that popup (which I think is what @millerim was referring to) and I went to settings - integrations - Nest Protect, and selected "Add Entry". Entering my new credentials there worked.

@millerim
Copy link

millerim commented Sep 3, 2024 via email

@nielssteenvoorde
Copy link

This has been happening to me also. I was able to authenticate using the documented procedure, but only once and not since. I keep getting "Unexpected error". Any advice is appreciated.

This seems to be the relevant log entry:

2024-09-01 12:34:04.285 ERROR (MainThread) [custom_components.nest_protect] Flow aborted: already_in_progress Traceback (most recent call last): File "/config/custom_components/nest_protect/config_flow.py", line 102, in async_step_account_link [issue_token, cookies, email] = await self.async_validate_input( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/nest_protect/config_flow.py", line 64, in async_validate_input await self.async_set_unique_id(nest.user) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2389, in async_set_unique_id raise data_entry_flow.AbortFlow("already_in_progress") homeassistant.data_entry_flow.AbortFlow: Flow aborted: already_in_progress

UPDATE: I was able to authenticate by deleting all the re-authentication prompts. I didn't have to delete the integration itself. I'm guessing that it can't support more than one authentication flow at a time?

Worked for me as well. TNX for sharing ;-)

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

No branches or pull requests

9 participants