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

OSOE-795: Upgrade to latest OC preview to test System.Text.Json #45

Merged
merged 10 commits into from
May 15, 2024

Conversation

sarahelsaig
Copy link
Member

@sarahelsaig sarahelsaig commented Feb 25, 2024

@github-actions github-actions bot changed the title Upgrade to latest OC preview to test System.Text.Json OSOE-795: Upgrade to latest OC preview to test System.Text.Json Feb 25, 2024
@Piedone
Copy link
Member

Piedone commented Mar 23, 2024

Test Lombiq.OrchardCoreApiClient.Tester.OpenId.recipe.json too, because I think there's an incompatibility as well. With the latest OC, I get this when trying to import it from the admin:

System.Text.Json.JsonException: The JSON value could not be converted to OrchardCore.OpenId.Settings.OpenIdServerSettings+TokenFormat. Path: $.AccessTokenFormat | LineNumber: 0 | BytePositionInLine: 92.
   at System.Text.Json.ThrowHelper.ThrowJsonException(String message)
   at System.Text.Json.Serialization.Converters.EnumConverter`1.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options)
   at System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader)
   at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
   at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 utf8Json, JsonTypeInfo`1 jsonTypeInfo, Nullable`1 actualByteCount)
   at System.Text.Json.JsonSerializer.ReadFromNode[TValue](JsonNode node, JsonTypeInfo`1 jsonTypeInfo)
   at System.Text.Json.Nodes.JNode.ToObject[T](JsonNode jsonNode, JsonSerializerOptions options) in E:\Projects\OrchardForks\OrchardCore6\src\OrchardCore\OrchardCore.Abstractions\Json\Nodes\JNode.cs:line 101
   at OrchardCore.OpenId.Recipes.OpenIdServerSettingsStep.ExecuteAsync(RecipeExecutionContext context) in E:\Projects\OrchardForks\OrchardCore6\src\OrchardCore.Modules\OrchardCore.OpenId\Recipes\OpenIdServerSettingsStep.cs:line 31
   at OrchardCore.Recipes.Services.RecipeExecutor.<>c__DisplayClass7_0.<<ExecuteStepAsync>b__0>d.MoveNext() in E:\Projects\OrchardForks\OrchardCore6\src\OrchardCore\OrchardCore.Recipes.Core\Services\RecipeExecutor.cs:line 173
