Closed cf-marc closed 4 days ago
Hi there @cf-marc!
Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better.
We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.
We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions.
Thanks, from your friendly Umbraco GitHub bot :robot: :slightly_smiling_face:
This also seems to happen, when I set a publish at date for scheduling:
System.AggregateException: One or more errors occurred. (One or more errors occurred. (Could not obtain an HTTP context))
---> System.AggregateException: One or more errors occurred. (Could not obtain an HTTP context)
---> System.InvalidOperationException: Could not obtain an HTTP context
at Umbraco.Cms.Api.Delivery.Services.RequestHeaderHandler.GetHeaderValue(String headerName)
at Umbraco.Cms.Api.Delivery.Services.RequestPreviewService.IsPreview()
at Umbraco.Cms.Core.DeliveryApi.ApiContentRouteBuilder.Build(IPublishedContent content, String culture)
at Umbraco.Cms.Core.DeliveryApi.ApiContentBuilderBase`1.Build(IPublishedContent content)
at Umbraco.Cms.Core.Webhooks.Events.ContentPublishedWebhookEvent.ConvertEntityToRequestPayload(IContent entity)
at Umbraco.Cms.Core.Webhooks.WebhookEventContentBase`2.ProcessWebhooks(TNotification notification, IEnumerable`1 webhooks, CancellationToken cancellationToken)
at Umbraco.Cms.Core.Webhooks.WebhookEventBase`1.HandleAsync(TNotification notification, CancellationToken cancellationToken)
at Umbraco.Cms.Core.Events.INotificationAsyncHandler`1.HandleAsync(IEnumerable`1 notifications, CancellationToken cancellationToken)
at Umbraco.Cms.Core.Events.EventAggregator.PublishCoreAsync[TNotification](IEnumerable`1 allHandlers, IEnumerable`1 notifications, CancellationToken cancellationToken)
at Umbraco.Cms.Core.Events.NotificationAsyncHandlerWrapperImpl`1.HandleAsync[TNotification,TNotificationHandler](IEnumerable`1 notifications, CancellationToken cancellationToken, ServiceFactory serviceFactory, Func`4 publish)
at Umbraco.Cms.Core.Events.EventAggregator.PublishNotificationsAsync[TNotification,TNotificationHandler](IEnumerable`1 notifications, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.WaitAllCore(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.WaitAll(Task[] tasks)
at Umbraco.Cms.Core.Events.EventAggregator.Publish[TNotification,TNotificationHandler](IEnumerable`1 notifications)
at Umbraco.Cms.Core.Events.ScopedNotificationPublisher`1.PublishScopedNotifications(IList`1 notifications)
at Umbraco.Cms.Core.Events.ScopedNotificationPublisher`1.ScopeExit(Boolean completed)
at Umbraco.Cms.Infrastructure.Scoping.Scope.TryFinally(Action[] actions)
--- End of inner exception stack trace ---
at Umbraco.Cms.Infrastructure.Scoping.Scope.TryFinally(Action[] actions)
at Umbraco.Cms.Infrastructure.Scoping.Scope.Dispose()
at Umbraco.Cms.Infrastructure.BackgroundJobs.Jobs.ScheduledPublishingJob.RunJobAsync()
Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)
13.3.2
Bug summary
Hello,
I have developed a Hangfire task that runs daily to import data from an external API. We use integrated webhooks to clear the cache in our frontend application when a node is deleted, moved, published, or unpublished. However, during the execution of the Hangfire import task, an exception occurs when attempting to trigger the webhook.
My current workaround is to suppress all notifications while save and publishing
Specifics
Steps to reproduce
Expected result / actual result
The webhook is executed without throwing the exception