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

recent auth issues? #30

Open
88gts opened this issue May 30, 2021 · 17 comments
Open

recent auth issues? #30

88gts opened this issue May 30, 2021 · 17 comments

Comments

@88gts
Copy link

88gts commented May 30, 2021

code and pw have not changed but i have not been able to auth for two days or so. anyone else experiencing this?

87, in fetch_sso_token
m = re.search('code=([^&]*)',r.headers['location'])
File "/usr/local/lib/python3.6/site-packages/requests/structures.py", line 52, in getitem
return self._store[key.lower()][1]
KeyError: 'location'

@Les-A
Copy link

Les-A commented May 30, 2021

I too have had this problem for the last couple of days. I'm still using Python 2.7 and I the account only uses the basic authentication - email & password. The last data collected via Teslajson was 2021-05-28 19:05:03 GMT. I was recording data every 60 seconds at that point.

Response contains the following keys:
Server
Content-Type
X-DNS-Prefetch-Control
X-Frame-Options
Strict-Transport-Security
X-Download-Options
X-Content-Type-Options
X-XSS-Protection
X-Request-ID
X-Correlation-ID
Content-Security-Policy
X-Content-Security-Policy
X-WebKit-CSP
ETag
X-Response-Time
X-EdgeConnect-MidMile-RTT
X-EdgeConnect-Origin-MEX-Latency
OriginIP
X-Akamai-Transformed
Vary
Content-Encoding
Date
Content-Length
Connection
Set-Cookie
Origin_hostname

@AlexanderSidorenko
Copy link

Same here. I was actually about to create an issue myself, but you beat me to it :)
My list of headers in the response is identical.
The last datapoint I have received through Tesla-JSON was on 2021-05-28, 12:04 PST.

@gglockner
Copy link
Owner

Remember folks, this library uses an undocumented API. Looks like Tesla changed the API again, and it will take some time to reverse engineer it.

@gglockner
Copy link
Owner

It looks like Tesla now requires you to complete a CAPTCHA. This isn't going to have a quick fix. Again, such is life with an undocumented API.

@Les-A
Copy link

Les-A commented May 31, 2021 via email

@OldGrumpyFart
Copy link

OldGrumpyFart commented Jun 1, 2021

Same exact problem here.

For reference/testing i also
test with tdorssers / TeslaPy (github)

It still works, the one I have was downloaded in Februari.

Would it be possible to snarf the login and wake_up code from TeslaPy ?

In another project they speculated it was the old/wrong USER_AGENT,
when updated their code magically started to work again ...

@Les-A
Copy link

Les-A commented Jun 2, 2021

Started working normally for me again at 2021-06-02 09:15:05 BST. Haven't made any changes. Maybe Tesla has backed out the change (temporarily?).

@OldGrumpyFart
Copy link

Ditto, suddenly works as before, no changes required.

@88gts
Copy link
Author

88gts commented Jul 8, 2021

Auth issues started appearing again yesterday. Working for anyone else?

@Les-A
Copy link

Les-A commented Jul 8, 2021

Problem started yesterday evening for me again (error references 'location'). It still isn't working now. I then tried TeslaPy and it appears to be working fine so presumably TeslaPy was fixed for the problem even though Tesla appeared to back the change out.

@spinkb
Copy link

spinkb commented Jul 10, 2021

Auth issues here too. Worked until a 2 or 3 days ago.

@ivomans
Copy link

ivomans commented Jul 15, 2021

Same problem 'KeyError: location' started for me on 2021-07-08.

@tux43
Copy link

tux43 commented Jul 24, 2021

I'm getting the same, anything that can be done? I miss this thing!

root@masterbot:/config# /config/unlock_car.sh Traceback (most recent call last): File "/config/unlock_car.py", line 4, in <module> c = teslajson.Connection('[email protected]', 'andapassword') File "/usr/local/lib/python3.9/site-packages/teslajson/teslajson.py", line 66, in __init__ self.fetch_token(**kwargs) File "/usr/local/lib/python3.9/site-packages/teslajson/teslajson.py", line 150, in fetch_token self.fetch_sso_token(**kwargs) File "/usr/local/lib/python3.9/site-packages/teslajson/teslajson.py", line 123, in fetch_sso_token m = re.search('code=([^&]*)',r.headers['location']) File "/usr/local/lib/python3.9/site-packages/requests/structures.py", line 54, in __getitem__ return self._store[key.lower()][1] KeyError: 'location'

@spinkb
Copy link

spinkb commented Jul 24, 2021

I changed over to TeslaPy...it handles the captcha and can give you the image to solve manually. One time action needed as it keeps using a refresh token after that. Worked for me. Maybe teslajson can implement the equivalent...

@tux43
Copy link

tux43 commented Jul 24, 2021

Thanks, I’ve just moved over to TeslaPy too, all good.

@johnbanks1
Copy link

I too am trying TeslaPy - the 2 suggested code snippets and cli.py and menu.py
But in every case I'm geting an error on line 210 of init.py
Credentials rejected Captcha is required Catcha does not match
Any suggestions most welcome
How do you get an image to solve manually? for example

@spinkb
Copy link

spinkb commented Aug 19, 2021

Ask your questions over on that project, not here. There is a snippet of source on the main page for TeslaPy showing how to do an alternate captcha solver where you can get the real file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants