TeslaSwift icon indicating copy to clipboard operation
TeslaSwift copied to clipboard

Tesla Auth web page not redrawing as you type on Mac

Open EpicDraws opened this issue 4 years ago • 4 comments

Admittedly, this feels very strange but after several hours debugging it, I'm convinced there's something happening on the login page causing this behavior.

I took the TeslaWebLoginViewController and changed it to an NSViewController (instead of UIViewController for iOS) and everything compiled well. In fact, if you ignore the redraw problem and enter your credentials, everything fully works.

But here's the crazy thing: when the OAuth login page is displayed within a WKWebView on Mac, it doesn't repaint as you type in each character (and the cursor doesn't blink either). If you switch to another window and then switch back, it refreshes one time. When I view the page within WKWebView on iOS, it works great.

It seems as though something on the page is causing it to act strangely on Mac, and it's preventing me from updating an app of mine as it is too hard to use when it doesn't show what you're typing. Any and all help greatly appreciated, as it would be great to ensure this library and auth also work for native Mac apps (and other than this small issue it works great!).

Here's a video showing the issue: https://user-images.githubusercontent.com/415110/107999457-3cc42180-6f9c-11eb-8567-c086602e92e8.mp4

Thank you!

EpicDraws avatar Feb 15 '21 22:02 EpicDraws

If you open the generated url in safari on the mac does it behave differently?

Sent from my iPhone

On 16 Feb 2021, at 00:45, EpicDraws [email protected] wrote:



Admittedly, this feels very strange but after several hours debugging it, I'm convinced there's something happening on the login page causing this behavior.

I took the TeslaWebLoginViewController and changed it to an NSViewController (instead of UIViewController for iOS) and everything compiled well. In fact, if you ignore the redraw problem and enter your credentials, everything fully works.

But here's the crazy thing: when the OAuth login page is displayed within a WKWebView on Mac, it doesn't repaint as you type in each character (and the cursor doesn't blink either). If you switch to another window and then switch back, it refreshes one time. When I view the page within WKWebView on iOS, it works great.

It seems as though something on the page is causing it to act strangely on Mac, and it's preventing me from updating an app of mine as it is too hard to use when it doesn't show what you're typing. Any and all help greatly appreciated, as it would be great to ensure this library and auth also work for native Mac apps (and other than this small issue it works great!).

Here's a video showing the issue: https://user-images.githubusercontent.com/415110/107999457-3cc42180-6f9c-11eb-8567-c086602e92e8.mp4

Thank you!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/jonasman/TeslaSwift/issues/72, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AANOMXX7RQKXXGIHEPWCC3DS7GPW3ANCNFSM4XVNMZUQ.

jonasman avatar Feb 15 '21 23:02 jonasman

It works correctly in Safari and Chrome, but when put in a WKWebView it exhibits the issue.

On Mon, Feb 15, 2021 at 3:36 PM João Nunes [email protected] wrote:

If you open the generated url in safari on the mac does it behave differently?

Sent from my iPhone

On 16 Feb 2021, at 00:45, EpicDraws [email protected] wrote:



Admittedly, this feels very strange but after several hours debugging it, I'm convinced there's something happening on the login page causing this behavior.

I took the TeslaWebLoginViewController and changed it to an NSViewController (instead of UIViewController for iOS) and everything compiled well. In fact, if you ignore the redraw problem and enter your credentials, everything fully works.

But here's the crazy thing: when the OAuth login page is displayed within a WKWebView on Mac, it doesn't repaint as you type in each character (and the cursor doesn't blink either). If you switch to another window and then switch back, it refreshes one time. When I view the page within WKWebView on iOS, it works great.

It seems as though something on the page is causing it to act strangely on Mac, and it's preventing me from updating an app of mine as it is too hard to use when it doesn't show what you're typing. Any and all help greatly appreciated, as it would be great to ensure this library and auth also work for native Mac apps (and other than this small issue it works great!).

Here's a video showing the issue:

https://user-images.githubusercontent.com/415110/107999457-3cc42180-6f9c-11eb-8567-c086602e92e8.mp4

Thank you!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub< https://github.com/jonasman/TeslaSwift/issues/72>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/AANOMXX7RQKXXGIHEPWCC3DS7GPW3ANCNFSM4XVNMZUQ>.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jonasman/TeslaSwift/issues/72#issuecomment-779494414, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADFLBQAHKQO3B2FMQSPFJLS7GVXZANCNFSM4XVNMZUQ .

EpicDraws avatar Feb 15 '21 23:02 EpicDraws

It appears to only affect the generated URL. using auth.tesla.com (or any other domain) works as expected.

wowthatisrandom avatar Feb 19 '21 14:02 wowthatisrandom

I just got this behaviour on the mac in Safari. The 2fa code was not repainting, neither the cursor was blinking. This sounds like a bug on WebKit or Tesla is using something unsupported

jonasman avatar Aug 06 '21 21:08 jonasman

Is this still valid?

jonasman avatar Apr 30 '23 21:04 jonasman

i will close this, please reopen if this is still an issue

jonasman avatar Aug 20 '23 10:08 jonasman