nfarina / homebridge-tesla

Tesla plugin for homebridge: https://github.com/nfarina/homebridge
154 stars 38 forks source link

Login Issues with Username/Password #63

Closed digivish closed 2 years ago

digivish commented 3 years ago

Getting this error repeatedly today. Not using authToken - only username and password

[2/17/2021, 12:10:19 PM] [Car3] Logging into Tesla with username/password… TeslaJS error: TypeError: Cannot read property 'forEach' of null at /usr/local/lib/node_modules/homebridge-tesla/node_modules/teslajs/src/auth.js:51:26 at tryCallOne (/usr/local/lib/node_modules/homebridge-tesla/node_modules/promise/lib/core.js:37:12) at /usr/local/lib/node_modules/homebridge-tesla/node_modules/promise/lib/core.js:123:15 at flush (/usr/local/lib/node_modules/homebridge-tesla/node_modules/asap/raw.js:50:29) at processTicksAndRejections (node:internal/process/task_queues:75:11)

nfarina commented 3 years ago

Are you able to try version 2.5.3?

digivish commented 3 years ago

Yes, just reinstalled 2.5.3 thank you. Still seeing the login error.

rhdny commented 3 years ago

For what's it worth, I see the same error at the beginning of my login sequence but I eventually get logged in. However I see TeslaJS 500 and 540 errors when accessing any services beyond the car online accessory.

rhdny commented 3 years ago

Set up a clean environment and only installed homebridge-tesla. The reinstall cleared up the 400 and 450 errors I was seeing. Here's what I'm still getting:

[2/20/2021, 10:11:34 PM] [Model S] Logging into Tesla with username/password… [2/20/2021, 10:11:34 PM] [Model S] Logging into Tesla with username/password… [2/20/2021, 10:11:34 PM] [Model S] Logging into Tesla with username/password… TeslaJS error: TypeError: Cannot read property 'forEach' of null at /homebridge/node_modules/homebridge-tesla/node_modules/teslajs/src/auth.js:51:26 at tryCallOne (/homebridge/node_modules/homebridge-tesla/node_modules/promise/lib/core.js:37:12) at /homebridge/node_modules/homebridge-tesla/node_modules/promise/lib/core.js:123:15 at flush (/homebridge/node_modules/homebridge-tesla/node_modules/asap/raw.js:50:29) at processTicksAndRejections (internal/process/task_queues.js:75:11)

errors repeat... then about 15 minutes later,

[2/20/2021, 10:27:07 PM] [Model S] Logging into Tesla with username/password… [2/20/2021, 10:27:08 PM] [Model S] Got a login token.

mavantix commented 3 years ago

I'm also experiencing this problem with a brand new Ubuntu 20.02.4 server running latest HOOBS.

Interestingly, generate-tesla-token just hangs trying to make a token as well. I wonder if tesla.com is blocking the https requests based on user agent or something?

rhdny commented 3 years ago

The errors returned for me; I believe I was getting blocked by Tesla's WAF. I gave up on it for a bit and recently tried again via a HA plugin. Back in business now.

nfarina commented 2 years ago

This should be fixed by the latest version (3.0.1) - check the README for details!