Skip to content

System.MissingMethodException: Method not found: 'Void' in 15.3.2 #701

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

Closed
BenWhite27 opened this issue May 1, 2025 · 6 comments
Closed
Labels

Comments

@BenWhite27
Copy link

Which component is this issue related to?

Umbraco Commerce (Core)

Which Umbraco Commerce version are you using? (Please write the exact version, example: 10.1.0)

15.3.2

Bug summary

System.MissingMethodException getting logged when updating an order and during processing of a payment provider callback.

Despite the errors I'm not experiencing any issues though, payment callbacks happen okay and update the order as required, and the order status does change when updating that.

Specifics

Error processing Umbraco Commerce callback using [PaymentProvider] for order [Order Number]

System.MissingMethodException: Method not found: 'Void Umbraco.Cms.Infrastructure.HostedServices.IBackgroundTaskQueue.QueueBackgroundWorkItem(System.Func`2<System.Threading.CancellationToken,System.Threading.Tasks.Task>)'.
   at Umbraco.Commerce.Infrastructure.Resiliency.PollyExecutionStrategyBase.ExecuteAsync[TResult](Func`2 operation, Func`2 verifySucceeded, CancellationToken cancellationToken)
   at Umbraco.Commerce.Cms.Web.PaymentRequestHandler.Callback(HttpContext httpContext, IPaymentProvider paymentProvider, PaymentProviderContext ctx, CancellationToken token)

Unhandled exception, maybe related.

System.MissingMethodException: Method not found: 'Void Umbraco.Cms.Infrastructure.HostedServices.IBackgroundTaskQueue.QueueBackgroundWorkItem(System.Func`2<System.Threading.CancellationToken,System.Threading.Tasks.Task>)'.
   at Umbraco.Commerce.Infrastructure.Resiliency.PollyExecutionStrategyBase.ExecuteAsync[TResult](Func`2 operation, Func`2 verifySucceeded, CancellationToken cancellationToken)
   at Umbraco.Commerce.Cms.Web.PaymentRequestHandler.Callback(HttpContext httpContext, IPaymentProvider paymentProvider, PaymentProviderContext ctx, CancellationToken token)
   at Umbraco.Commerce.Cms.Web.PaymentRequestHandler.HandleRequestWithOrderAsync(HttpContext httpContext, RequestHandlerType requestHandlerType, String paymentProviderAlias, Guid orderId, String orderNumber, String hash, Func`4 handler, CancellationToken token)
   at Umbraco.Commerce.Cms.Web.PaymentRequestHandler.LockedRequest(Func`1 handler, String lockKey, CancellationToken token)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
... more lines available

Unhandled exception, occurred when saving an order

System.MissingMethodException: Method not found: 'Void Umbraco.Cms.Infrastructure.HostedServices.IBackgroundTaskQueue.QueueBackgroundWorkItem(System.Func`2<System.Threading.CancellationToken,System.Threading.Tasks.Task>)'.
   at Umbraco.Commerce.Infrastructure.Resiliency.PollyExecutionStrategyBase.ExecuteAsync[TResult](Func`2 operation, Func`2 verifySucceeded, CancellationToken cancellationToken)
   at Umbraco.Commerce.Cms.Web.Api.Management.Controllers.UpdateOrderManagementApiController.UpdateOrderById(StoreSessionDto session, Guid orderId, UpdateOrderRequestDto requestDto, OptionsDto optionsDto, CancellationToken token)
   at lambda_method2261(Closure, Object)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
... more lines available

Steps to reproduce

The error related to saving an order happened when I tried to change status of an order to cancelled from new.

The other errors seem to happen when the payment provider callback happens.

Expected result / actual result

No response

Dependencies

Umbraco v15.4.0

@BenWhite27 BenWhite27 added the bug Something isn't working label May 1, 2025
@BenWhite27
Copy link
Author

I've just seen the 15.3.3 release which mentions missing methods. I'll test that now.

@BenWhite27
Copy link
Author

Seems to be fixed in 15.3.3, so closing this one.

@mattbrailsford
Copy link
Contributor

@BenWhite27 yea, I've just taken to fixing them before you report them now 😁

Thanks for testing and confirming 👍

@BenWhite27
Copy link
Author

Hehe 😆 there's only one more issue I've found in my logs @mattbrailsford, but it's related to the UC telemetry so it's not holding me back and may already be on your internal backlog. I'll leave it here but don't intend on raising an issue for it.

Unhandled exception in recurring background job.

