OrchardCore.Commerce icon indicating copy to clipboard operation
OrchardCore.Commerce copied to clipboard

Multi-Target build

Open Skrypt opened this issue 10 months ago • 14 comments

To merge on top of OCC-314. I can retarget when the PR gets merged.

Skrypt avatar Apr 28 '25 20:04 Skrypt

hmm, ok, so the CI uses some Powershell scripts from Lombiq repository which builds with .NET 8.0.301. This means that it needs to be changed there if we want to make the default to build with .NET 9.0.x I guess I could make the default to be 8.0.301 for now.

Skrypt avatar Apr 29 '25 02:04 Skrypt

Remaining CI issue is about Code Analysis IDE0055 formatting rule.

https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0055

Did not find how to fix this one. I'm not sure where the Analysis configuration file is to disable this warning. I did format in VS and in VS Code with CSharpier but none of them fixed the issue.

At this point I'm not sure why we get these warnings.

Skrypt avatar Apr 29 '25 03:04 Skrypt

@piedone is it possible that we need to upgrade the Analysis code to work with net9.0?

Skrypt avatar Apr 29 '25 13:04 Skrypt

While we intentionally don't update that projects (see our policy), it shouldn't be necessary either, since that's just the target framework of that project, and consumer projects can use more recent ones. However, you can try setting <LangVersion>13.0</LangVersion> and <AnalysisLevel>9.0</AnalysisLevel> when under .NET 9 to get rid of those strange IDE0055 violations.

But taking a step back, what would be the point in using .NET 9? I don't see any changes that would utilize new APIs. Even with the OCC projects targeting 8, consumers can target 9 if they want.

Piedone avatar Apr 30 '25 20:04 Piedone

Main reason is to assert that building on net9.0 works for future PR's that could use new API's. We could easily keep net8.0 as the default TargetFramework since it is the LTS version. Though, we always had multi-targetting builds in the past so that we can actually start using new API's or migrate current code if needed.

I personally don't mind using net9.0 on my current project because when it will be done ... in a year we will be on net10.0.

Question is more ; does Lombiq Github workflows handle multi-targetting? Will it require that I modify these workflows to make this analysis work? I've not found where these LangVersion and AnalysisLevel settings are set for OCC.

I will take a look tonight after the hockey game. It's the playoffs! 😉

Skrypt avatar Apr 30 '25 20:04 Skrypt

It'd perhaps be a good time to check it out if anything could benefit from .NET 9 in the codebase, so we can actually utilize it.

Question is more ; does Lombiq Github workflows handle multi-targetting?

This didn't come up before, so I don't know what's needed for that. Looking at the OC workflow, it seems like nothing special. However, the build workflow here is deliberately pinned to a specific SDK version (what you observed needs to be changed), and it ties the build to it in a global.json too (see here). So, perhaps, that would cause an issue if the project targets .NET 8. Maybe you'll need to keep two separate jobs in the workflow, for 8 and 9.

But I don't think anything needs to be changed in the workflows.

I've not found where these LangVersion and AnalysisLevel settings are set for OCC.

I mean, these are set in the .NET Analyzers project, so you may need to override them in Directory.Build.props.

But looking at these again, the violations seem valid, though I don't know why they don't show for me locally. E.g., this line break shouldn't be added, nor should this mid-expression comment (it needs to be moved out of the expression, above the statement, and for expression-bodied methods, above the method signature). I guess the ones appearing for unchanged code came with the .NET 9 SDK (since Roslyn fixes can trigger new analyzer violations even if the analyzer packages don't change). So, I suggest you fix these before doing anything else.

Hockey is important! :)

Piedone avatar Apr 30 '25 23:04 Piedone

I think this line is causing issues with the Unit Tests as the .net framework is hard coded to 8.0.510501

https://github.com/Lombiq/GitHub-Actions/blob/dev/.github/actions/test-dotnet/action.yml#L90

Skrypt avatar May 07 '25 03:05 Skrypt

Tests are stuck in an infinite loop "I think".

Skrypt avatar May 07 '25 11:05 Skrypt

