teslamate-org / teslamate

A self-hosted data logger for your Tesla 🚘
https://docs.teslamate.org
MIT License
5.94k stars 740 forks source link

Token login bug #4142

Closed 10tribu closed 2 months ago

10tribu commented 2 months ago

Is there an existing issue for this?

What happened?

my 2 years teslamate install tel me to add access token and refresh token when i try to send my new tokens generate with tesla Auth or Auth for tesla i have a bad return : Error: Tokens are not valid ! (this new tokens are valid)

Expected Behavior

No response

Steps To Reproduce

No response

Relevant log output

teslamate-1  | 2024-08-14 04:15:44.186 [warning] Retrying in 5 minutes...
teslamate-1  | 2024-08-14 04:20:44.187 [info] Refreshing access token ...
teslamate-1  | 2024-08-14 04:20:52.190 [error] POST https://auth.tesla.com/oauth2/v3/token -> error: "non-existing domain" (8002.766 ms)
teslamate-1  | 2024-08-14 04:20:52.190 [warning] Token refresh failed: %TeslaApi.Error{
teslamate-1  |   reason: :token_refresh,
teslamate-1  |   message: "non-existing domain",
teslamate-1  |   env: nil
teslamate-1  | }
teslamate-1  | 2024-08-14 04:20:52.191 [warning] Retrying in 5 minutes...
teslamate-1  | 2024-08-14 04:25:52.192 [info] Refreshing access token ...
teslamate-1  | 2024-08-14 04:26:00.195 [error] POST https://auth.tesla.com/oauth2/v3/token -> error: "non-existing domain" (8002.692 ms)
teslamate-1  | 2024-08-14 04:26:00.195 [warning] Token refresh failed: %TeslaApi.Error{
teslamate-1  |   reason: :token_refresh,
teslamate-1  |   message: "non-existing domain",
teslamate-1  |   env: nil
teslamate-1  | }
teslamate-1  | 2024-08-14 04:26:00.196 [warning] Retrying in 5 minutes...
teslamate-1  | 2024-08-14 04:31:00.196 [info] Refreshing access token ...
teslamate-1  | 2024-08-14 04:31:08.199 [error] POST https://auth.tesla.com/oauth2/v3/token -> error: "non-existing domain" (8002.706 ms)
teslamate-1  | 2024-08-14 04:31:08.199 [warning] Token refresh failed: %TeslaApi.Error{
teslamate-1  |   reason: :token_refresh,
teslamate-1  |   message: "non-existing domain",
teslamate-1  |   env: nil
teslamate-1  | }
teslamate-1  | 2024-08-14 04:31:08.200 [warning] Retrying in 5 minutes...
teslamate-1  | 2024-08-14 04:36:08.201 [info] Refreshing access token ...
teslamate-1  | 2024-08-14 04:36:16.205 [error] POST https://auth.tesla.com/oauth2/v3/token -> error: "non-existing domain" (8003.734 ms)
teslamate-1  | 2024-08-14 04:36:16.205 [warning] Token refresh failed: %TeslaApi.Error{
teslamate-1  |   reason: :token_refresh,
teslamate-1  |   message: "non-existing domain",
teslamate-1  |   env: nil
teslamate-1  | }
teslamate-1  | 2024-08-14 04:36:16.205 [warning] Retrying in 5 minutes...
teslamate-1  | 2024-08-14 04:41:16.207 [info] Refreshing access token ...
teslamate-1  | 2024-08-14 04:41:24.211 [error] POST https://auth.tesla.com/oauth2/v3/token -> error: "non-existing domain" (8003.794 ms)
teslamate-1  | 2024-08-14 04:41:24.211 [warning] Token refresh failed: %TeslaApi.Error{
teslamate-1  |   reason: :token_refresh,
teslamate-1  |   message: "non-existing domain",
teslamate-1  |   env: nil
teslamate-1  | }
teslamate-1  | 2024-08-14 04:41:24.212 [warning] Retrying in 5 minutes...
teslamate-1  | 2024-08-14 04:46:24.212 [info] Refreshing access token ...
teslamate-1  | 2024-08-14 04:46:32.215 [error] POST https://auth.tesla.com/oauth2/v3/token -> error: "non-existing domain" (8002.751 ms)
teslamate-1  | 2024-08-14 04:46:32.215 [warning] Token refresh failed: %TeslaApi.Error{
teslamate-1  |   reason: :token_refresh,
teslamate-1  |   message: "non-existing domain",
teslamate-1  |   env: nil
teslamate-1  | }
teslamate-1  | 2024-08-14 04:46:32.216 [warning] Retrying in 5 minutes...
teslamate-1  | 2024-08-14 04:51:32.217 [info] Refreshing access token ...
teslamate-1  | 2024-08-14 04:51:40.221 [error] POST https://auth.tesla.com/oauth2/v3/token -> error: "non-existing domain" (8003.614 ms)
teslamate-1  | 2024-08-14 04:51:40.221 [warning] Token refresh failed: %TeslaApi.Error{
teslamate-1  |   reason: :token_refresh,
teslamate-1  |   message: "non-existing domain",
teslamate-1  |   env: nil
teslamate-1  | }
teslamate-1  | 2024-08-14 04:51:40.222 [warning] Retrying in 5 minutes...
teslamate-1  | 2024-08-14 04:53:51.713 [info] GET https://owner-api.teslamotors.com/api/1/vehicles/929904485400653 -> 401 (35.374 ms)
teslamate-1  | 2024-08-14 04:53:51.713 [info] Refreshing access token ...
teslamate-1  | 2024-08-14 04:53:51.714 car_id=2 [error] Error / :unauthorized
teslamate-1  | 2024-08-14 04:53:54.453 [info] GET https://owner-api.teslamotors.com/api/1/vehicles/1492932587742003 -> 401 (32.345 ms)
teslamate-1  | 2024-08-14 04:53:54.454 car_id=1 [error] Error / :unauthorized
teslamate-1  | 2024-08-14 04:53:59.718 [error] POST https://auth.tesla.com/oauth2/v3/token -> error: "non-existing domain" (8004.599 ms)
teslamate-1  | 2024-08-14 04:53:59.718 [warning] Token refresh failed: %TeslaApi.Error{
teslamate-1  |   reason: :token_refresh,
teslamate-1  |   message: "non-existing domain",
teslamate-1  |   env: nil
teslamate-1  | }
teslamate-1  | 2024-08-14 04:53:59.718 [warning] Retrying in 5 minutes...
teslamate-1  | 2024-08-14 04:53:59.719 [info] Refreshing access token ...
teslamate-1  | 2024-08-14 04:54:07.725 [error] POST https://auth.tesla.com/oauth2/v3/token -> error: "non-existing domain" (8005.621 ms)
teslamate-1  | 2024-08-14 04:54:07.725 [warning] Token refresh failed: %TeslaApi.Error{
teslamate-1  |   reason: :token_refresh,
teslamate-1  |   message: "non-existing domain",
teslamate-1  |   env: nil
teslamate-1  | }
teslamate-1  | 2024-08-14 04:54:07.726 [warning] Retrying in 5 minutes...
teslamate-1  | 2024-08-14 04:54:21.751 [info] GET https://owner-api.teslamotors.com/api/1/vehicles/929904485400653 -> 401 (35.139 ms)
teslamate-1  | 2024-08-14 04:54:21.751 [info] Refreshing access token ...
teslamate-1  | 2024-08-14 04:54:21.751 car_id=2 [error] Error / :unauthorized
teslamate-1  | 2024-08-14 04:54:24.488 [info] GET https://owner-api.teslamotors.com/api/1/vehicles/1492932587742003 -> 401 (33.479 ms)
teslamate-1  | 2024-08-14 04:54:24.488 car_id=1 [error] Error / :unauthorized
teslamate-1  | 2024-08-14 04:54:29.757 [error] POST https://auth.tesla.com/oauth2/v3/token -> error: "non-existing domain" (8006.004 ms)
teslamate-1  | 2024-08-14 04:54:29.757 [warning] Token refresh failed: %TeslaApi.Error{
teslamate-1  |   reason: :token_refresh,
teslamate-1  |   message: "non-existing domain",
teslamate-1  |   env: nil
teslamate-1  | }
teslamate-1  | 2024-08-14 04:54:29.758 [warning] Retrying in 5 minutes...
teslamate-1  | 2024-08-14 04:54:29.758 [info] Refreshing access token ...
teslamate-1  | 2024-08-14 04:54:37.764 [error] POST https://auth.tesla.com/oauth2/v3/token -> error: "non-existing domain" (8005.523 ms)
teslamate-1  | 2024-08-14 04:54:37.764 [warning] Token refresh failed: %TeslaApi.Error{
teslamate-1  |   reason: :token_refresh,
teslamate-1  |   message: "non-existing domain",
teslamate-1  |   env: nil
teslamate-1  | }
teslamate-1  | 2024-08-14 04:54:37.765 [warning] Retrying in 5 minutes...
teslamate-1  | 2024-08-14 04:54:51.788 [info] GET https://owner-api.teslamotors.com/api/1/vehicles/929904485400653 -> 401 (34.209 ms)
teslamate-1  | 2024-08-14 04:54:51.788 [info] Refreshing access token ...
teslamate-1  | 2024-08-14 04:54:51.788 car_id=2 [error] Error / :unauthorized
teslamate-1  | 2024-08-14 04:54:54.522 [info] GET https://owner-api.teslamotors.com/api/1/vehicles/1492932587742003 -> 401 (32.781 ms)
teslamate-1  | 2024-08-14 04:54:54.523 car_id=1 [error] Error / not_signed_in
teslamate-1  | 2024-08-14 04:54:59.793 [error] POST https://auth.tesla.com/oauth2/v3/token -> error: "non-existing domain" (8004.909 ms)
teslamate-1  | 2024-08-14 04:54:59.793 [warning] Token refresh failed: %TeslaApi.Error{
teslamate-1  |   reason: :token_refresh,
teslamate-1  |   message: "non-existing domain",
teslamate-1  |   env: nil
teslamate-1  | }
teslamate-1  | 2024-08-14 04:54:59.794 [warning] Retrying in 5 minutes...
teslamate-1  | 2024-08-14 04:55:20.761 [notice]     :alarm_handler: {:set, {:"Elixir.TeslaMate.Api.unauthorized", :fuse_blown}}
teslamate-1  | 2024-08-14 04:55:20.762 [notice]     :alarm_handler: {:set, {TeslaMate.Vehicles.Vehicle_1_api_error, :fuse_blown}}
teslamate-1  | 2024-08-14 04:55:21.790 car_id=2 [error] Error / not_signed_in
teslamate-1  | 2024-08-14 04:56:20.762 [notice]     :alarm_handler: {:set, {TeslaMate.Vehicles.Vehicle_2_api_error, :fuse_blown}}
teslamate-1  | 2024-08-14 04:59:59.795 [warning] Cannot refresh access token: :not_signed_in
teslamate-1  | 2024-08-15 08:08:52.857 [info] GET /
teslamate-1  | 2024-08-15 08:08:52.899 [info] Sent 302 in 41ms
teslamate-1  | 2024-08-15 08:08:52.980 [info] GET /sign_in
teslamate-1  | 2024-08-15 08:08:52.995 [info] Sent 200 in 14ms
teslamate-1  | 2024-08-15 08:08:57.310 [info] GET /
teslamate-1  | 2024-08-15 08:08:57.315 [info] Sent 302 in 4ms
teslamate-1  | 2024-08-15 08:08:57.442 [info] GET /sign_in
teslamate-1  | 2024-08-15 08:08:57.450 [info] Sent 200 in 7ms
teslamate-1  | 2024-08-15 08:09:43.904 [error] POST https://auth.tesla.com/oauth2/v3/token -> error: "non-existing domain" (8004.956 ms)
teslamate-1  | 2024-08-15 08:11:34.548 [error] POST https://auth.tesla.com/oauth2/v3/token -> error: "non-existing domain" (8002.916 ms)
teslamate-1  | 2024-08-15 08:11:58.029 [error] POST https://auth.tesla.com/oauth2/v3/token -> error: "non-existing domain" (8003.009 ms)
teslamate-1  | 2024-08-15 08:12:17.675 [error] POST https://auth.tesla.com/oauth2/v3/token -> error: "non-existing domain" (8002.968 ms)
teslamate-1  | 2024-08-15 08:12:41.173 [error] POST https://auth.tesla.com/oauth2/v3/token -> error: "non-existing domain" (8002.858 ms)
teslamate-1  | 2024-08-15 08:13:22.580 [error] POST https://auth.tesla.com/oauth2/v3/token -> error: "non-existing domain" (8002.857 ms)
teslamate-1  | 2024-08-15 08:14:26.223 [error] POST https://auth.tesla.com/oauth2/v3/token -> error: "non-existing domain" (8002.769 ms)
teslamate-1  | 2024-08-15 08:15:28.221 [error] POST https://auth.tesla.com/oauth2/v3/token -> error: "non-existing domain" (8003.077 ms)
teslamate-1  | 2024-08-15 08:21:07.973 [info] GET /
teslamate-1  | 2024-08-15 08:21:07.978 [info] Sent 302 in 4ms
teslamate-1  | 2024-08-15 08:21:08.086 [info] GET /sign_in
teslamate-1  | 2024-08-15 08:21:08.092 [info] Sent 200 in 6ms
teslamate-1  | 2024-08-15 08:21:40.684 [error] POST https://auth.tesla.com/oauth2/v3/token -> error: "non-existing domain" (8002.396 ms)
teslamate-1  | 2024-08-15 09:17:49.518 [info] GET /
teslamate-1  | 2024-08-15 09:17:49.593 [info] Sent 302 in 65ms
teslamate-1  | 2024-08-15 09:17:49.707 [info] GET /sign_in
teslamate-1  | 2024-08-15 09:17:49.723 [info] Sent 200 in 16ms
teslamate-1  | 2024-08-15 09:18:13.524 [error] POST https://auth.tesla.com/oauth2/v3/token -> error: "non-existing domain" (8005.392 ms)
teslamate-1  | 2024-08-15 09:19:03.290 [error] POST https://auth.tesla.com/oauth2/v3/token -> error: "non-existing domain" (8002.239 ms)
teslamate-1  | 2024-08-15 14:15:16.108 [info] GET /
teslamate-1  | 2024-08-15 14:15:16.111 [info] Sent 302 in 3ms
teslamate-1  | 2024-08-15 14:15:16.242 [info] GET /sign_in
teslamate-1  | 2024-08-15 14:15:16.254 [info] Sent 200 in 11ms
teslamate-1  | 2024-08-15 14:15:21.188 [info] GET /
teslamate-1  | 2024-08-15 14:15:21.195 [info] Sent 302 in 6ms
teslamate-1  | 2024-08-15 14:15:21.336 [info] GET /sign_in
teslamate-1  | 2024-08-15 14:15:21.343 [info] Sent 200 in 6ms
teslamate-1  | 2024-08-15 14:15:56.175 [error] POST https://auth.tesla.com/oauth2/v3/token -> error: "non-existing domain" (8003.421 ms)
teslamate-1  | 2024-08-15 14:21:37.111 [info] GET /
teslamate-1  | 2024-08-15 14:21:37.115 [info] Sent 302 in 3ms
teslamate-1  | 2024-08-15 14:21:37.252 [info] GET /sign_in
teslamate-1  | 2024-08-15 14:21:37.258 [info] Sent 200 in 5ms
teslamate-1  | 2024-08-15 14:45:07.924 [info] GET /
teslamate-1  | 2024-08-15 14:45:07.928 [info] Sent 302 in 3ms
teslamate-1  | 2024-08-15 14:45:08.037 [info] GET /sign_in
teslamate-1  | 2024-08-15 14:45:08.044 [info] Sent 200 in 6ms
teslamate-1  | 2024-08-15 14:45:30.457 [error] POST https://auth.tesla.com/oauth2/v3/token -> error: "non-existing domain" (8003.147 ms)
teslamate-1  | 2024-08-15 14:47:38.402 [info] GET /
teslamate-1  | 2024-08-15 14:47:38.406 [info] Sent 302 in 4ms
teslamate-1  | 2024-08-15 14:47:38.486 [info] GET /sign_in
teslamate-1  | 2024-08-15 14:47:38.493 [info] Sent 200 in 7ms
teslamate-1  | 2024-08-15 14:48:04.728 [error] POST https://auth.tesla.com/oauth2/v3/token -> error: "non-existing domain" (8002.551 ms)
teslamate-1  | 2024-08-15 14:50:29.241 [error] POST https://auth.tesla.com/oauth2/v3/token -> error: "non-existing domain" (8003.788 ms)
teslamate-1  | 2024-08-15 14:51:22.880 [error] POST https://auth.tesla.com/oauth2/v3/token -> error: "non-existing domain" (8003.127 ms)
teslamate-1  | 2024-08-15 14:51:44.730 [info] GET /
teslamate-1  | 2024-08-15 14:51:44.734 [info] Sent 302 in 4ms
teslamate-1  | 2024-08-15 14:51:44.823 [info] GET /sign_in
teslamate-1  | 2024-08-15 14:51:44.830 [info] Sent 200 in 7ms

Screenshots

Capture d’écran 2024-08-15 à 16 51 36

Additional data

No response

Type of installation

Docker

Version

1.30.1

cwanja commented 2 months ago

Looks like internet issues - non-existent domain. Can you reach the internet on the device hosting TeslaMate?

Can you reboot the device and test?

10tribu commented 2 months ago

the reboot fix the problem thanks