You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have setup of OrchardCore with enabled Amazon S3 storage provider. when I delete any content item in system I see an error related to S3 call in logs. This error does not affect any functionality but looks unnecessary.
OrchardCore.Media module has AttachedMediaFieldContentHandler that reacts on content deletion and tries to delete related media files if exists. Call passed through AttachedMediaFieldFileService > DefaultMediaFileStore > AwsFileStorage.TryDeleteDirectoryAsync.
TryDeleteDirectoryAsync method first tries to retrieve any objects related to specific path, and then makes call to DeleteObjectsAsync to remove them. But in case if there are no objects exist for removal, DeleteObjectsAsync call still executes (with empty list of objects to delete) and results in an error.
To Reproduce
Steps to reproduce the behavior:
Run OC on the latest main commit
Set up the site with any recipe
Enable the Amazon Media Storage feature and configure it
Create any content item.
Delete item created on step 4
Expected behavior
The are no errors in logs.
Actual behavior
I see error in logs:
"IContentHandler" thrown from "OrchardCore.Media.Handlers.AttachedMediaFieldContentHandler" by
"AmazonS3Exception"",
Amazon.S3.AmazonS3Exception: The XML you provided was not well-formed or did not validate against our published schema
Amazon.Runtime.Internal.HttpErrorResponseException: Exception of type 'Amazon.Runtime.Internal.HttpErrorResponseException' was thrown.
at Amazon.Runtime.HttpWebRequestMessage.GetResponseAsync(CancellationToken cancellationToken)
at Amazon.Runtime.Internal.HttpHandler`1.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.RedirectHandler.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.Unmarshaller.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.S3.Internal.AmazonS3ResponseHandler.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.ErrorHandler.InvokeAsync[T](IExecutionContext executionContext)
--- End of inner exception stack trace --
at Amazon.Runtime.Internal.HttpErrorResponseExceptionHandler.HandleExceptionStream(IRequestContext requestContext, IWebResponseData httpErrorResponse, HttpErrorResponseException exception, Stream responseStream)
at Amazon.Runtime.Internal.HttpErrorResponseExceptionHandler.HandleExceptionAsync(IExecutionContext executionContext, HttpErrorResponseException exception)
at Amazon.Runtime.Internal.ExceptionHandler`1.HandleAsync(IExecutionContext executionContext, Exception exception)
at Amazon.Runtime.Internal.ErrorHandler.ProcessExceptionAsync(IExecutionContext executionContext, Exception exception)
at Amazon.Runtime.Internal.ErrorHandler.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.Signer.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.EndpointDiscoveryHandler.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.EndpointDiscoveryHandler.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.CredentialsRetriever.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.RetryHandler.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.RetryHandler.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.S3.Internal.AmazonS3ExceptionHandler.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.ErrorCallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
at Amazon.Runtime.Internal.MetricsHandler.InvokeAsync[T](IExecutionContext executionContext)
at OrchardCore.FileStorage.AmazonS3.AwsFileStore.TryDeleteDirectoryAsync(String path)
at OrchardCore.Media.Core.DefaultMediaFileStore.TryDeleteDirectoryAsync(String path)
at OrchardCore.Media.Handlers.AttachedMediaFieldContentHandler.RemovedAsync(RemoveContentContext context)
at OrchardCore.Modules.InvokeExtensions.InvokeAsync[TEvents,T1](IEnumerable`1 events, Func`3 dispatch, T1 arg1, ILogger logger)
The text was updated successfully, but these errors were encountered:
Describe the bug
I have setup of OrchardCore with enabled Amazon S3 storage provider. when I delete any content item in system I see an error related to S3 call in logs. This error does not affect any functionality but looks unnecessary.
OrchardCore.Media module has AttachedMediaFieldContentHandler that reacts on content deletion and tries to delete related media files if exists. Call passed through AttachedMediaFieldFileService > DefaultMediaFileStore > AwsFileStorage.TryDeleteDirectoryAsync.
TryDeleteDirectoryAsync method first tries to retrieve any objects related to specific path, and then makes call to DeleteObjectsAsync to remove them. But in case if there are no objects exist for removal, DeleteObjectsAsync call still executes (with empty list of objects to delete) and results in an error.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The are no errors in logs.
Actual behavior
I see error in logs:
The text was updated successfully, but these errors were encountered: