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

Refresh Token Revoked #69

Open
dingyifei opened this issue Jan 8, 2024 · 27 comments
Open

Refresh Token Revoked #69

dingyifei opened this issue Jan 8, 2024 · 27 comments
Labels
bug Something isn't working enhancement New feature or request investigating Investigating the issue to determine the root cause or if a problem really exists.

Comments

@dingyifei
Copy link

I'm having issues with receiving the verification code. It says refresh_token_revoked after I enter my account and password

@TopoTop1
Copy link

TopoTop1 commented Jan 8, 2024

I am too. You may want to close this and add your issue to the ones that are already open?

@explosivo22 explosivo22 added the investigating Investigating the issue to determine the root cause or if a problem really exists. label Jan 8, 2024
@dingyifei
Copy link
Author

I read the other issues, which seem related to re-logging in after adding. I can't add Kwikset integration because of this error tho.

@TopoTop1
Copy link

TopoTop1 commented Jan 8, 2024

Mine won't even allow me to refresh the token. It just says Failed to Setup.

@dingyifei
Copy link
Author

dingyifei commented Jan 8, 2024

#68 and this issue seems to be related

probably the same API failing?

@TopoTop1
Copy link

TopoTop1 commented Jan 8, 2024

Probably

Copy link

stale bot commented Jan 28, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 28, 2024
@TopoTop1
Copy link

@explosivo22 hi there.

Any updates?

@stale stale bot removed the stale label Jan 28, 2024
@johnbiddix
Copy link

I'm getting this error as well. I see the following after entering username and password

image

@explosivo22
Copy link
Owner

explosivo22 commented Feb 1, 2024

Sorry for the delayed response. This one has been unusually difficult to track down as I am unable to replicate this on my end no matter what I do, but also as there is not built in way to actually handle this error. I am working on it though.

Just for clarification, you all can get through the setup the initial time, but when it says you must reauthenticate is when it is failing?

@explosivo22
Copy link
Owner

I have released an alpha to test something, but I am going to continue to try and trace this down.

@JBB2068
Copy link

JBB2068 commented Feb 3, 2024

Sorry for the delayed response. This one has been unusually difficult to track down as I am unable to replicate this on my end no matter what I do, but also as there is not built in way to actually handle this error. I am working on it though.

Just for clarification, you all can get through the setup the initial time, but when it says you must reauthenticate is when it is failing?

Thank you for working on this! I am setting it up for the first time today and I get the message "refresh_token_revoked" when it asks for the verification code.

@explosivo22
Copy link
Owner

Sorry for the delayed response. This one has been unusually difficult to track down as I am unable to replicate this on my end no matter what I do, but also as there is not built in way to actually handle this error. I am working on it though.
Just for clarification, you all can get through the setup the initial time, but when it says you must reauthenticate is when it is failing?

Thank you for working on this! I am setting it up for the first time today and I get the message "refresh_token_revoked" when it asks for the verification code.

Are you using the the prerelease build, 0.2.4-alpha1, or the last official 0.2.3?

@dingyifei
Copy link
Author

Sorry for the delayed response. This one has been unusually difficult to track down as I am unable to replicate this on my end no matter what I do, but also as there is not built in way to actually handle this error. I am working on it though.

Just for clarification, you all can get through the setup the initial time, but when it says you must reauthenticate is when it is failing?

Thank you for working on this! I am setting it up for the first time today and I get the message "refresh_token_revoked" when it asks for the verification code.

Are you using the the prerelease build, 0.2.4-alpha1, or the last official 0.2.3?

I'm also trying to do the initial setup. The 0.2.4 alpha 1 shows unknown error occurred instead image

@JBB2068
Copy link

JBB2068 commented Feb 4, 2024

Sorry for the delayed response. This one has been unusually difficult to track down as I am unable to replicate this on my end no matter what I do, but also as there is not built in way to actually handle this error. I am working on it though.
Just for clarification, you all can get through the setup the initial time, but when it says you must reauthenticate is when it is failing?

Thank you for working on this! I am setting it up for the first time today and I get the message "refresh_token_revoked" when it asks for the verification code.

Are you using the the prerelease build, 0.2.4-alpha1, or the last official 0.2.3?

Using last official 0.2.3

Copy link

stale bot commented Feb 24, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Feb 24, 2024
@explosivo22 explosivo22 removed the stale label Feb 24, 2024
@StonyManager
Copy link

