Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCM is unable to find libSkiaSharp on Ubuntu in WSL #1164

Open
saaska opened this issue Mar 27, 2023 · 7 comments
Open

GCM is unable to find libSkiaSharp on Ubuntu in WSL #1164

saaska opened this issue Mar 27, 2023 · 7 comments
Labels
bug A bug in Git Credential Manager

Comments

@saaska
Copy link

saaska commented Mar 27, 2023

Version
2.0.935+8b4735fc7b

Operating system
Windows 11 Pro x64, WSL, Ubuntu 22.04.2 LTS.
Installed a fresh Ubuntu in WSL, downloaded https://github.com/git-ecosystem/git-credential-manager/releases/download/v2.0.935/gcm-linux_amd64.2.0.935.deb, installed it with deb -i, installed gpg and pass, ran

gpg --gen-key
pass init <gpg_id>
export GCM_CREDENTIAL_STORE=gpg
git-credential-manager configure

What Git host provider are you trying to connect to?
A private GitBucket host.

Expected behavior
When I git clone a new repo, a GUI window with login/password form appears.

Actual behavior
An exception "System.DllNotFoundException" is thrown, and a standard console prompt Username for '<repo_url>': apears.

Logs

Unhandled exception. System.TypeInitializationException: The type initializer for 'SkiaSharp.SKImageInfo' threw an exception.
 ---> System.DllNotFoundException: Unable to load shared library 'libSkiaSharp' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibSkiaSharp: cannot open shared object file: No such file or directory
   at SkiaSharp.SkiaApi.sk_colortype_get_default_8888()
   at SkiaSharp.SKImageInfo..cctor()
   --- End of inner exception stack trace ---
   at Avalonia.Skia.PlatformRenderInterface..ctor(ISkiaGpu skiaGpu, Nullable`1 maxResourceBytes) in /_/src/Skia/Avalonia.Skia/PlatformRenderInterface.cs:line 27
   at Avalonia.Skia.SkiaPlatform.Initialize(SkiaOptions options) in /_/src/Skia/Avalonia.Skia/SkiaPlatform.cs:line 20
   at Avalonia.SkiaApplicationExtensions.<>c__0`1.<UseSkia>b__0_0() in /_/src/Skia/Avalonia.Skia/SkiaApplicationExtensions.cs:line 20
   at Avalonia.Controls.AppBuilderBase`1.Setup() in /_/src/Avalonia.Controls/AppBuilderBase.cs:line 304
   at Avalonia.Controls.AppBuilderBase`1.SetupWithoutStarting() in /_/src/Avalonia.Controls/AppBuilderBase.cs:line 167
   at GitCredentialManager.UI.AvaloniaUi.<>c__DisplayClass6_1.<ShowWindowAsync>b__1()
   at GitCredentialManager.UI.Dispatcher.DispatcherJob.Execute()
   at GitCredentialManager.UI.Dispatcher.DispatcherJobQueue.Run()
   at GitCredentialManager.UI.Dispatcher.Run()
   at GitCredentialManager.UI.Program.Main(String[] args)
fatal: helper error (134): Unknown

running with LD_DEBUG=libs git clone <repo_url> displays

      1488:     find library=libSkiaSharp.so [0]; searching
      1488:      search cache=/etc/ld.so.cache
      1488:      search path=/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/lib:/usr/lib              (system search path)
      1488:       trying file=/lib/x86_64-linux-gnu/libSkiaSharp.so
      1488:       trying file=/usr/lib/x86_64-linux-gnu/libSkiaSharp.so
      1488:       trying file=/lib/libSkiaSharp.so
      1488:       trying file=/usr/lib/libSkiaSharp.so
      1488:
      1488:     find library=liblibSkiaSharp.so [0]; searching
      1488:      search cache=/etc/ld.so.cache
      1488:      search path=/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/lib:/usr/lib              (system search path)
      1488:       trying file=/lib/x86_64-linux-gnu/liblibSkiaSharp.so
      1488:       trying file=/usr/lib/x86_64-linux-gnu/liblibSkiaSharp.so
      1488:       trying file=/lib/liblibSkiaSharp.so
      1488:       trying file=/usr/lib/liblibSkiaSharp.so
      1488:
      1488:     find library=libSkiaSharp [0]; searching
      1488:      search cache=/etc/ld.so.cache
      1488:      search path=/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/lib:/usr/lib              (system search path)
      1488:       trying file=/lib/x86_64-linux-gnu/libSkiaSharp
      1488:       trying file=/usr/lib/x86_64-linux-gnu/libSkiaSharp
      1488:       trying file=/lib/libSkiaSharp
      1488:       trying file=/usr/lib/libSkiaSharp
      1488:
      1488:     find library=liblibSkiaSharp [0]; searching
      1488:      search cache=/etc/ld.so.cache
      1488:      search path=/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/lib:/usr/lib              (system search path)
      1488:       trying file=/lib/x86_64-linux-gnu/liblibSkiaSharp
      1488:       trying file=/usr/lib/x86_64-linux-gnu/liblibSkiaSharp
      1488:       trying file=/lib/liblibSkiaSharp
      1488:       trying file=/usr/lib/liblibSkiaSharp

Actually, the library is there:

$ ls -l /usr/local/share/gcm-core/
total 446476
-rwxr-xr-x 1 1001 123 94742189 Feb 28 22:10 Atlassian.Bitbucket.UI
-rwxr-xr-x 1 1001 123 94777769 Feb 28 22:10 GitHub.UI
-rwxr-xr-x 1 1001 123 94709673 Feb 28 22:10 GitLab.UI
-rwxr-xr-x 1 1001 123     2597 Feb 28 22:10 NOTICE
-rwxr-xr-x 1 1001 123 67423508 Feb 28 22:10 git-credential-manager
-rwxr-xr-x 1 1001 123 94669764 Feb 28 22:10 git-credential-manager-ui
-rwxr-xr-x 1 1001 123  1607016 Feb 28 22:10 libHarfBuzzSharp.so
-rwxr-xr-x 1 1001 123  9240832 Feb 28 22:10 libSkiaSharp.so
@ldennington
Copy link
Contributor

ldennington commented Mar 27, 2023

Can you run git-credential-manager diagnose and attach the output?

@saaska
Copy link
Author

saaska commented Mar 28, 2023

Reports nothing wrong

$ git-credential-manager diagnose
Running diagnostics...

 [ OK ] Environment
 [ OK ] File system
 [ OK ] Networking
 [ OK ] Git
 [ OK ] Credential storage
 [ OK ] Microsoft authentication (AAD/MSA)
 [ OK ] GitHub API

Diagnostic summary: 7 passed, 0 skipped, 0 failed.
Log files:
  /tmp/gcm-diagnose.log

Caution: Log files may include sensitive information - redact before sharing.

@ldennington
Copy link
Contributor

Can you attach the full output log file?

@jasonparfitt
Copy link

I had this same issue. For me the solution was just to run git config --global credential.guiPrompt false since my wsl ubuntu has no GUI

@leonardopn
Copy link

My solution using arch linux: install the lib git-credential-manager-core-extras

image

This lib add many UI's support for your git-credential-manager

@j-koziel
Copy link

I had this same issue. For me the solution was just to run git config --global credential.guiPrompt false since my wsl ubuntu has no GUI

Thank you this worked for me 👍

@ldennington ldennington added the bug A bug in Git Credential Manager label Aug 28, 2023
@schmellow
Copy link

schmellow commented Nov 11, 2023

Possibly related: just hit this on completely fresh install
In my case error message is a bit different and the actual culprit is missing libfontconfig
"apt install build-essential" pulls it in and fixes the problem (you could install it directly, but i needed it for node anyway)
image

Maybe deb package should have some dependencies set? Or documented (which is probably more cross-distro compatible solution)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug in Git Credential Manager
Projects
None yet
Development

No branches or pull requests

6 participants