tesla_auth icon indicating copy to clipboard operation
tesla_auth copied to clipboard

Running on Windows 10

Open natrlhy opened this issue 3 years ago • 7 comments

I tried running this on my WIndows 10 PC and get this:

C:\Users\myid\Desktop>tesla_auth.exe -d
Error: webview2 error, HRESULT 0x80070002

I'll poke around some more as I'm wondeirng if I need to install WebView2. I have a pretty standard install of Windows 10 though and use Firefox as my default browser.

natrlhy avatar Sep 19 '21 19:09 natrlhy

As I understood it, WebView2 requires the preview channel of Microsoft Edge and/or a prerelease version of the WebView2 SDK. Let me know if you get it working :)

adriankumpf avatar Sep 19 '21 20:09 adriankumpf

Not seeing any issues with it after installing the Canary release of MS Edge!

Step 1: Run the tesla_auth.exe excecutable in a command prompt window. Step 2. Enter your Tesla Account credentials. If you use MFA, it's the same process, just enter the MFA code into the the 2nd window.

image

image

You'll get a final window with the Access Token and Refresh Token.

image

CMD window:

C:\Users\myid\Desktop>tesla_auth.exe

--------------------------------- ACCESS TOKEN ---------------------------------

qts-longstringhere

--------------------------------- REFRESH TOKEN --------------------------------

evenlongerstringhere :)

---------------------------------- VALID UNTIL ---------------------------------

2021-11-03 21:47:41 UTC

When you close the Tesla Auth window, it brings you back to the cmd prompt. Nice!

It will create a directory called tesla_auth.exe.WebView2 in the same folder you run the tesla_auth.exe file from that caches your credentials and other WebView2 data

natrlhy avatar Sep 19 '21 21:09 natrlhy

Awesome, glad to hear that it works on Windows too. Thanks for the detailed feedback!

adriankumpf avatar Sep 20 '21 09:09 adriankumpf

After trying I got "Page Not Found" Any help will be greatly appreciated It's a Chinese Tesla account if there is any diffience tesla.com vs tesla.cn

My TeslaMate setup is trying to refresh token every 3 mintus causing imcomplete Drives data, all recorded drives are 3-5 minutes long only

POST https://auth.tesla.cn/oauth2/v3/token -> 200 (52.316 ms) Scheduling token refresh in 3 min

Thanks in advance for the help.

ddjj181 avatar Oct 26 '21 03:10 ddjj181

Just tried again, this time it shows Generating Token Then error message: An error occured. Please try again ... Server returned error response

ddjj181 avatar Oct 28 '21 01:10 ddjj181

Just tried again, this time it shows Generating Token Then error message: An error occured. Please try again ... Server returned error response

We'll need to add extra support for Chinese auth servers. I'll create a separate issue for that (#9).

adriankumpf avatar Nov 01 '21 11:11 adriankumpf

hi

just install this https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section and it works no need the canary release of edge

jul2003 avatar Jun 14 '22 10:06 jul2003