I have same problem and would be more than happy to try your 0.2.4 alpha release, but I don't know how to get it installed.

@StonyManager
Copy link

I have same problem and would be more than happy to try your 0.2.4 alpha release, but I don't know how to get it installed.

I think I got the 0.2.4 alpha release installed. What information do you want? As expected, I still get the refresh token rejected error.

Copy link

stale bot commented Apr 14, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 14, 2024
@TopoTop1
Copy link

Please don't close this as this is still active and a issue

@stale stale bot removed the stale label Apr 14, 2024
@rXtwo
Copy link

rXtwo commented Apr 19, 2024

Initial setup using official 0.2.3 resulted in “ refresh_token_revoked” - I attempted many times, but no change. Then I reset and downloaded alpha 0.2.4 which results in “unknown error occurred”

@ctracy
Copy link

ctracy commented Apr 30, 2024

I am trying this add-on for the very first time, using 0.2.4-alpha1. I am having similar problems, I can extract more debug logs if you are interested. This is what happens: When I go to configure the integration (clicking "+ Add Integration", search for Kwikset locks), it pops up the email/password dialog, then I get the "How would you like to receive your verification code?". I have tried it both ways, I never seem to receive the verification code. I see there are LOGGER.debug() calls in the code when it start to talk to the kwikset API, so I may try to enable that and see what I get.

@ctracy
Copy link

ctracy commented Apr 30, 2024

Here is where I am at with this... I found the python package aiokwikset which I believe to be maintained by the same author? In any case, const.py shows a hostname ynk95r1v52.execute-api.us-east-1.amazonaws.com which I believe it would be communicating with, this hostname resolves to 4 IP addresses, 13.227.74.84 13.227.74.126 13.227.74.14 and 13.227.74.62.

% host ynk95r1v52.execute-api.us-east-1.amazonaws.com
ynk95r1v52.execute-api.us-east-1.amazonaws.com has address 13.227.74.14
ynk95r1v52.execute-api.us-east-1.amazonaws.com has address 13.227.74.62
ynk95r1v52.execute-api.us-east-1.amazonaws.com has address 13.227.74.84
ynk95r1v52.execute-api.us-east-1.amazonaws.com has address 13.227.74.126

When running through the setup process for kwikset-ha (the prompt for email/password, verification code check) and running a tcpdump on my internet traffic, I didn't see any packets to/from these IP addresses. I did get the following backtrace from what appears to be the http request in my HA debug logs, I am not sure what to make of it. My config is very basic:

[core-ssh etc]$ cat /homeassistant/configuration.yaml

# Loads default set of integrations. Do not remove.
default_config:

bluetooth:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

logger:
  default: info
  logs:
    custom_components.hacs: debug

Here is the backtrace:

2024-04-29 22:04:03.573 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, 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 83, 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 88, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, 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 71, 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 73, in wrapper
    result = 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 356, in async_configure
    result = await self._async_configure(flow_id, user_input)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 402, in _async_configure
    result = await self._async_handle_step(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 506, in _async_handle_step
    result: _FlowResultT = await getattr(flow, method)(user_input)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/kwikset/config_flow.py", line 189, in async_step_code
    await self.api.verify_user(self.pre_auth, user_input[CONF_CODE])
  File "/usr/local/lib/python3.12/site-packages/aiokwikset/api.py", line 278, in verify_user
    Session=pre_verification['Session'],
            ~~~~~~~~~~~~~~~~^^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable

Copy link

stale bot commented May 21, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label May 21, 2024
@explosivo22 explosivo22 added bug Something isn't working and removed stale labels May 21, 2024
Copy link

stale bot commented Jun 12, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 12, 2024
@jaysenior
Copy link

Just installed this add-on myself and getting the same refresh_token_revoked with 2.3

@stale stale bot removed the stale label Jun 21, 2024
Copy link

stale bot commented Jul 13, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 13, 2024
@stale stale bot closed this as completed Jul 20, 2024
@explosivo22 explosivo22 removed the stale label Jul 20, 2024
@explosivo22 explosivo22 reopened this Jul 20, 2024
Copy link

stale bot commented Aug 10, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Aug 10, 2024
@explosivo22 explosivo22 added enhancement New feature or request and removed stale labels Aug 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request investigating Investigating the issue to determine the root cause or if a problem really exists.
Projects
None yet
Development

No branches or pull requests

9 participants