System.AggregateException: AsyncHelper.RunSync method threw an exception. (A INPocoDatabaseProvider instance can only be created inside a unit of work!)
 ---> System.ApplicationException: A INPocoDatabaseProvider instance can only be created inside a unit of work!
   at Umbraco.Commerce.Persistence.NPocoDatabaseProvider.GetDatabaseAsync()
   at Umbraco.Commerce.Persistence.Repositories.NPocoRepositoryBase.EnsureDatabaseAsync()
   at Umbraco.Commerce.Persistence.Repositories.NPocoRepositoryBase.WithDbAsync[T](Func`2 action)
   at Umbraco.Commerce.Cms.Pipelines.Telemetry.Tasks.ExtractUmbracoCommerceProductCountTask.ExecuteAsync(Guid storeId, TelemetryDataPipelineArgs args, CancellationToken cancellationToken)
   at Umbraco.Commerce.Common.Pipelines.Tasks.StoreTelemetryDataTaskBase`2.ExecuteAsync(PipelineArgs`1 args, CancellationToken cancellationToken)
   at Umbraco.Commerce.Common.Pipelines.Tasks.PipelineTaskBase`2.ExecuteAsync(PipelineArgs args, CancellationToken cancellationToken)
   at Umbraco.Commerce.Common.Pipelines.InProcPipelineInvoker.<>c__DisplayClass2_0.<<Umbraco-Commerce-Common-Pipelines-IAsyncPipelineInvoker-InvokeAsync>g__NextAsync|0>d.MoveNext()
--- End of stack trace from previous location ---
   at Umbraco.Commerce.Common.Pipelines.InProcPipelineInvoker.<>c__DisplayClass2_0.<<Umbraco-Commerce-Common-Pipelines-IAsyncPipelineInvoker-InvokeAsync>g__NextAsync|0>d.MoveNext()
--- End of stack trace from previous location ---
   at Umbraco.Commerce.Common.Pipelines.InProcPipelineInvoker.<>c__DisplayClass2_0.<<Umbraco-Commerce-Common-Pipelines-IAsyncPipelineInvoker-InvokeAsync>g__NextAsync|0>d.MoveNext()
--- End of stack trace from previous location ---
   at Umbraco.Commerce.Common.Pipelines.InProcPipelineInvoker.<>c__DisplayClass2_0.<<Umbraco-Commerce-Common-Pipelines-IAsyncPipelineInvoker-InvokeAsync>g__NextAsync|0>d.MoveNext()
--- End of stack trace from previous location ---
   at Umbraco.Commerce.Common.Pipelines.InProcPipelineInvoker.<>c__DisplayClass2_0.<<Umbraco-Commerce-Common-Pipelines-IAsyncPipelineInvoker-InvokeAsync>g__NextAsync|0>d.MoveNext()
--- End of stack trace from previous location ---
   at Umbraco.Commerce.Common.Pipelines.InProcPipelineInvoker.<>c__DisplayClass2_0.<<Umbraco-Commerce-Common-Pipelines-IAsyncPipelineInvoker-InvokeAsync>g__NextAsync|0>d.MoveNext()
--- End of stack trace from previous location ---
   at Umbraco.Commerce.Common.Pipelines.InProcPipelineInvoker.Umbraco.Commerce.Common.Pipelines.IAsyncPipelineInvoker.InvokeAsync(IEnumerable`1 pipelineTasks, PipelineArgs args, CancellationToken cancellationToken)
   at Umbraco.Commerce.Common.Pipelines.Pipeline.ExecuteAsync[TPipeline,TArgs,TEntity](Func`1 argsFactory, CancellationToken cancellationToken)
   at Umbraco.Commerce.Cms.Telemetry.Providers.TelemetryProvider.GetInformationAsync()
   at Umbraco.Commerce.Common.Helpers.AsyncHelper.<>c__DisplayClass0_0`1.<<RunSync>b__0>d.MoveNext()
   --- End of inner exception stack trace ---
   at Umbraco.Commerce.Common.Helpers.AsyncHelper.ExclusiveSynchronizationContext.BeginMessageLoop()
   at Umbraco.Commerce.Common.Helpers.AsyncHelper.RunSync[T](Func`1 task)
   at Umbraco.Commerce.Cms.Telemetry.Providers.TelemetryProvider.GetInformation()
   at Umbraco.Cms.Core.Services.UsageInformationService.GetDetailed()
   at Umbraco.Cms.Core.Telemetry.TelemetryService.GetTelemetryReportDataAsync()
   at Umbraco.Cms.Infrastructure.BackgroundJobs.Jobs.ReportSiteJob.RunJobAsync()
   at Umbraco.Cms.Infrastructure.BackgroundJobs.RecurringBackgroundJobHostedService`1.PerformExecuteAsync(Object state)

@mattbrailsford
Copy link
Contributor

mattbrailsford commented May 1, 2025

I hadn't seen that no, but I've just created a fix for it now and so will be in a future 15.3.4.

I rushed most of the others out because they were show stoppers, but whilst this one is annoying, I think it's safe to wait till the next patch release (it looks like something that's been wrong since v15.0.0 anyway)

@umbracotrd
Copy link

fyi, 15.3.4 is out now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants