NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.86k stars 13.93k forks source link

galaxy-buds-client runtime error #306671

Open MisileLab opened 5 months ago

MisileLab commented 5 months ago

Describe the bug

raise library not found error on run

Steps To Reproduce

Steps to reproduce the behavior:

  1. run galaxy-buds-client

Expected behavior

App running without issue

Additional context

log

[10:20:42 INF] Using settings file at: /home/misile/.local/share/GalaxyBudsClient/config.json
[10:20:42 INF] SingleInstanceWatcher: Server listening at tcp:host=::1,port=54532
[X11Platform] SMLib/ICELib reported a new error: SESSION_MANAGER environment variable not defined (X11PlatformLifetimeEvents #26501661)
[10:20:43 DBG] BluetoothImpl: Using Linux.BluetoothService
[10:20:43 ERR] 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.SetupWithLifetime(IApplicationLifetime lifetime) in /_/src/Avalonia.Controls/AppBuilderBase.cs:line 179
   at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime[T](T builder, String[] args, ShutdownMode shutdownMode) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 208
   at GalaxyBudsClient.Program.Main(String[] args) in /build/source/GalaxyBudsClient/Program.cs:line 131

Notify maintainers

@Icy-Thought

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.8.7, NixOS, 24.05 (Uakari), 24.05pre615930.572af610f615`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - channels(root): `"nixos"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Add a :+1: reaction to issues you find important.

nyabinary commented 2 months ago

So uh any fix to this? @Icy-Thought

Icy-Thought commented 2 months ago

Haven't fidgeted with dotnet yet because of IRL renovations and work. Apologies everyone, I guess I need to remove myself from the maintainers because of the situation.

MisileLab commented 2 months ago

So uh any fix to this? @Icy-Thought

add fontconfig to dependency seems fix for that

Icy-Thought commented 2 months ago

Oh, will try that out right now and submit a PR if I managed to get it working. Thanks for the update @MisileLab!

Icy-Thought commented 2 months ago

Mind explaining where and how it fixes the issue?

 ./result/bin/GalaxyBudsClient        
[22:34:16 INF] PlatformImpl: Using LinuxPlatformImplCreator
[22:34:16 INF] IpcService: Service listening on the session bus
[22:34:16 ERR] Unhandled exception in main thread
System.ArgumentException: An item with the same key has already been added. Key: /i18n/cn.axaml
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](List`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at Avalonia.Platform.Internal.AssemblyDescriptor..ctor(Assembly assembly)
   at Avalonia.Platform.StandardAssetLoader..ctor(IAssemblyDescriptorResolver resolver, Assembly assembly)
   at Avalonia.Platform.StandardAssetLoader..ctor(Assembly assembly)
   at Avalonia.Platform.StandardRuntimePlatformServices.Register(Assembly assembly)
   at Avalonia.AppBuilder.<UseStandardRuntimePlatformSubsystem>b__68_0()
   at Avalonia.AppBuilder.SetupUnsafe()
   at Avalonia.AppBuilder.Setup()
   at Avalonia.AppBuilder.SetupWithLifetime(IApplicationLifetime lifetime)
   at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime(AppBuilder builder, String[] args, ShutdownMode shutdownMode)
   at GalaxyBudsClient.Program.Main(String[] args) in /build/source/GalaxyBudsClient/Program.cs:line 118

^ is what I get (+ used to get) with fontconfig being added in the runtimeDeps section.

Green-D-683 commented 1 month ago

I'm also experiencing the titular issue.

I've done a little research and according to stackoverflow it may be able to be fixed by using SkiaSharp.NativeAssets.Linux.NoDependencies instead of SkiaSharp.NativeAssets.Linux. I know practically nothing about C# development, so I'm not confident testing this, but I thought I'd link this here in case it ends up helping you?

Icy-Thought commented 1 month ago

I will test it out ~soon~ tomorrow and report back on my findings. Thanks a lot for sharing your findings with us! :)