tesla_auth icon indicating copy to clipboard operation
tesla_auth copied to clipboard

Terminating app due to uncaught exception 'NSInvalidArgumentException' on macOS

Open bendinwire opened this issue 3 years ago • 7 comments

Happens when clicking the captcha images. Crashes out and gives me this :

2021-10-26 20:41:07.935 tesla_auth[58475:659920] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[15]'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007ff806e88e5b __exceptionPreprocess + 242
	1   libobjc.A.dylib                     0x00007ff806be9b9d objc_exception_throw + 48
	2   CoreFoundation                      0x00007ff806f44404 _CFThrowFormattedException + 202
	3   CoreFoundation                      0x00007ff806f4ec71 -[__NSPlaceholderDictionary initWithCapacity:].cold.1 + 0
	4   CoreFoundation                      0x00007ff806d97e62 -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 251
	5   CoreFoundation                      0x00007ff806d97d4d +[NSDictionary dictionaryWithObjects:forKeys:count:] + 49
	6   VisionKitCore                       0x00007ffb1605c9d1 -[VKAnalyticsAnalyzerEvent coreAnalyticsDictionary] + 1292
	7   VisionKitCore                       0x00007ffb1602007c -[VKAnalyticsProcessor processAndSendEvent:] + 96
	8   VisionKitCore                       0x00007ffb160164b6 __69-[VKImageAnalyzer _processRequest:progressHandler:completionHandler:]_block_invoke_2 + 1254
	9   libdispatch.dylib                   0x00007ff806b8ead8 _dispatch_call_block_and_release + 12
	10  libdispatch.dylib                   0x00007ff806b8fcc9 _dispatch_client_callout + 8
	11  libdispatch.dylib                   0x00007ff806b95cee _dispatch_lane_serial_drain + 696
	12  libdispatch.dylib                   0x00007ff806b967c8 _dispatch_lane_invoke + 366
	13  libdispatch.dylib                   0x00007ff806ba07e1 _dispatch_workloop_worker_thread + 758
	14  libsystem_pthread.dylib             0x00007ff806d4308f _pthread_wqthread + 326
	15  libsystem_pthread.dylib             0x00007ff806d4201b start_wqthread + 15
)
libc++abi: terminating with uncaught exception of type NSException
[1]    58475 abort      tesla_auth```

This is git cloned, not the binary.

rustc 1.56.0 (09c42c458 2021-10-18)

bendinwire avatar Oct 27 '21 03:10 bendinwire

Is this happening on an M1 mac?

adriankumpf avatar Oct 27 '21 08:10 adriankumpf

No a 2019 Mac Pro, macOS Monterey v 12.0.1.

bendinwire avatar Oct 27 '21 15:10 bendinwire

No a 2019 Mac Pro, macOS Monterey v 12.0.1.

Exact same problem for me MacBook Pro 16" 2019 (intel) + macOS Monterey v 12.0.1 Same problem with v 0.3.0 and 0.4.0

p2cardon avatar Nov 27 '21 15:11 p2cardon

No a 2019 Mac Pro, macOS Monterey v 12.0.1.

Exact same problem for me MacBook Pro 16" 2019 (intel) + macOS Monterey v 12.0.1 Same problem with v 0.3.0 and 0.4.0

Now on a MacBook Pro, M1, same problem DEBUG [tesla_auth] Opening https://auth.tesla.com/oauth2/v3/authorize?response_type=code&client_id=ownerapi&state=xxxxxxxxxxx&code_challenge=xxxxxxxxxxxxx-xxxxx&code_challenge_method=S256&redirect_uri=https%3A%2F%2Fauth.tesla.com%2Fvoid%2Fcallback&scope=openid+email+offline_access ... DEBUG [tesla_auth] URL changed: https://auth.tesla.com/oauth2/v3/authorize?response_type=code&client_id=ownerapi&state=6XgE-WndhxGXSNW-RWd2Lg&code_challenge=FRXt9ZRO_MicxswZryt5d0p-mMOolKmhkJXwduisq8g&code_challenge_method=S256&redirect_uri=https%3A%2F%2Fauth.tesla.com%2Fvoid%2Fcallback&scope=openid+email+offline_access DEBUG [tesla_auth] URL changed: https://auth.tesla.com/oauth2/v3/authorize?response_type=code&client_id=ownerapi&state=6XgE-WndhxGXSNW-RWd2Lg&code_challenge=xxxxxx-xxxxxxxxx&code_challenge_method=S256&redirect_uri=https%3A%2F%2Fauth.tesla.com%2Fvoid%2Fcallback&scope=openid+email+offline_access 2021-12-26 14:53:29.003 tesla_auth[4590:168561] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[15]' *** First throw call stack: ( 0 CoreFoundation 0x00007ff81e65e6cb __exceptionPreprocess + 242 1 libobjc.A.dylib 0x00007ff81e3c0dce objc_exception_throw + 48 2 CoreFoundation 0x00007ff81e719a67 _CFThrowFormattedException + 194 3 CoreFoundation 0x00007ff81e7242d1 -[__NSPlaceholderDictionary initWithCapacity:].cold.1 + 0 4 CoreFoundation 0x00007ff81e56e723 -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 251 5 CoreFoundation 0x00007ff81e56e60e +[NSDictionary dictionaryWithObjects:forKeys:count:] + 49 6 VisionKitCore 0x00007ffb2e2d2a31 -[VKAnalyticsAnalyzerEvent coreAnalyticsDictionary] + 1292 7 VisionKitCore 0x00007ffb2e295fec -[VKAnalyticsProcessor processAndSendEvent:] + 96 8 VisionKitCore 0x00007ffb2e28c426 __69-[VKImageAnalyzer _processRequest:progressHandler:completionHandler:]_block_invoke_2 + 1254 9 libdispatch.dylib 0x00007ff81e362ad8 _dispatch_call_block_and_release + 12 10 libdispatch.dylib 0x00007ff81e363cc9 _dispatch_client_callout + 8 11 libdispatch.dylib 0x00007ff81e369cee _dispatch_lane_serial_drain + 696 12 libdispatch.dylib 0x00007ff81e36a7c8 _dispatch_lane_invoke + 366 13 libdispatch.dylib 0x00007ff81e3747e1 _dispatch_workloop_worker_thread + 758 14 libsystem_pthread.dylib 0x00007ff81e51a074 _pthread_wqthread + 326 15 libsystem_pthread.dylib 0x00007ff81e518ffb start_wqthread + 15 ) libc++abi: terminating with uncaught exception of type NSException Abort trap: 6

The crash occurs when validating the "captcha", if for any reason the login process don't ask for captcha, all runs fine for me

p2cardon avatar Dec 26 '21 13:12 p2cardon

This seems to be a WebKit bug that is being tracked here: https://bugs.webkit.org/show_bug.cgi?id=234699 / https://github.com/tauri-apps/tauri/issues/2934

The only workaround I know of is to try again until no captcha is required.

adriankumpf avatar Jan 01 '22 22:01 adriankumpf

This seems to be a WebKit bug that is being tracked here: https://bugs.webkit.org/show_bug.cgi?id=234699 / tauri-apps/tauri#2934

The only workaround I know of is to try again until no captcha is required.

Thank you for your answer. What is weird is the fact this bug was discovered very recently … waiting for a webkit fix

Regards

p2cardon avatar Jan 02 '22 10:01 p2cardon

I have already signal the same here https://github.com/webview/webview/issues/627

vincehi avatar Jan 04 '22 20:01 vincehi

I'll close this for now, since a new macOS has been released in the meantime and quite a few dependencies have been updated.

adriankumpf avatar Feb 20 '23 18:02 adriankumpf