OneIdentity / SCALUS

SCALUS -- Session Client Application Launch Uri System
Apache License 2.0
11 stars 3 forks source link

SCALUS doesn't handle missing configuration file #108

Closed wayneidentity closed 1 year ago

wayneidentity commented 1 year ago

I built SCALUS myself while waiting for a new release. Since I built it instead of installing, I don't have a config file in AppData. I don't know if this path is hardcoded or something. SCALUS should handle this better, maybe even putting a default config file there if it's not found rather than assuming it will be there.

2022-09-28 13:29:39.715 -06:00 [ERR] *** Validation errors: Missing config file:C:\Users\Wayne\AppData\Local\scalus\scalus.json 2022-09-28 13:29:39.715 -06:00 [INF] Executed action OneIdentity.Scalus.Ui.Controllers.ConfigurationController.Get (scalus) in 4.9471ms 2022-09-28 13:29:39.716 -06:00 [INF] Executed action OneIdentity.Scalus.Ui.Controllers.ConfigurationController.Registrations (scalus) in 7.2578ms 2022-09-28 13:29:39.717 -06:00 [INF] Executing OkObjectResult, writing value of type 'System.Collections.Generic.Dictionary2[[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]'. 2022-09-28 13:29:39.718 -06:00 [INF] Executed endpoint 'OneIdentity.Scalus.Ui.Controllers.ConfigurationController.Get (scalus)' 2022-09-28 13:29:39.729 -06:00 [INF] Executed endpoint 'OneIdentity.Scalus.Ui.Controllers.ConfigurationController.Registrations (scalus)' 2022-09-28 13:29:39.746 -06:00 [ERR] Connection id "0HML1GV40BFTU", Request id "0HML1GV40BFTU:00000005": An unhandled exception was thrown by the application. OneIdentity.Scalus.Ui.Controllers.ConfigurationException: Bad configuration file at OneIdentity.Scalus.Ui.Controllers.ConfigurationController.Get() in C:\Users\Wayne\Downloads\SCALUS\src\Ui\Controllers\ConfigurationController.cs:line 57 at lambda_method305(Closure , Object , Object[] ) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync() at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync() --- End of stack trace from previous location --- 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() --- End of stack trace from previous location --- 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__Logged|17_1(ResourceInvoker invoker) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker) at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger) at Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.<Invoke>g__AwaitMatcher|8_0(EndpointRoutingMiddleware middleware, HttpContext httpContext, Task1 matcherTask) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication1 application) 2022-09-28 13:29:39.749 -06:00 [ERR] Connection id "0HML1GV40BFTV", Request id "0HML1GV40BFTV:00000004": An unhandled exception was thrown by the application. OneIdentity.Scalus.Ui.Controllers.ConfigurationException: Bad configuration file at OneIdentity.Scalus.Ui.Controllers.ConfigurationController.Registrations() in C:\Users\Wayne\Downloads\SCALUS\src\Ui\Controllers\ConfigurationController.cs:line 85 at lambda_method304(Closure , Object , Object[] ) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync() at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync() --- End of stack trace from previous location --- 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() --- End of stack trace from previous location --- 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__Logged|17_1(ResourceInvoker invoker) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker) at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger) at Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.<Invoke>g__AwaitMatcher|8_0(EndpointRoutingMiddleware middleware, HttpContext httpContext, Task1 matcherTask) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)