tesla: re-authentication successful but fails to setup

Version of the custom_component

Version 3.20.1

Configuration

Add your logs here.

I looked but im not sure what yaml logs to add here. If this is needed please show me where to find this.

Describe the bug

The integration fails to authenticate. I generate a new refresh token and submit. It says it successfully re-authenticated. The integration then fails to setup saying it failed to authenticate. I have tried this about 5 times with the same results. Before version 3.20.0 and 3.20.1 I was able to authenticate without any issues. Since these updates it no longer works. I have a 2018 model 3 if that makes a difference.

Debug log


2024-03-12 10:07:25.829 DEBUG (MainThread) [teslajsonpy.controller] 552 endpoints loaded
2024-03-12 10:07:25.830 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in -19795 days, 13:52:35
2024-03-12 10:07:25.830 DEBUG (MainThread) [teslajsonpy.connection] Oauth expiration detected
2024-03-12 10:07:25.830 DEBUG (MainThread) [teslajsonpy.connection] Refreshing access token with refresh_token
2024-03-12 10:07:26.236 DEBUG (MainThread) [teslajsonpy.connection] Unable to refresh sso oauth token
2024-03-12 10:07:26.236 DEBUG (MainThread) [teslajsonpy.connection] Auth returned {'error': 'unauthorized_client', 'error_description': "We don't recognize this client_id and client_secret combination", 'referenceID': 'c86b7a69-00f1-4b42-81bb-4e84d2d0a5a6-1710252446157'}
2024-03-12 10:07:26.349 WARNING (MainThread) [custom_components.localtuya.common] [eb3...n9w] Disconnected - waiting for discovery broadcast
2024-03-12 10:07:27.260 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in -19795 days, 13:52:33
2024-03-12 10:07:27.260 DEBUG (MainThread) [teslajsonpy.connection] Oauth expiration detected
2024-03-12 10:07:27.260 DEBUG (MainThread) [teslajsonpy.connection] Refreshing access token with refresh_token
2024-03-12 10:07:27.631 DEBUG (MainThread) [teslajsonpy.connection] Unable to refresh sso oauth token
2024-03-12 10:07:27.631 DEBUG (MainThread) [teslajsonpy.connection] Auth returned {'error': 'unauthorized_client', 'error_description': "We don't recognize this client_id and client_secret combination", 'referenceID': '02c75ced-fc35-4394-9e30-c15e9376ff2f-1710252447541'}
2024-03-12 10:07:29.970 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in -19795 days, 13:52:31
2024-03-12 10:07:29.970 DEBUG (MainThread) [teslajsonpy.connection] Oauth expiration detected
2024-03-12 10:07:29.971 DEBUG (MainThread) [teslajsonpy.connection] Refreshing access token with refresh_token
2024-03-12 10:07:30.514 DEBUG (MainThread) [teslajsonpy.connection] Unable to refresh sso oauth token
2024-03-12 10:07:30.514 DEBUG (MainThread) [teslajsonpy.connection] Auth returned {'error': 'unauthorized_client', 'error_description': "We don't recognize this client_id and client_secret combination", 'referenceID': '200ddfe0-a040-4a74-86a1-a11d4dcf31ea-1710252450428'}
2024-03-12 10:07:35.206 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in -19795 days, 13:52:25
2024-03-12 10:07:35.206 DEBUG (MainThread) [teslajsonpy.connection] Oauth expiration detected
2024-03-12 10:07:35.206 DEBUG (MainThread) [teslajsonpy.connection] Refreshing access token with refresh_token
2024-03-12 10:07:35.752 DEBUG (MainThread) [teslajsonpy.connection] Unable to refresh sso oauth token
2024-03-12 10:07:35.752 DEBUG (MainThread) [teslajsonpy.connection] Auth returned {'error': 'unauthorized_client', 'error_description': "We don't recognize this client_id and client_secret combination", 'referenceID': '50b3c243-246d-4700-9439-deab9d2dc3aa-1710252455658'}
2024-03-12 10:07:40.831 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in -19795 days, 13:52:20
2024-03-12 10:07:40.831 DEBUG (MainThread) [teslajsonpy.connection] Oauth expiration detected
2024-03-12 10:07:40.832 DEBUG (MainThread) [teslajsonpy.connection] Refreshing access token with refresh_token
2024-03-12 10:07:41.182 DEBUG (MainThread) [teslajsonpy.connection] Unable to refresh sso oauth token
2024-03-12 10:07:41.183 DEBUG (MainThread) [teslajsonpy.connection] Auth returned {'error': 'unauthorized_client', 'error_description': "We don't recognize this client_id and client_secret combination", 'referenceID': 'e3eb09f6-7efb-48f1-bc53-21c41f91b2ac-1710252461101'}
2024-03-12 10:07:41.184 WARNING (MainThread) [homeassistant.config_entries] Config entry 'blah@gmail.com' for tesla_custom integration could not authenticate

About this issue

  • Original URL
  • State: closed
  • Created 4 months ago
  • Reactions: 4
  • Comments: 22

Commits related to this issue

Most upvoted comments

I guess my new question is, when can I upgrade to the latest version again to get any additional fixes/features

That would be when this issue is resolved, that’s how issues in GitHub work. We will close this issue once a Pull Request is made that fixes the issue.

For everyone so far thanks for the info supplied.

For anyone else with the problem, please refrain from adding “me too” comments, otherwise the issue becomes full of comments that aren’t helping identify or fix the issue, if you want to be updated, click the subscribe button to be alerted to new comments/changes. Thanks in advance.

I am having the same issue since updating earlier today, let me know if any information would assist?

Downgrading to 3.19.11 worked for me

Edit; downgrade and reauthentice does work

Downgrading to v3.19.11 does work. I guess my new question is, when can I upgrade to the latest version again to get any additional fixes/features.

Read this PR #896 - it needs to get merged and then the release should soon go out. Someone will need to test the changes hoping it fixes all cases and doesn’t introduce other issues.

Edit; downgrade and reauthentice does work

Sorry if a daft question, but how do I downgrade?

If you are using HACS Go to your HACS page and click on the tesla integration. Then click the 3 dots in the top left corner and select the “redownload” option Then select the version you want to downgrade to and restart home assistant. Hopefully this helps 😃

perfect thank you, back up and running!!

Here the same, also with a downgrade to v3.19.11