The OrchardCore.Commerce.Tests.UI.Tests.BasicTests.BasicOrchardFeaturesTests.BasicOrchardFeaturesShouldWork test fails with this error. Probably because the CI tries to run on .NET 8. But isn't the whole point of multi-targeting that it should still work on .NET 8 and not just on .NET 9?

	Lombiq.Tests.UI.Exceptions.PageChangeAssertionException : An assertion during the page change event has failed on page https://localhost:9049/Admin/Media (Test Site - Assets).
	---- Shouldly.ShouldAssertException : [2025-05-07 04:04:53.945 [Error] Lombiq.Tests.UI.Shortcuts.Middlewares.ExceptionContextLoggingMiddleware: HTTP request when the exception "The PipeWriter 'ResponseBodyPipeWriter' does not implement PipeWriter.UnflushedBytes." happened:
	{"Url":"https://localhost:9049/Admin/Media/GetFolders?path=","ContentType":null,"Headers":{"Accept":["*/*"],"User-Agent":["Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/135.0.0.0 Safari/537.36"],"Accept-Encoding":["gzip","deflate","br","zstd"],"Accept-Language":["en-US","en; q=0.9"],"Cookie":["__orchantiforgery_45gz614bqb7574q8x4ft2pza5s=CfDJ8J02L1RTPYlAlcZZN5LGo0qAzAK4x2G-nH_VT646cIQlRAHvTfC-_Jczqf_AeTampYVEBr1n5q-xzv6uesMYB4UoBxEIIcuGpG1vvL5N6GBAv_Zt1fv4RMMinJ_bb4v76h-VzjCsakBPskpbvZJDlqw; __orchantiforgery_4k8hg4z2pq3btxdhasyz1m6ewh=CfDJ8J02L1RTPYlAlcZZN5LGo0r6q_Xvuu_T6QAmEeLiUOgzdbb7fuqHywk-HZ4Z7hHKhR0MTKEzF8A3wA7qEHD7O_wK0WoLzQq8mgsipL1zPDm0MX6dL3MZCADbMWLP3Yc0phOhgepaZsfHIRKwlTraWeE; orchauth_Default=CfDJ8J02L1RTPYlAlcZZN5LGo0o-aY79tRUJikNWFcIX8rJkHJ2Gm7K7yVSN5kpFb-K4xpKHuAzPIYAecvvLmGg2Y14qBSHhzxAPcMfHMcqIhhXPbX3bxPrDFy4E9Cic-F1HvvGZqkBgPG8XV3XrVsIgH2eHQTOvOTerD1q94e7pNl6f1ABwY03CwQ_6ChyZvQ-ptNBtpnzkqydmgVDTJHYPXvj8RSgDuIhHuz8NhM4eMlvhxvQcqACRv4AwCDqayBBqlF49pUBmjnCPuSw63wYjS09ohUomyrW93CFkb6Ac578RYeKI2X26I-ftGaSxNAb23nUZgvwCthYy2btCNPHx_8b7o5eybWZAjkEQSga3xBQ_a9NNdhpe4VVKC_-08ezBBKi4MddZE1dsjQ1Dk-5xJcQ-ub4bosk5aIeqcwQDeT8HjIH0vwVDcmVP6J6ghLC9KBbNxM6tK-KEbTHpoI463mrEY22C4KyjF2zibLjmcOLGZBMr8daRZLu_1RmutmEAOrRBoz_zriy6upWnsu2eEsJ2pKcyzfjwm-TsGQHL8n11SL_WvlYtz0hPcCwG5k5xkTuecEm7wZW_lIDipQwzhZ_tVgzZll04ZbHZ5MAxHxXrzp0y3mMWYSOvVqVds43CAzqL-z9KYWGIxmA9H-UjHiMNGsceNW8vg9ZUwfUA4e886NRJ6_oOj6XvzkBzV_cIv2tPgE1snB3UTGKtH5VPQT7KmCOEnELrBxxYVkZd9mpWKtieoLsB8uqi2OIn7vhbH1DQeKKxo_N4EOXave6ycJpY4h2aRIj7Skg-xwbjii1mx_yrlekKIGNDpe0OT3ifOkg-4NsUKJwjFfgqmUfIw8Tm_jbUn-R5e-vdCXscHiy2fM7f60JweQgfaaMy3uFuGzaE93BLOaLv_tDqqnfYkTf478DK-50HvObiS3CwRJly_vYz1-nDJ9jm8kvVBBu1eQ; Default-adminPreferences={%22leftSidebarCompact%22:false%2C%22isCompactExplicit%22:false}"],"sec-ch-ua-platform":["\u0022Linux\u0022"],"X-Requested-With":["XMLHttpRequest"],"sec-ch-ua":["\u0022Google Chrome\u0022;v=\u0022135\u0022, \u0022Not-A.Brand\u0022;v=\u00228\u0022, \u0022Chromium\u0022;v=\u0022135\u0022"],"sec-ch-ua-mobile":["?0"],"sec-fetch-site":["same-origin"],"sec-fetch-mode":["cors"],"sec-fetch-dest":["empty"],"priority":["u=1, i"],"X-Forwarded-For":["::1"],"X-Forwarded-Host":["localhost:9049"],"X-Forwarded-Proto":["https"],"Host":["localhost:9049"]},"Form":{},"Cookies":[{"Key":"__orchantiforgery_45gz614bqb7574q8x4ft2pza5s","Value":"CfDJ8J02L1RTPYlAlcZZN5LGo0qAzAK4x2G-nH_VT646cIQlRAHvTfC-_Jczqf_AeTampYVEBr1n5q-xzv6uesMYB4UoBxEIIcuGpG1vvL5N6GBAv_Zt1fv4RMMinJ_bb4v76h-VzjCsakBPskpbvZJDlqw"},{"Key":"__orchantiforgery_4k8hg4z2pq3btxdhasyz1m6ewh","Value":"CfDJ8J02L1RTPYlAlcZZN5LGo0r6q_Xvuu_T6QAm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ObiS3CwRJly_vYz1-nDJ9jm8kvVBBu1eQ"},{"Key":"Default-adminPreferences","Value":"{\u0022leftSidebarCompact\u0022:false,\u0022isCompactExplicit\u0022:false}"}]}, 2025-05-07 04:04:53.957 [Error] Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware: An unhandled exception has occurred while executing the request.System.InvalidOperationException: The PipeWriter 'ResponseBodyPipeWriter' does not implement PipeWriter.UnflushedBytes.
	   at System.Text.Json.ThrowHelper.ThrowInvalidOperationException_PipeWriterDoesNotImplementUnflushedBytes(PipeWriter pipeWriter)
	   at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.SerializeAsync(PipeWriter pipeWriter, T rootValue, Int32 flushThreshold, CancellationToken cancellationToken, Object rootValueBoxed)
	   at Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter.WriteResponseBodyAsync(OutputFormatterWriteContext context, Encoding selectedEncoding)
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResultFilterAsync>g__Awaited|30_0[TFilter,TFilterAsync](ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context)
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted)
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters()
	--- End of stack trace from previous location ---
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
	--- End of stack trace from previous location ---
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
	   at Microsoft.AspNetCore.Builder.ApplicationBuilderExtensions.<>c.<<UseNosniffContentTypeOptionsHeader>b__1_0>d.MoveNext()
	--- End of stack trace from previous location ---
	   at Microsoft.AspNetCore.Builder.ApplicationBuilderExtensions.<>c__DisplayClass0_0.<<UseContentSecurityPolicyHeader>b__0>d.MoveNext()
	--- End of stack trace from previous location ---
	   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
	   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
	   at Lombiq.HelpfulLibraries.OrchardCore.ResourceManagement.ResourceFilterMiddleware.InvokeAsync(HttpContext context)
	   at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.Invoke(HttpContext httpContext, Boolean retry)
	   at Lombiq.Tests.UI.Shortcuts.Middlewares.ExceptionContextLoggingMiddleware.InvokeAsync(HttpContext context)
	   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
	   at OrchardCore.Liquid.ScriptsMiddleware.Invoke(HttpContext httpContext)
	   at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
	   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
	   at OrchardCore.Diagnostics.DiagnosticsStartupFilter.<>c__DisplayClass3_0.<<Configure>b__1>d.MoveNext()
	--- End of stack trace from previous location ---
	   at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
	   at OrchardCore.ContentPreview.PreviewStartupFilter.<>c.<<Configure>b__0_1>d.MoveNext()
	--- End of stack trace from previous location ---
	   at OrchardCore.Users.Services.ExternalAuthenticationsStartupFilter.<>c.<<Configure>b__0_1>d.MoveNext()
	--- End of stack trace from previous location ---
	   at OrchardCore.Modules.ModularTenantRouterMiddleware.Invoke(HttpContext httpContext)
	   at OrchardCore.Modules.ModularTenantContainerMiddleware.<>c__DisplayClass4_0.<<Invoke>b__0>d.MoveNext()
	--- End of stack trace from previous location ---
	   at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell)
	   at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell)
	   at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell)
	   at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell)
	   at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell)
	   at OrchardCore.Modules.ModularTenantContainerMiddleware.Invoke(HttpContext httpContext)
	   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
	   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context), 2025-05-07 04:04:53.959 [Error] Lombiq.Tests.UI.Shortcuts.Middlewares.ExceptionContextLoggingMiddleware: HTTP request when the exception "The PipeWriter 'ResponseBodyPipeWriter' does not implement PipeWriter.UnflushedBytes." happened:
	{"Url":"https://localhost:9049/Admin/Media/GetMediaItems?path=","ContentType":null,"Headers":{"Accept":["*/*"],"User-Agent":["Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/135.0.0.0 Safari/537.36"],"Accept-Encoding":["gzip","deflate","br","zstd"],"Accept-Language":["en-US","en; q=0.9"],"Cookie":["__orchantiforgery_45gz614bqb7574q8x4ft2pza5s=CfDJ8J02L1RTPYlAlcZZ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QT7KmCOEnELrBxxYVkZd9mpWKtieoLsB8uqi2OIn7vhbH1DQeKKxo_N4EOXave6ycJpY4h2aRIj7Skg-xwbjii1mx_yrlekKIGNDpe0OT3ifOkg-4NsUKJwjFfgqmUfIw8Tm_jbUn-R5e-vdCXscHiy2fM7f60JweQgfaaMy3uFuGzaE93BLOaLv_tDqqnfYkTf478DK-50HvObiS3CwRJly_vYz1-nDJ9jm8kvVBBu1eQ; Default-adminPreferences={%22leftSidebarCompact%22:false%2C%22isCompactExplicit%22:false}"],"sec-ch-ua-platform":["\u0022Linux\u0022"],"X-Requested-With":["XMLHttpRequest"],"sec-ch-ua":["\u0022Google Chrome\u0022;v=\u0022135\u0022, \u0022Not-A.Brand\u0022;v=\u00228\u0022, \u0022Chromium\u0022;v=\u0022135\u0022"],"sec-ch-ua-mobile":["?0"],"sec-fetch-site":["same-origin"],"sec-fetch-mode":["cors"],"sec-fetch-dest":["empty"],"priority":["u=1, i"],"X-Forwarded-For":["::1"],"X-Forwarded-Host":["localhost:9049"],"X-Forwarded-Proto":["https"],"Host":["localhost:9049"]},"Form":{},"Cookies":[{"Key":"__orchantiforgery_45gz614bqb7574q8x4ft2pza5s","Value":"CfDJ8J02L1RTPYlAlcZZN5LGo0qAzAK4x2G-nH_VT646cIQlRAHvTfC-_Jczqf_AeTampYVEBr1n5q-xzv6uesMYB4UoBxEIIcuGpG1vvL5N6GBAv_Zt1fv4RMMinJ_bb4v76h-VzjCsakBPskpbvZJDlqw"},{"Key":"__orchantiforgery_4k8hg4z2pq3btxdhasyz1m6ewh","Value":"CfDJ8J02L1RTPYlAlcZZN5LGo0r6q_Xvuu_T6QAmEeLiUOgzdbb7fuqHywk-HZ4Z7hHKhR0MTKEzF8A3wA7qEHD7O_wK0WoLzQq8mgsipL1zPDm0MX6dL3MZCADbMWLP3Yc0phOhgepaZsfHIRKwlTraWeE"},{"Key":"orchauth_Default","Value":"CfDJ8J02L1RTPYlAlcZZN5LGo0o-aY79tRUJikNWFcIX8rJkHJ2Gm7K7yVSN5kpFb-K4xpKHuAzPIYAecvvLmGg2Y14qBSHhzxAPcMfHMcqIhhXPbX3bxPrDFy4E9Cic-F1HvvGZqkBgPG8XV3XrVsIgH2eHQTOvOTerD1q94e7pNl6f1ABwY03CwQ_6ChyZvQ-ptNBtpnzkqydmgVDTJHYPXvj8RSgDuIhHuz8NhM4eMlvhxvQcqACRv4AwCDqayBBqlF49pUBmjnCPuSw63wYjS09ohUomyrW93CFkb6Ac578RYeKI2X26I-ftGaSxNAb23nUZgvwCthYy2btCNPHx_8b7o5eybWZAjkEQSga3xBQ_a9NNdhpe4VVKC_-08ezBBKi4MddZE1dsjQ1Dk-5xJcQ-ub4bosk5aIeqcwQDeT8HjIH0vwVDcmVP6J6ghLC9KBbNxM6tK-KEbTHpoI463mrEY22C4KyjF2zibLjmcOLGZBMr8daRZLu_1RmutmEAOrRBoz_zriy6upWnsu2eEsJ2pKcyzfjwm-TsGQHL8n11SL_WvlYtz0hPcCwG5k5xkTuecEm7wZW_lIDipQwzhZ_tVgzZll04ZbHZ5MAxHxXrzp0y3mMWYSOvVqVds43CAzqL-z9KYWGIxmA9H-UjHiMNGsceNW8vg9ZUwfUA4e886NRJ6_oOj6XvzkBzV_cIv2tPgE1snB3UTGKtH5VPQT7KmCOEnELrBxxYVkZd9mpWKtieoLsB8uqi2OIn7vhbH1DQeKKxo_N4EOXave6ycJpY4h2aRIj7Skg-xwbjii1mx_yrlekKIGNDpe0OT3ifOkg-4NsUKJwjFfgqmUfIw8Tm_jbUn-R5e-vdCXscHiy2fM7f60JweQgfaaMy3uFuGzaE93BLOaLv_tDqqnfYkTf478DK-50HvObiS3CwRJly_vYz1-nDJ9jm8kvVBBu1eQ"},{"Key":"Default-adminPreferences","Value":"{\u0022leftSidebarCompact\u0022:false,\u0022isCompactExplicit\u0022:false}"}]}, 2025-05-07 04:04:53.961 [Error] Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware: An unhandled exception has occurred while executing the request.System.InvalidOperationException: The PipeWriter 'ResponseBodyPipeWriter' does not implement PipeWriter.UnflushedBytes.
	   at System.Text.Json.ThrowHelper.ThrowInvalidOperationException_PipeWriterDoesNotImplementUnflushedBytes(PipeWriter pipeWriter)
	   at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.SerializeAsync(PipeWriter pipeWriter, T rootValue, Int32 flushThreshold, CancellationToken cancellationToken, Object rootValueBoxed)
	   at Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter.WriteResponseBodyAsync(OutputFormatterWriteContext context, Encoding selectedEncoding)
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResultFilterAsync>g__Awaited|30_0[TFilter,TFilterAsync](ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context)
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted)
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters()
	--- End of stack trace from previous location ---
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
	--- End of stack trace from previous location ---
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
	   at Microsoft.AspNetCore.Builder.ApplicationBuilderExtensions.<>c.<<UseNosniffContentTypeOptionsHeader>b__1_0>d.MoveNext()
	--- End of stack trace from previous location ---
	   at Microsoft.AspNetCore.Builder.ApplicationBuilderExtensions.<>c__DisplayClass0_0.<<UseContentSecurityPolicyHeader>b__0>d.MoveNext()
	--- End of stack trace from previous location ---
	   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
	   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
	   at Lombiq.HelpfulLibraries.OrchardCore.ResourceManagement.ResourceFilterMiddleware.InvokeAsync(HttpContext context)
	   at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.Invoke(HttpContext httpContext, Boolean retry)
	   at Lombiq.Tests.UI.Shortcuts.Middlewares.ExceptionContextLoggingMiddleware.InvokeAsync(HttpContext context)
	   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
	   at OrchardCore.Liquid.ScriptsMiddleware.Invoke(HttpContext httpContext)
	   at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
	   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
	   at OrchardCore.Diagnostics.DiagnosticsStartupFilter.<>c__DisplayClass3_0.<<Configure>b__1>d.MoveNext()
	--- End of stack trace from previous location ---
	   at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
	   at OrchardCore.ContentPreview.PreviewStartupFilter.<>c.<<Configure>b__0_1>d.MoveNext()
	--- End of stack trace from previous location ---
	   at OrchardCore.Users.Services.ExternalAuthenticationsStartupFilter.<>c.<<Configure>b__0_1>d.MoveNext()
	--- End of stack trace from previous location ---
	   at OrchardCore.Modules.ModularTenantRouterMiddleware.Invoke(HttpContext httpContext)
	   at OrchardCore.Modules.ModularTenantContainerMiddleware.<>c__DisplayClass4_0.<<Invoke>b__0>d.MoveNext()
	--- End of stack trace from previous location ---
	   at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell)
	   at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell)
	   at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell)
	   at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell)
	   at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell)
	   at OrchardCore.Modules.ModularTenantContainerMiddleware.Invoke(HttpContext httpContext)
	   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
	   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)]
	    should not contain an element satisfying the condition
	NotMediaCacheEntries(logEntry)
	    but does
	
	Additional Info:
	    
	2025-05-07 04:04:53.945 [Error] Lombiq.Tests.UI.Shortcuts.Middlewares.ExceptionContextLoggingMiddleware: HTTP request when the exception "The PipeWriter 'ResponseBodyPipeWriter' does not implement PipeWriter.UnflushedBytes." happened:
	{"Url":"https://localhost:9049/Admin/Media/GetFolders?path=","ContentType":null,"Headers":{"Accept":["*/*"],"User-Agent":["Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/135.0.0.0 Safari/537.36"],"Accept-Encoding":["gzip","deflate","br","zstd"],"Accept-Language":["en-US","en; q=0.9"],"Cookie":["__orchantiforgery_45gz614bqb7574q8x4ft2pza5s=CfDJ8J02L1RTPYlAlcZZN5LGo0qAzAK4x2G-nH_VT646cIQlRAHvTfC-_Jczqf_AeTampYVEBr1n5q-xzv6uesMYB4UoBxEIIcuGpG1vvL5N6GBAv_Zt1fv4RMMinJ_bb4v76h-VzjCsakBPskpbvZ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8Tm_jbUn-R5e-vdCXscHiy2fM7f60JweQgfaaMy3uFuGzaE93BLOaLv_tDqqnfYkTf478DK-50HvObiS3CwRJly_vYz1-nDJ9jm8kvVBBu1eQ; Default-adminPreferences={%22leftSidebarCompact%22:false%2C%22isCompactExplicit%22:false}"],"sec-ch-ua-platform":["\u0022Linux\u0022"],"X-Requested-With":["XMLHttpRequest"],"sec-ch-ua":["\u0022Google Chrome\u0022;v=\u0022135\u0022, \u0022Not-A.Brand\u0022;v=\u00228\u0022, \u0022Chromium\u0022;v=\u0022135\u0022"],"sec-ch-ua-mobile":["?0"],"sec-fetch-site":["same-origin"],"sec-fetch-mode":["cors"],"sec-fetch-dest":["empty"],"priority":["u=1, i"],"X-Forwarded-For":["::1"],"X-Forwarded-Host":["localhost:9049"],"X-Forwarded-Proto":["https"],"Host":["localhost:9049"]},"Form":{},"Cookies":[{"Key":"__orchantiforgery_45gz614bqb7574q8x4ft2pza5s","Value":"CfDJ8J02L1RTPYlAlcZZN5LGo0qAzAK4x2G-nH_VT646cIQlRAHvTfC-_Jczqf_AeTampYVEBr1n5q-xzv6uesMYB4UoBxEIIcuGpG1vvL5N6GBAv_Zt1fv4RMMinJ_bb4v76h-VzjCsakBPskpbvZJDlqw"},{"Key":"__orchantiforgery_4k8hg4z2pq3btxdhasyz1m6ewh","Value":"CfDJ8J02L1RTPYlAlcZZN5LGo0r6q_Xvuu_T6QAmEeLiUOgzdbb7fuqHywk-HZ4Z7hHKhR0MTKEzF8A3wA7qEHD7O_wK0WoLzQq8mgsipL1zPDm0MX6dL3MZCADbMWLP3Yc0phOhgepaZsfHIRKwlTraWeE"},{"Key":"orchauth_Default","Value":"CfDJ8J02L1RTPYlAlcZZN5LGo0o-aY79tRUJikNWFcIX8rJkHJ2Gm7K7yVSN5kpFb-K4xpKHuAzPIYAecvvLmGg2Y14qBSHhzxAPcMfHMcqIhhXPbX3bxPrDFy4E9Cic-F1HvvGZqkBgPG8XV3XrVsIgH2eHQTOvOTerD1q94e7pNl6f1ABwY03CwQ_6ChyZvQ-ptNBtpnzkqydmgVDTJHYPXvj8RSgDuIhHuz8NhM4eMlvhxvQcqACRv4AwCDqayBBqlF49pUBmjnCPuSw63wYjS09ohUomyrW93CFkb6Ac578RYeKI2X26I-ftGaSxNAb23nUZgvwCthYy2btCNPHx_8b7o5eybWZAjkEQSga3xBQ_a9NNdhpe4VVKC_-08ezBBKi4MddZE1dsjQ1Dk-5xJcQ-ub4bosk5aIeqcwQDeT8HjIH0vwVDcmVP6J6ghLC9KBbNxM6tK-KEbTHpoI463mrEY22C4KyjF2zibLjmcOLGZBMr8daRZLu_1RmutmEAOrRBoz_zriy6upWnsu2eEsJ2pKcyzfjwm-TsGQHL8n11SL_WvlYtz0hPcCwG5k5xkTuecEm7wZW_lIDipQwzhZ_tVgzZll04ZbHZ5MAxHxXrzp0y3mMWYSOvVqVds43CAzqL-z9KYWGIxmA9H-UjHiMNGsceNW8vg9ZUwfUA4e886NRJ6_oOj6XvzkBzV_cIv2tPgE1snB3UTGKtH5VPQT7KmCOEnELrBxxYVkZd9mpWKtieoLsB8uqi2OIn7vhbH1DQeKKxo_N4EOXave6ycJpY4h2aRIj7Skg-xwbjii1mx_yrlekKIGNDpe0OT3ifOkg-4NsUKJwjFfgqmUfIw8Tm_jbUn-R5e-vdCXscHiy2fM7f60JweQgfaaMy3uFuGzaE93BLOaLv_tDqqnfYkTf478DK-50HvObiS3CwRJly_vYz1-nDJ9jm8kvVBBu1eQ"},{"Key":"Default-adminPreferences","Value":"{\u0022leftSidebarCompact\u0022:false,\u0022isCompactExplicit\u0022:false}"}]}
	2025-05-07 04:04:53.957 [Error] Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware: An unhandled exception has occurred while executing the request.System.InvalidOperationException: The PipeWriter 'ResponseBodyPipeWriter' does not implement PipeWriter.UnflushedBytes.
	   at System.Text.Json.ThrowHelper.ThrowInvalidOperationException_PipeWriterDoesNotImplementUnflushedBytes(PipeWriter pipeWriter)
	   at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.SerializeAsync(PipeWriter pipeWriter, T rootValue, Int32 flushThreshold, CancellationToken cancellationToken, Object rootValueBoxed)
	   at Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter.WriteResponseBodyAsync(OutputFormatterWriteContext context, Encoding selectedEncoding)
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResultFilterAsync>g__Awaited|30_0[TFilter,TFilterAsync](ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context)
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted)
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters()
	--- End of stack trace from previous location ---
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
	--- End of stack trace from previous location ---
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
	   at Microsoft.AspNetCore.Builder.ApplicationBuilderExtensions.<>c.<<UseNosniffContentTypeOptionsHeader>b__1_0>d.MoveNext()
	--- End of stack trace from previous location ---
	   at Microsoft.AspNetCore.Builder.ApplicationBuilderExtensions.<>c__DisplayClass0_0.<<UseContentSecurityPolicyHeader>b__0>d.MoveNext()
	--- End of stack trace from previous location ---
	   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
	   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
	   at Lombiq.HelpfulLibraries.OrchardCore.ResourceManagement.ResourceFilterMiddleware.InvokeAsync(HttpContext context)
	   at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.Invoke(HttpContext httpContext, Boolean retry)
	   at Lombiq.Tests.UI.Shortcuts.Middlewares.ExceptionContextLoggingMiddleware.InvokeAsync(HttpContext context)
	   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
	   at OrchardCore.Liquid.ScriptsMiddleware.Invoke(HttpContext httpContext)
	   at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
	   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
	   at OrchardCore.Diagnostics.DiagnosticsStartupFilter.<>c__DisplayClass3_0.<<Configure>b__1>d.MoveNext()
	--- End of stack trace from previous location ---
	   at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
	   at OrchardCore.ContentPreview.PreviewStartupFilter.<>c.<<Configure>b__0_1>d.MoveNext()
	--- End of stack trace from previous location ---
	   at OrchardCore.Users.Services.ExternalAuthenticationsStartupFilter.<>c.<<Configure>b__0_1>d.MoveNext()
	--- End of stack trace from previous location ---
	   at OrchardCore.Modules.ModularTenantRouterMiddleware.Invoke(HttpContext httpContext)
	   at OrchardCore.Modules.ModularTenantContainerMiddleware.<>c__DisplayClass4_0.<<Invoke>b__0>d.MoveNext()
	--- End of stack trace from previous location ---
	   at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell)
	   at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell)
	   at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell)
	   at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell)
	   at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell)
	   at OrchardCore.Modules.ModularTenantContainerMiddleware.Invoke(HttpContext httpContext)
	   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
	   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
	2025-05-07 04:04:53.959 [Error] Lombiq.Tests.UI.Shortcuts.Middlewares.ExceptionContextLoggingMiddleware: HTTP request when the exception "The PipeWriter 'ResponseBodyPipeWriter' does not implement PipeWriter.UnflushedBytes." happened:
	{"Url":"https://localhost:9049/Admin/Media/GetMediaItems?path=","ContentType":null,"Headers":{"Accept":["*/*"],"User-Agent":["Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/135.0.0.0 Safari/537.36"],"Accept-Encoding":["gzip","deflate","br","zstd"],"Accept-Language":["en-US","en; q=0.9"],"Cookie":["__orchantiforgery_45gz614bqb7574q8x4ft2pza5s=CfDJ8J02L1RTPYlAlcZZN5LGo0qAzAK4x2G-nH_VT646cIQlRAHvTfC-_Jczqf_AeTampYVEBr1n5q-xzv6uesMYB4UoBxEIIcuGpG1vvL5N6GBAv_Zt1fv4RMMinJ_bb4v76h-VzjCsakBPskpbvZJDlqw; __orchantiforgery_4k8hg4z2pq3btxdhasyz1m6ewh=CfDJ8J02L1RTPYlAlcZZN5LGo0r6q_Xvuu_T6QAmEeLiUOgzdbb7fuqHywk-HZ4Z7hHKhR0MTKEzF8A3wA7qEHD7O_wK0WoLzQq8mgsipL1zPDm0MX6dL3MZCADbMWLP3Yc0phOhgepaZsfHIRKwlTraWeE; orchauth_Default=CfDJ8J02L1RTPYlAlcZZN5LGo0o-aY79tRUJikNWFcIX8rJkHJ2Gm7K7yVSN5kpFb-K4xpKHuAzPIYAecvvLmGg2Y14qBSHhzxAPcMfHMcqIhhXPbX3bxPrDFy4E9Cic-F1HvvGZqkBgPG8XV3XrVsIgH2eHQTOvOTerD1q94e7pNl6f1ABwY03CwQ_6ChyZvQ-ptNBtpnzkqydmgVDTJHYPXvj8RSgDuIhHuz8NhM4eMlvhxvQcqACRv4AwCDqayBBqlF49pUBmjnCPuSw63wYjS09ohUomyrW93CFkb6Ac578RYeKI2X26I-ftGaSxNAb23nUZgvwCthYy2btCNPHx_8b7o5eybWZAjkEQSga3xBQ_a9NNdhpe4VVKC_-08ezBBKi4MddZE1dsjQ1Dk-5xJcQ-ub4bosk5aIeqcwQDeT8HjIH0vwVDcmVP6J6ghLC9KBbNxM6tK-KEbTHpoI463mrEY22C4KyjF2zibLjmcOLGZBMr8daRZLu_1RmutmEAOrRBoz_zriy6upWnsu2eEsJ2pKcyzfjwm-TsGQHL8n11SL_WvlYtz0hPcCwG5k5xkTuecEm7wZW_lIDipQwzhZ_tVgzZll04ZbHZ5MAxHxXrzp0y3mMWYSOvVqVds43CAzqL-z9KYWGIxmA9H-UjHiMNGsceNW8vg9ZUwfUA4e886NRJ6_oOj6XvzkBzV_cIv2tPgE1snB3UTGKtH5VPQT7KmCOEnELrBxxYVkZd9mpWKtieoLsB8uqi2OIn7vhbH1DQeKKxo_N4EOXave6ycJpY4h2aRIj7Skg-xwbjii1mx_yrlekKIGNDpe0OT3ifOkg-4NsUKJwjFfgqmUfIw8Tm_jbUn-R5e-vdCXscHiy2fM7f60JweQgfaaMy3uFuGzaE93BLOaLv_tDqqnfYkTf478DK-50HvObiS3CwRJly_vYz1-nDJ9jm8kvVBBu1eQ; Default-adminPreferences={%22leftSidebarCompact%22:false%2C%22isCompactExplicit%22:false}"],"sec-ch-ua-platform":["\u0022Linux\u0022"],"X-Requested-With":["XMLHttpRequest"],"sec-ch-ua":["\u0022Google Chrome\u0022;v=\u0022135\u0022, \u0022Not-A.Brand\u0022;v=\u00228\u0022, \u0022Chromium\u0022;v=\u0022135\u0022"],"sec-ch-ua-mobile":["?0"],"sec-fetch-site":["same-origin"],"sec-fetch-mode":["cors"],"sec-fetch-dest":["empty"],"priority":["u=1, i"],"X-Forwarded-For":["::1"],"X-Forwarded-Host":["localhost:9049"],"X-Forwarded-Proto":["https"],"Host":["localhost:9049"]},"Form":{},"Cookies":[{"Key":"__orchantiforgery_45gz614bqb7574q8x4ft2pza5s","Value":"CfDJ8J02L1RTPYlAlcZZN5LGo0qAzAK4x2G-nH_VT646cIQlRAHvTfC-_Jczqf_AeTampYVEBr1n5q-xzv6uesMYB4UoBxEIIcuGpG1vvL5N6GBAv_Zt1fv4RMMinJ_bb4v76h-VzjCsakBPskpbvZJDlqw"},{"Key":"__orchantiforgery_4k8hg4z2pq3btxdhasyz1m6ewh","Value":"CfDJ8J02L1RTPYlAlcZZN5LGo0r6q_Xvuu_T6QAmEeLiUOgzdbb7fuqHywk-HZ4Z7hHKhR0MTKEzF8A3wA7qEHD7O_wK0WoLzQq8mgsipL1zPDm0MX6dL3MZCADbMWLP3Yc0phOhgepaZsfHIRKwlTraWeE"},{"Key":"orchauth_Default","Value":"CfDJ8J02L1RTPYlAlcZZN5LGo0o-aY79tRUJikNWFcIX8rJkHJ2Gm7K7yVSN5kpFb-K4xpKHuAzPIYAecvvLmGg2Y14qBSHhzxAPcMfHMcqIhhXPbX3bxPrDFy4E9Cic-F1HvvGZqkBgPG8XV3XrVsIgH2eHQTOvOTerD1q94e7pNl6f1ABwY03CwQ_6ChyZvQ-ptNBtpnzkqydmgVDTJHYPXvj8RSgDuIhHuz8NhM4eMlvhxvQcqACRv4AwCDqayBBqlF49pUBmjnCPuSw63wYjS09ohUomyrW93CFkb6Ac578RYeKI2X26I-ftGaSxNAb23nUZgvwCthYy2btCNPHx_8b7o5eybWZAjkEQSga3xBQ_a9NNdhpe4VVKC_-08ezBBKi4MddZE1dsjQ1Dk-5xJcQ-ub4bosk5aIeqcwQDeT8HjIH0vwVDcmVP6J6ghLC9KBbNxM6tK-KEbTHpoI463mrEY22C4KyjF2zibLjmcOLGZBMr8daRZLu_1RmutmEAOrRBoz_zriy6upWnsu2eEsJ2pKcyzfjwm-TsGQHL8n11SL_WvlYtz0hPcCwG5k5xkTuecEm7wZW_lIDipQwzhZ_tVgzZll04ZbHZ5MAxHxXrzp0y3mMWYSOvVqVds43CAzqL-z9KYWGIxmA9H-UjHiMNGsceNW8vg9ZUwfUA4e886NRJ6_oOj6XvzkBzV_cIv2tPgE1snB3UTGKtH5VPQT7KmCOEnELrBxxYVkZd9mpWKtieoLsB8uqi2OIn7vhbH1DQeKKxo_N4EOXave6ycJpY4h2aRIj7Skg-xwbjii1mx_yrlekKIGNDpe0OT3ifOkg-4NsUKJwjFfgqmUfIw8Tm_jbUn-R5e-vdCXscHiy2fM7f60JweQgfaaMy3uFuGzaE93BLOaLv_tDqqnfYkTf478DK-50HvObiS3CwRJly_vYz1-nDJ9jm8kvVBBu1eQ"},{"Key":"Default-adminPreferences","Value":"{\u0022leftSidebarCompact\u0022:false,\u0022isCompactExplicit\u0022:false}"}]}
	2025-05-07 04:04:53.961 [Error] Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware: An unhandled exception has occurred while executing the request.System.InvalidOperationException: The PipeWriter 'ResponseBodyPipeWriter' does not implement PipeWriter.UnflushedBytes.
	   at System.Text.Json.ThrowHelper.ThrowInvalidOperationException_PipeWriterDoesNotImplementUnflushedBytes(PipeWriter pipeWriter)
	   at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.SerializeAsync(PipeWriter pipeWriter, T rootValue, Int32 flushThreshold, CancellationToken cancellationToken, Object rootValueBoxed)
	   at Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter.WriteResponseBodyAsync(OutputFormatterWriteContext context, Encoding selectedEncoding)
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResultFilterAsync>g__Awaited|30_0[TFilter,TFilterAsync](ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context)
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted)
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters()
	--- End of stack trace from previous location ---
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
	--- End of stack trace from previous location ---
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
	   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
	   at Microsoft.AspNetCore.Builder.ApplicationBuilderExtensions.<>c.<<UseNosniffContentTypeOptionsHeader>b__1_0>d.MoveNext()
	--- End of stack trace from previous location ---
	   at Microsoft.AspNetCore.Builder.ApplicationBuilderExtensions.<>c__DisplayClass0_0.<<UseContentSecurityPolicyHeader>b__0>d.MoveNext()
	--- End of stack trace from previous location ---
	   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
	   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
	   at Lombiq.HelpfulLibraries.OrchardCore.ResourceManagement.ResourceFilterMiddleware.InvokeAsync(HttpContext context)
	   at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.Invoke(HttpContext httpContext, Boolean retry)
	   at Lombiq.Tests.UI.Shortcuts.Middlewares.ExceptionContextLoggingMiddleware.InvokeAsync(HttpContext context)
	   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
	   at OrchardCore.Liquid.ScriptsMiddleware.Invoke(HttpContext httpContext)
	   at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
	   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
	   at OrchardCore.Diagnostics.DiagnosticsStartupFilter.<>c__DisplayClass3_0.<<Configure>b__1>d.MoveNext()
	--- End of stack trace from previous location ---
	   at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
	   at OrchardCore.ContentPreview.PreviewStartupFilter.<>c.<<Configure>b__0_1>d.MoveNext()
	--- End of stack trace from previous location ---
	   at OrchardCore.Users.Services.ExternalAuthenticationsStartupFilter.<>c.<<Configure>b__0_1>d.MoveNext()
	--- End of stack trace from previous location ---
	   at OrchardCore.Modules.ModularTenantRouterMiddleware.Invoke(HttpContext httpContext)
	   at OrchardCore.Modules.ModularTenantContainerMiddleware.<>c__DisplayClass4_0.<<Invoke>b__0>d.MoveNext()
	--- End of stack trace from previous location ---
	   at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell)
	   at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell)
	   at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell)
	   at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell)
	   at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell)
	   at OrchardCore.Modules.ModularTenantContainerMiddleware.Invoke(HttpContext httpContext)
	   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
	   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)