--- End of stack trace from previous location ---
   at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell) in E:\Projects\OrchardForks\OrchardCore6\src\OrchardCore\OrchardCore.Abstractions\Shell\Scope\ShellScope.cs:line 253
   at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell) in E:\Projects\OrchardForks\OrchardCore6\src\OrchardCore\OrchardCore.Abstractions\Shell\Scope\ShellScope.cs:line 258
   at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell) in E:\Projects\OrchardForks\OrchardCore6\src\OrchardCore\OrchardCore.Abstractions\Shell\Scope\ShellScope.cs:line 263
   at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell) in E:\Projects\OrchardForks\OrchardCore6\src\OrchardCore\OrchardCore.Abstractions\Shell\Scope\ShellScope.cs:line 268
   at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell) in E:\Projects\OrchardForks\OrchardCore6\src\OrchardCore\OrchardCore.Abstractions\Shell\Scope\ShellScope.cs:line 269
   at OrchardCore.Recipes.Services.RecipeExecutor.ExecuteStepAsync(RecipeExecutionContext recipeStep) in E:\Projects\OrchardForks\OrchardCore6\src\OrchardCore\OrchardCore.Recipes.Core\Services\RecipeExecutor.cs:line 156
   at OrchardCore.Recipes.Services.RecipeExecutor.ExecuteAsync(String executionId, RecipeDescriptor recipeDescriptor, IDictionary`2 environment, CancellationToken cancellationToken) in E:\Projects\OrchardForks\OrchardCore6\src\OrchardCore\OrchardCore.Recipes.Core\Services\RecipeExecutor.cs:line 99
   at OrchardCore.Recipes.Services.RecipeExecutor.ExecuteAsync(String executionId, RecipeDescriptor recipeDescriptor, IDictionary`2 environment, CancellationToken cancellationToken) in E:\Projects\OrchardForks\OrchardCore6\src\OrchardCore\OrchardCore.Recipes.Core\Services\RecipeExecutor.cs:line 117
   at OrchardCore.Recipes.Services.RecipeExecutor.ExecuteAsync(String executionId, RecipeDescriptor recipeDescriptor, IDictionary`2 environment, CancellationToken cancellationToken) in E:\Projects\OrchardForks\OrchardCore6\src\OrchardCore\OrchardCore.Recipes.Core\Services\RecipeExecutor.cs:line 132
   at OrchardCore.Recipes.Services.RecipeExecutor.ExecuteAsync(String executionId, RecipeDescriptor recipeDescriptor, IDictionary`2 environment, CancellationToken cancellationToken) in E:\Projects\OrchardForks\OrchardCore6\src\OrchardCore\OrchardCore.Recipes.Core\Services\RecipeExecutor.cs:line 142
   at OrchardCore.Recipes.Services.RecipeDeploymentTargetHandler.ImportFromFileAsync(IFileProvider fileProvider) in E:\Projects\OrchardForks\OrchardCore6\src\OrchardCore.Modules\OrchardCore.Recipes\Services\RecipeDeploymentTargetHandler.cs:line 49
   at OrchardCore.Deployment.Core.Services.DeploymentManager.ImportDeploymentPackageAsync(IFileProvider deploymentPackage) in E:\Projects\OrchardForks\OrchardCore6\src\OrchardCore\OrchardCore.Deployment.Core\Services\DeploymentManager.cs:line 54
   at OrchardCore.Deployment.Controllers.ImportController.Json(ImportJsonViewModel model) in E:\Projects\OrchardForks\OrchardCore6\src\OrchardCore.Modules\OrchardCore.Deployment\Controllers\ImportController.cs:line 147
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   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>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   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 SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.Invoke(HttpContext httpContext, Boolean retry)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at OrchardCore.Liquid.ScriptsMiddleware.Invoke(HttpContext httpContext) in E:\Projects\OrchardForks\OrchardCore6\src\OrchardCore.Modules\OrchardCore.Liquid\ScriptsMiddleware.cs:line 70
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at OrchardCore.Diagnostics.DiagnosticsStartupFilter.<>c__DisplayClass3_0.<<Configure>b__1>d.MoveNext() in E:\Projects\OrchardForks\OrchardCore6\src\OrchardCore.Modules\OrchardCore.Diagnostics\DiagnosticsStartupFilter.cs:line 34
--- 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() in E:\Projects\OrchardForks\OrchardCore6\src\OrchardCore.Modules\OrchardCore.ContentPreview\PreviewStartupFilter.cs:line 16
--- End of stack trace from previous location ---
   at OrchardCore.Modules.ModularTenantRouterMiddleware.Invoke(HttpContext httpContext) in E:\Projects\OrchardForks\OrchardCore6\src\OrchardCore\OrchardCore\Modules\ModularTenantRouterMiddleware.cs:line 47
   at OrchardCore.Modules.ModularTenantContainerMiddleware.<>c__DisplayClass4_0.<<Invoke>b__0>d.MoveNext() in E:\Projects\OrchardForks\OrchardCore6\src\OrchardCore\OrchardCore\Modules\ModularTenantContainerMiddleware.cs:line 61
--- End of stack trace from previous location ---
   at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell) in E:\Projects\OrchardForks\OrchardCore6\src\OrchardCore\OrchardCore.Abstractions\Shell\Scope\ShellScope.cs:line 253
   at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell) in E:\Projects\OrchardForks\OrchardCore6\src\OrchardCore\OrchardCore.Abstractions\Shell\Scope\ShellScope.cs:line 258
   at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell) in E:\Projects\OrchardForks\OrchardCore6\src\OrchardCore\OrchardCore.Abstractions\Shell\Scope\ShellScope.cs:line 263
   at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell) in E:\Projects\OrchardForks\OrchardCore6\src\OrchardCore\OrchardCore.Abstractions\Shell\Scope\ShellScope.cs:line 268
   at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute, Boolean activateShell) in E:\Projects\OrchardForks\OrchardCore6\src\OrchardCore\OrchardCore.Abstractions\Shell\Scope\ShellScope.cs:line 269
   at OrchardCore.Modules.ModularTenantContainerMiddleware.Invoke(HttpContext httpContext) in E:\Projects\OrchardForks\OrchardCore6\src\OrchardCore\OrchardCore\Modules\ModularTenantContainerMiddleware.cs:line 59
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)

The manual steps in the root Readme are OK.

# Conflicts:
#	Lombiq.OrchardCoreApiClient/Lombiq.OrchardCoreApiClient.csproj
# Conflicts:
#	Lombiq.OrchardCoreApiClient/Lombiq.OrchardCoreApiClient.csproj
@dministro dministro merged commit 9495fcd into task/system-text-json-migration May 15, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants