From f4b4d9642214f9a17ef104ca94e34aea2a805550 Mon Sep 17 00:00:00 2001 From: Jason Barden Date: Sat, 27 Jun 2026 20:23:33 +0100 Subject: [PATCH 1/3] fix: upgrade Avalonia to 12.0.5 to fix TypeLoadException on startup Tmds.DBus.Protocol 0.93.0 removed the Connection class that Avalonia.X11 12.0.0 compiled against, causing a TypeLoadException on Linux startup. Avalonia 12.0.5 ships with 0.92.0 which keeps the Connection API and still fixes GHSA-xrw6-gwf8-vvr9. Also bumps SkiaSharp from the preview (3.119.3-preview.1.1) to the stable 3.119.4 required by Avalonia.Skia 12.0.5. Co-Authored-By: Claude Sonnet 4.6 --- .../AStar.Dev.Wallpaper.Scrapper.csproj | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/AStar.Dev.Wallpaper.Scrapper/AStar.Dev.Wallpaper.Scrapper.csproj b/src/AStar.Dev.Wallpaper.Scrapper/AStar.Dev.Wallpaper.Scrapper.csproj index b386af4..daf2530 100644 --- a/src/AStar.Dev.Wallpaper.Scrapper/AStar.Dev.Wallpaper.Scrapper.csproj +++ b/src/AStar.Dev.Wallpaper.Scrapper/AStar.Dev.Wallpaper.Scrapper.csproj @@ -30,15 +30,15 @@ - - - - - - + + + + + + - - + + From 27c6e72e62b9469eac39789f0a2499d0bed524c4 Mon Sep 17 00:00:00 2001 From: Jason Barden Date: Sat, 27 Jun 2026 20:51:36 +0100 Subject: [PATCH 2/3] fix: register Serilog.ILogger in DI to resolve ImportExportService activation failure App.axaml.cs registered the logger as the concrete Serilog.Core.Logger type but ImportExportService takes Serilog.ILogger. Add an ILogger alias registration that resolves via the existing Logger singleton. Co-Authored-By: Claude Sonnet 4.6 --- src/AStar.Dev.Wallpaper.Scrapper/App.axaml.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/AStar.Dev.Wallpaper.Scrapper/App.axaml.cs b/src/AStar.Dev.Wallpaper.Scrapper/App.axaml.cs index d2a9da1..3c2881d 100644 --- a/src/AStar.Dev.Wallpaper.Scrapper/App.axaml.cs +++ b/src/AStar.Dev.Wallpaper.Scrapper/App.axaml.cs @@ -61,6 +61,7 @@ public override void OnFrameworkInitializationCompleted() .Enrich.FromLogContext() .ReadFrom.Configuration(sp.GetRequiredService()) .CreateLogger()) + .AddSingleton(sp => sp.GetRequiredService()) .AddDbContextFactory(options => options.UseSqlite(builder.Configuration.GetConnectionString("Sqlite"))) .AddSingleton(sp => { From 84c8585c77917994b584df30619a65c79e9f55c8 Mon Sep 17 00:00:00 2001 From: Jason Barden Date: Sat, 27 Jun 2026 21:02:55 +0100 Subject: [PATCH 3/3] fix: correct DI/config wiring so app starts cleanly Three bugs in App.axaml.cs: - GetSection(nameof(ScrapeConfigModel)) used the alias name "ScrapeConfigModel" not "ScrapeConfiguration", so IOptions always had null sub-objects, causing NullReferenceException in DataSeed on first run - GetConnectionString("Sqlite") looked in the root ConnectionStrings section which is empty; connection string lives at scrapeConfiguration:connectionStrings:sqlite in user secrets - Serilog.ILogger never registered (only Serilog.Core.Logger was), so ImportExportService failed to activate with InvalidOperationException Co-Authored-By: Claude Sonnet 4.6 --- src/AStar.Dev.Wallpaper.Scrapper/App.axaml.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AStar.Dev.Wallpaper.Scrapper/App.axaml.cs b/src/AStar.Dev.Wallpaper.Scrapper/App.axaml.cs index 3c2881d..14e1a17 100644 --- a/src/AStar.Dev.Wallpaper.Scrapper/App.axaml.cs +++ b/src/AStar.Dev.Wallpaper.Scrapper/App.axaml.cs @@ -43,7 +43,7 @@ public override void OnFrameworkInitializationCompleted() builder.Configuration.AddUserSecrets(optional: true, reloadOnChange: true); builder.Services - .Configure(builder.Configuration.GetSection(nameof(ScrapeConfigModel))) + .Configure(builder.Configuration.GetSection("ScrapeConfiguration")) .AddSingleton(sp => sp.GetRequiredService>() .CreateDbContext().ScrapeConfiguration .Include(e => e.ConnectionStrings) @@ -63,7 +63,7 @@ public override void OnFrameworkInitializationCompleted() .CreateLogger()) .AddSingleton(sp => sp.GetRequiredService()) .AddDbContextFactory(options => - options.UseSqlite(builder.Configuration.GetConnectionString("Sqlite"))) + options.UseSqlite(builder.Configuration["scrapeConfiguration:connectionStrings:sqlite"])) .AddSingleton(sp => { using var ctx = sp.GetRequiredService>().CreateDbContext(); return TagsFactory.LoadTagsToIgnoreCompletely(ctx);