sarahelsaig avatar May 07 '25 12:05 sarahelsaig

From what I've seen in previous steps. It will download both net8.0 and net9.0 and compile it with both. Then these tests are now running with net8.0 because I made the DefaultTargetFramework to be net8.0. But it should normally test for both net8.0 and net9.0 and from what I've seen the test step action is hard coded to run with net8.0.

Skrypt avatar May 07 '25 15:05 Skrypt

@piedone @sarahelsaig So far, trying to run these unit test on either Windows or Linux locally failed. I would need to figure out how to debug these locally as the CI is currently running tests silently (no logs).

Things like permission issues on Linux:

image

And under Windows I'm getting something related with Docker failing.

So far, it feels like I can't fix these or I need to know the Lombiq stack.

Skrypt avatar May 07 '25 16:05 Skrypt

I won't be able to help with this, sorry.

Piedone avatar May 07 '25 21:05 Piedone

Ok so, I fixed the Unit Tests by removing the SecurityScanningTest but one issue remains and it is related with:

image

This is an issue on Lombiq Github actions where when running the tests it only installs .NET 9 for some reason. Can't fix this one here. Will be complex if need to be fixed on Lombiq repository as it needs to be non-breaking for all projects where you guys are using it.

I am stopping progress on this one for now.

Skrypt avatar May 08 '25 02:05 Skrypt

This pull request has merge conflicts. Please resolve those before requesting a review.

github-actions[bot] avatar May 18 '25 21:05 github-actions[bot]