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

bug: #382

Open
dukeofharen opened this issue Oct 17, 2024 · 0 comments
Open

bug: #382

dukeofharen opened this issue Oct 17, 2024 · 0 comments
Labels
bugfix Inconsistencies or issues which will cause a problem for users or implementors.

Comments

@dukeofharen
Copy link
Owner

I got this error in the console while retrieving all requests from within the API:

2024-10-17 10:23:33.307 +02:00 [ERR] Connection id "0HN7EGJUHRPVJ", Request id "0HN7EGJUHRPVJ:00000003": An unhandled exception was thrown by the application.
AutoMapper.AutoMapperMappingException: Error mapping types.

Mapping types:
SelectArrayIterator`2 -> IEnumerable`1
System.Linq.Enumerable+SelectArrayIterator`2[[System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[HttPlaceholder.Domain.RequestOverviewModel, HttPlaceholder.Domain, Version=2024.2.24.160, Culture=neutral, PublicKeyToken=null]] -> System.Collections.Generic.IEnumerable`1[[HttPlaceholder.Web.Shared.Dto.v1.Requests.RequestOverviewDto, HttPlaceholder.Web.Shared, Version=2024.2.24.160, Culture=neutral, PublicKeyToken=null]]
 ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at HttPlaceholder.Persistence.Implementations.StubSources.BaseWritableStubSource.<>c.<GetRequestResultsOverviewAsync>b__4_0(RequestResultModel r) in /app/src/HttPlaceholder.Persistence/Implementations/StubSources/basewritablestubsource.cs:line 37
   at System.Linq.Enumerable.SelectArrayIterator`2.MoveNext()
   at lambda_method66(Closure, Object, IEnumerable`1, ResolutionContext)
   --- End of inner exception stack trace ---
   at lambda_method66(Closure, Object, IEnumerable`1, ResolutionContext)
   at HttPlaceholder.Controllers.v1.RequestController.GetOverview(CancellationToken cancellationToken, String fromIdentifier, Nullable`1 itemsPerPage) in /app/src/HttPlaceholder/Controllers/v1/requestcontroller.cs:line 60
   at lambda_method45(Closure, Object)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.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 HttPlaceholder.Web.Shared.Middleware.IndexHtmlMiddleware.Invoke(HttpContext context) in /app/src/HttPlaceholder.Web.Shared/Middleware/indexhtmlmiddleware.cs:line 62
   at NSwag.AspNetCore.Middlewares.SwaggerUiIndexMiddleware.Invoke(HttpContext context)
   at NSwag.AspNetCore.Middlewares.RedirectToIndexMiddleware.Invoke(HttpContext context)
   at NSwag.AspNetCore.Middlewares.OpenApiDocumentMiddleware.Invoke(HttpContext context)
   at HttPlaceholder.Web.Shared.Middleware.StubHandlingMiddleware.Invoke(HttpContext context) in /app/src/HttPlaceholder.Web.Shared/Middleware/stubhandlingmiddleware.cs:line 72
   at HttPlaceholder.Web.Shared.Middleware.ApiExceptionHandlingMiddleware.Invoke(HttpContext context) in /app/src/HttPlaceholder.Web.Shared/Middleware/apiexceptionhandlingmiddleware.cs:line 38
   at HttPlaceholder.Web.Shared.Middleware.DevelopmentMiddleware.Invoke(HttpContext context, IHttpContextService httpContextService, IStubRequestContext stubRequestContext, IEnvService envService) in /app/src/HttPlaceholder.Web.Shared/Middleware/developmentmiddleware.cs:line 35
   at HttPlaceholder.Web.Shared.Utilities.StartupUtilities.<>c.<<UseHttPlaceholder>b__4_0>d.MoveNext() in /app/src/HttPlaceholder.Web.Shared/Utilities/startuputilities.cs:line 116
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)

When clearing the requests folder, the error went away and I haven't seen it since.

@dukeofharen dukeofharen added the bugfix Inconsistencies or issues which will cause a problem for users or implementors. label Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Inconsistencies or issues which will cause a problem for users or implementors.
Projects
None yet
Development

No branches or pull requests

1 participant