git-ecosystem / git-credential-manager

Secure, cross-platform Git credential storage with authentication to GitHub, Azure Repos, and other popular Git hosting services.
Other
6.63k stars 1.72k forks source link

fatal: Default font family name can't be null or empty. #1575

Open ThePlenkov opened 5 months ago

ThePlenkov commented 5 months ago

Version

2.4.1.0

Operating system

Linux

OS version or distribution

Ubuntu 23.10

Git hosting provider(s)

GitLab

Other hosting provider

No response

(Azure DevOps only) What format is your remote URL?

None

Can you access the remote repository directly in the browser?

Yes, I can access the repository

Expected behavior

I expect my project is cloned

Actual behavior

Cloning into 'mqtt-proxy'...
11:36:46.800923 ...e/Application.cs:106 trace: [RunInternalAsync] Version: 2.4.1.0
11:36:46.803410 ...e/Application.cs:107 trace: [RunInternalAsync] Runtime: .NET 7.0.17
11:36:46.803462 ...e/Application.cs:108 trace: [RunInternalAsync] Platform: Linux (x86-64)
11:36:46.803467 ...e/Application.cs:109 trace: [RunInternalAsync] OSVersion: Ubuntu 23.10
11:36:46.803484 ...e/Application.cs:110 trace: [RunInternalAsync] AppPath: /home/pplenkov/.dotnet/tools/git-credential-manager
11:36:46.803563 ...e/Application.cs:111 trace: [RunInternalAsync] InstallDir: /home/pplenkov/.dotnet/tools/.store/git-credential-manager/2.4.1/git-credential-manager/2.4.1/tools/net7.0/any/
11:36:46.803602 ...e/Application.cs:112 trace: [RunInternalAsync] Arguments: get
11:36:46.819550 ...GitCommandBase.cs:32 trace: [ExecuteAsync] Start 'get' command...
11:36:46.828473 ...GitCommandBase.cs:46 trace: [ExecuteAsync] Detecting host provider for input:
11:36:46.829787 ...GitCommandBase.cs:47 trace: [ExecuteAsync]   protocol=https
11:36:46.829874 ...GitCommandBase.cs:47 trace: [ExecuteAsync]   host=gitlab.booking.com
11:36:46.829889 ...GitCommandBase.cs:47 trace: [ExecuteAsync]   wwwauth=Basic realm="GitLab"
11:36:46.832169 ...oviderRegistry.cs:99 trace: [GetProviderAsync] Host provider override was set id='gitlab'
11:36:46.833614 ...GitCommandBase.cs:49 trace: [ExecuteAsync] Host provider 'GitLab' was selected.
11:36:46.837834 ...edentialStore.cs:359 trace: [GetGpgPath] Using PATH-located GPG (gpg2) executable: /usr/bin/gpg2
11:36:46.844616 ...bHostProvider.cs:134 trace: [GetSupportedAuthenticationModes] Supported authentication modes override present: Browser
fatal: Default font family name can't be null or empty.
   at Avalonia.Media.FontManager..ctor(IFontManagerImpl platformImpl)
   at Avalonia.Media.FontManager.get_Current()
   at Avalonia.Media.Typeface.get_GlyphTypeface()
   at Avalonia.Rendering.Composition.Compositor.get_DiagnosticTextRenderer()
   at Avalonia.Rendering.Composition.Compositor.CreateCompositionTarget(Func`1 surfaces)
   at Avalonia.Rendering.Composition.CompositingRenderer..ctor(IRenderRoot root, Compositor compositor, Func`1 surfaces)
   at Avalonia.Controls.TopLevel..ctor(ITopLevelImpl impl, IAvaloniaDependencyResolver dependencyResolver)
   at Avalonia.Controls.WindowBase..ctor(IWindowBaseImpl impl, IAvaloniaDependencyResolver dependencyResolver)
   at Avalonia.Controls.WindowBase..ctor(IWindowBaseImpl impl)
   at Avalonia.Controls.Window..ctor(IWindowImpl impl)
   at Avalonia.Controls.Window..ctor()
   at GitCredentialManager.UI.Controls.DialogWindow..ctor(Control view)
   at GitCredentialManager.UI.AvaloniaUi.<>c__4`1.<ShowViewAsync>b__4_0()
   at GitCredentialManager.UI.AvaloniaUi.ShowWindowInternal(Func`1 windowFunc, Object dataContext, IntPtr parentHandle, CancellationToken ct)
   at GitCredentialManager.UI.AvaloniaUi.<>c__DisplayClass8_0.<ShowWindowAsync>b__0()
   at Avalonia.Threading.DispatcherOperation`1.InvokeCore()
--- End of stack trace from previous location ---
   at GitLab.GitLabAuthentication.GetAuthenticationViaUiAsync(Uri targetUri, String userName, AuthenticationModes modes)
   at GitLab.GitLabAuthentication.GetAuthenticationAsync(Uri targetUri, String userName, AuthenticationModes modes)
   at GitLab.GitLabHostProvider.GenerateCredentialAsync(InputArguments input)
   at GitLab.GitLabHostProvider.GetCredentialAsync(InputArguments input)
   at GitCredentialManager.Commands.GetCommand.ExecuteInternalAsync(InputArguments input, IHostProvider provider)
   at GitCredentialManager.Commands.GitCommandBase.ExecuteAsync()
   at System.CommandLine.Invocation.AnonymousCommandHandler.InvokeAsync(InvocationContext context)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass17_0.<<UseParseErrorReporting>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass15_0.<<AddMiddleware>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<<UseVersionOption>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass19_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__18_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<<UseParseDirective>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__5_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass8_0.<<UseExceptionHandler>b__0>d.MoveNext()

Logs

No response

ThePlenkov commented 5 months ago

Seems to be related to https://github.com/AvaloniaUI/Avalonia/issues/4427

ThePlenkov commented 5 months ago

I'm not a developer in this stack but just thinking loud - since this UI cannot find the default script - isn't it better to redefine with some custom font and just make sure it's always installed:

https://docs.avaloniaui.net/docs/guides/styles-and-resources/how-to-use-fonts

ThePlenkov commented 5 months ago

as I also understood this property has to be set somehow in the app: https://reference.avaloniaui.net/api/Avalonia.Media/FontFamily/A45B6BE0

Gillibald commented 5 months ago

Overriding the system font collection with some embedded font is the best option to avoid this issue

ThePlenkov commented 5 months ago

Overriding the system font collection with some embedded font is the best option to avoid this issue

do you know is it possible to do from CLI somehow? May be some command or environment variable? thanks!

hollyplankdev commented 2 months ago

For what it's worth - I ran into this as well when running git-credential-manager github login on Ubuntu 24. I just worked around it using the --no-ui flag - so:

git-credential-manager github login --no-ui