-
Notifications
You must be signed in to change notification settings - Fork 43
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
Update nuget packages to fix conflicting version bug #112
Conversation
If possible can this get pushed to nuget once approved? |
What exactly is this fixing? I know the PR title says something about AutoMapper conflict. The unit tests as part of the CI/CD process are not showing any issues related to that. Can you help me with steps to reproduce? Also, is there any reason why you chose to use |
The packages are all the latest as far as my IDE can tell. The bug is when your own project is using the latest version of AutoMapper as well, causing this bug; System.MissingMethodException: Method not found: '!!1 AutoMapper.IMapper.Map(!!0)'.
at SteamWebAPI2.Interfaces.SteamUser.GetPlayerSummaryAsync(UInt64 steamId)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at SteamWebAPI2.Interfaces.SteamUser.GetPlayerSummaryAsync(UInt64 steamId)
at Momentum.Auth.Api.Services.SteamService.BuildUserFromProfile(String steamId) in /src/API/src/Modules/Auth/Momentum.Auth.Api/Services/SteamService.cs:line 127
at Momentum.Auth.Api.Controllers.SteamController.<SignInAsync>b__4_0() in /src/API/src/Modules/Auth/Momentum.Auth.Api/Controllers/SteamController.cs:line 48
at Momentum.Users.Application.Commands.GetOrCreateNewUserCommandHandler.Handle(GetOrCreateNewUserCommand request, CancellationToken cancellationToken) in /src/API/src/Modules/Users/Momentum.Users.Application/Commands/GetOrCreateNewUserCommand.cs:line 70
at MediatR.Pipeline.RequestExceptionProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestExceptionProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestExceptionActionProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestExceptionActionProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestPostProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at MediatR.Pipeline.RequestPreProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
at Momentum.Auth.Api.Controllers.SteamController.SignInAsync() in /src/API/src/Modules/Auth/Momentum.Auth.Api/Controllers/SteamController.cs:line 45
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(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.<InvokeFilterPipelineAsync>g__Awaited|19_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.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Microsoft.AspNetCore.Authorization.Policy.AuthorizationMiddlewareResultHandler.HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context) The solution is just to update according to https://stackoverflow.com/questions/63519439/automapper-issue-with-identityserver4-missingmethodexception-method-not-found |
https://www.nuget.org/packages/Microsoft.Extensions.Options/ The package is not at 5.0.1 |
Would be great if this got accepted. Just broke production by updating AutoMapper for another component :D |
A temporary workaround is to downgrade your own AutoMapper to v9 - or building my fix branch |
@Hona thanks for your contribution. I'll build the NuGet package and push it out today. |
4.3.0 has been pushed to the NuGet feed. |
Specifically to address a bug with conflicting versions of AutoMapper