Closed 4brunu closed 3 years ago
Looks like a crash from WebKit, or rather from the ADAL/MSID library. The offending thread:
Thread 3 Crashed:: Dispatch queue: com.apple.root.default-qos
0 com.apple.WebKit 0x00007fff3c5bf7b3 WTFCrashWithInfo(int, char const*, char const*, int) + 19
1 com.apple.WebKit 0x00007fff3c75de03 WebKit::runInitializationCode(void*) + 73
2 libc++.1.dylib 0x00007fff20304e6a std::__1::__call_once(unsigned long volatile&, void*, void ()(void)) + 139
3 com.apple.WebKit 0x00007fff3c56363e WebKit::InitializeWebKit2() + 58
4 com.apple.WebKit 0x00007fff3c824687 -[WKWebViewConfiguration init] + 63
5 Microsoft.Authentication.Helper 0x00000001004f2634 __37+[MSIDWebviewUIController initialize]_block_invoke + 24
6 libdispatch.dylib 0x00007fff201c47c7 _dispatch_client_callout + 8
7 libdispatch.dylib 0x00007fff201c596b dispatch_once_callout + 20
8 Microsoft.Authentication.Helper 0x00000001004f261a +[MSIDWebviewUIController initialize] + 35
9 libobjc.A.dylib 0x00007fff2021bba5 CALLING_SOME+initialize_METHOD + 17
10 libobjc.A.dylib 0x00007fff2021c52e initializeNonMetaClass + 726
11 libobjc.A.dylib 0x00007fff2021c2b4 initializeNonMetaClass + 92
12 libobjc.A.dylib 0x00007fff2021c2b4 initializeNonMetaClass + 92
13 libobjc.A.dylib 0x00007fff2021d5b0 initializeAndMaybeRelock(objc_class*, objc_object*, mutex_tt&, bool) + 232
14 libobjc.A.dylib 0x00007fff2020d2b2 lookUpImpOrForward + 1126
15 libobjc.A.dylib 0x00007fff2020c89b _objc_msgSend_uncached + 75
16 Microsoft.Authentication.Helper 0x00000001004b8595 -[MSIDAADWebviewFactory embeddedWebviewSessionFromConfiguration:customWebview:context:] + 226
17 Microsoft.Authentication.Helper 0x00000001004f0f83 +[MSIDWebviewAuthorization startEmbeddedWebviewAuthWithConfiguration:oauth2Factory:webview:context:completionHandler:] + 169
18 Microsoft.Authentication.Helper 0x00000001004a9b60 +[ADWebAuthController(Internal) startWithRequest:promptBehavior:context:completion:] + 1109
19 Microsoft.Authentication.Helper 0x0000000100497694 -[ADAuthenticationRequest(WebRequest) requestCode:] + 421
20 Microsoft.Authentication.Helper 0x00000001004949a2 -[ADAuthenticationRequest(AcquireToken) requestTokenImpl:] + 348
21 Microsoft.Authentication.Helper 0x0000000100494610 -[ADAuthenticationRequest(AcquireToken) requestToken:] + 526
22 Microsoft.Authentication.Helper 0x0000000100494088 -[ADAuthenticationRequest(AcquireToken) validatedAcquireToken:] + 142
23 Microsoft.Authentication.Helper 0x0000000100493cbb __70-[ADAuthenticationRequest(AcquireToken) acquireToken:completionBlock:]_block_invoke.160 + 414
24 Microsoft.Authentication.Helper 0x000000010049ab23 __74-[ADAuthorityValidation checkAuthority:validateAuthority:completionBlock:]_block_invoke + 137
25 libdispatch.dylib 0x00007fff201c35dd _dispatch_call_block_and_release + 12
26 libdispatch.dylib 0x00007fff201c47c7 _dispatch_client_callout + 8
27 libdispatch.dylib 0x00007fff201c6e1c _dispatch_queue_override_invoke + 777
28 libdispatch.dylib 0x00007fff201d3857 _dispatch_root_queue_drain + 326
29 libdispatch.dylib 0x00007fff201d3fb8 _dispatch_worker_thread2 + 92
30 libsystem_pthread.dylib 0x00007fff2036c453 _pthread_wqthread + 244
31 libsystem_pthread.dylib 0x00007fff2036b467 start_wqthread + 15
Opened issue with the ADAL Obj-C project to see if they have any insight here: https://github.com/AzureAD/azure-activedirectory-library-for-objc/issues/1566
This is causing Blocking UI when Xcode refreshes a repo's status on MacOS. It is also preventing onboarding. We can't rollback due to lack of M1 support.
Crash Report:
This crash has reportedly been fixed in the ADAL library. Can we expect a new release with that fix any time soon?
We currently plan to remove the native macOS helper that's based on ADAL altogether as part of some other changes (to move away from Azure DevOps PATs and use AAD/MSA access tokens directly), but that's still a work-in-progress.
To workaround this issue for now, please try either of the following:
Set the GCM_MSAUTH_HELPER
environment variable to the empty string in your profile:
export GCM_MSAUTH_HELPER=""
Set the credential.msauthHelper
setting in Git configuration to the empty string:
git config --global credential.msauthHelper ""
This will tell GCM not to use any helper, and rely on it's own .NET-based MSAL library in-process. This will launch the user's default web browser to complete authentication.
You can also set GCM_MSAUTH_FLOW
or credential.msauthFlow
to devicecode
in order to use a text-based device code prompt, rather than auto-launching the default browser.
We've started using this work around and it's working perfectly for us. Thanks!
Thank you! This worked perfectly on my M1 MBP
@mjcheetham , if we use the git config --global credential.msauthHelper ""
workaround, is that something we'll need to undo later after this bug is fixed, or is it benign if the global config just hangs around indefinitely?
Experiencing the same issue. looking forward to the fix being released.
@mjcheetham , if we use the
git config --global credential.msauthHelper ""
workaround, is that something we'll need to undo later after this bug is fixed, or is it benign if the global config just hangs around indefinitely?
@APLmath, this is benign, as we will no longer be reading from this setting at all. It would be good to clear it away after the new release is done, but that's just my compulsion for cleanliness 😉
Update we're in the process of cutting a new release that will trivially fix this.. by deleting the native helper component 😅
I'm not seeing the new cut as an available Release, or on homebrew yet. (last release was cut and posted the same day)
I'm not seeing the new cut as an available Release, or on homebrew yet. (last release was cut and posted the same day)
Hi @aaroncrespo the new release (2.0.374) should be out on our microsoft/git
Homebrew Tap now:
https://github.com/microsoft/homebrew-git/commit/7cc6b1f423b1c150cb87471900503a3b18dba268
The GitHub release has been made a 'full' release (promoted from pre-release): https://github.com/microsoft/Git-Credential-Manager-Core/releases/tag/v2.0.374-beta
You should be able to upgrade with brew upgrade git-credential-manager-core
Closing this issue now as we've removed the native helper from GCM on macOS. If there are more issues, please open a new issue :)
Which version of GCM Core are you using?
Git Credential Manager version 2.0.318-beta+44acfafa98 (macOS, .NET Core 3.1.10)
Which Git host provider are you trying to connect to?
Can you access the remote repository directly in the browser using the remote URL?
[Azure DevOps only] What format is your remote URL?
[Azure DevOps only] If the account picker shows more than one identity as you authenticate, check that you selected the same one that has access on the web.
Expected behavior
I am authenticated and my Git operation completes successfully.
Actual behavior
When I perform
git fetch
it outputs the following error:fatal: helper error (133): Unknown
Logs
Set the environment variables
GCM_TRACE=1
andGIT_TRACE=1
and re-run your Git command. Review and redact any private information and attach the log.Log
Process: Microsoft.Authentication.Helper [4080] Path: /usr/local/share/gcm-core/Microsoft.Authentication.Helper Identifier: Microsoft.Authentication.Helper Version: 0 Code Type: X86-64 (Native) Parent Process: git-credential-manager-core [4062] Responsible: Terminal [621] User ID: 501 Date/Time: 2021-01-12 16:40:56.324 +0000 OS Version: macOS 11.1 (20C69) Report Version: 12 Bridge OS Version: 3.0 (14Y908) Anonymous UUID: C9F3BBB0-22FF-A8F2-3D0C-2583C1CC7FE3 Time Awake Since Boot: 2400 seconds System Integrity Protection: enabled Crashed Thread: 3 Dispatch queue: com.apple.root.default-qos Exception Type: EXC_BREAKPOINT (SIGTRAP) Exception Codes: 0x0000000000000002, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Termination Signal: Trace/BPT trap: 5 Termination Reason: Namespace SIGNAL, Code 0x5 Terminating Process: exc handler [4080] Application Specific Information: dyld: in dlopen() /System/Library/Frameworks/CoreTelephony.framework/Versions/A/CoreTelephony Thread 0:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x00007fff2033ae7e mach_msg_trap + 10 1 libsystem_kernel.dylib 0x00007fff2033b1f0 mach_msg + 60 2 com.apple.CoreFoundation 0x00007fff20467bf7 __CFRunLoopServiceMachPort + 316 3 com.apple.CoreFoundation 0x00007fff204662ca __CFRunLoopRun + 1315 4 com.apple.CoreFoundation 0x00007fff204656ce CFRunLoopRunSpecific + 563 5 com.apple.HIToolbox 0x00007fff286ea6d0 RunCurrentEventLoopInMode + 292 6 com.apple.HIToolbox 0x00007fff286ea4cc ReceiveNextEventCommon + 709 7 com.apple.HIToolbox 0x00007fff286ea1ef _BlockUntilNextEventMatchingListInModeWithFilter + 64 8 com.apple.AppKit 0x00007fff22c82de9 _DPSNextEvent + 883 9 com.apple.AppKit 0x00007fff22c815af -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1366 10 com.apple.AppKit 0x00007fff22c73b0a -[NSApplication run] + 586 11 Microsoft.Authentication.Helper 0x00000001004864d5 -[AHAppDelegate run] + 195 12 Microsoft.Authentication.Helper 0x0000000100485ec5 +[AHGenerateAccessToken generateAccessTokenWithAuthority:clientId:resource:redirectUri:error:logger:] + 391 13 Microsoft.Authentication.Helper 0x0000000100484fda main + 1273 14 libdyld.dylib 0x00007fff2038a621 start + 1 Thread 1: 0 libsystem_pthread.dylib 0x00007fff2036b458 start_wqthread + 0 Thread 2: 0 libsystem_pthread.dylib 0x00007fff2036b458 start_wqthread + 0 Thread 3 Crashed:: Dispatch queue: com.apple.root.default-qos 0 com.apple.WebKit 0x00007fff3c5bf7b3 WTFCrashWithInfo(int, char const*, char const*, int) + 19 1 com.apple.WebKit 0x00007fff3c75de03 WebKit::runInitializationCode(void*) + 73 2 libc++.1.dylib 0x00007fff20304e6a std::__1::__call_once(unsigned long volatile&, void*, void (*)(void*)) + 139 3 com.apple.WebKit 0x00007fff3c56363e WebKit::InitializeWebKit2() + 58 4 com.apple.WebKit 0x00007fff3c824687 -[WKWebViewConfiguration init] + 63 5 Microsoft.Authentication.Helper 0x00000001004f2634 __37+[MSIDWebviewUIController initialize]_block_invoke + 24 6 libdispatch.dylib 0x00007fff201c47c7 _dispatch_client_callout + 8 7 libdispatch.dylib 0x00007fff201c596b _dispatch_once_callout + 20 8 Microsoft.Authentication.Helper 0x00000001004f261a +[MSIDWebviewUIController initialize] + 35 9 libobjc.A.dylib 0x00007fff2021bba5 CALLING_SOME_+initialize_METHOD + 17 10 libobjc.A.dylib 0x00007fff2021c52e initializeNonMetaClass + 726 11 libobjc.A.dylib 0x00007fff2021c2b4 initializeNonMetaClass + 92 12 libobjc.A.dylib 0x00007fff2021c2b4 initializeNonMetaClass + 92 13 libobjc.A.dylib 0x00007fff2021d5b0 initializeAndMaybeRelock(objc_class*, objc_object*, mutex_tt