Skip to content

MissingMethodException thrown targeting latest version of AWSSDK.S3 library (v4.0.1.3) #386

Closed

Description

@peanutbutterlou

Prerequisites

  • I have written a descriptive issue title
  • I have verified that I am running the latest version of ImageSharp.Web
  • I have verified if the problem exist in both DEBUG and RELEASE mode
  • I have searched open and closed issues to ensure it has not already been reported

ImageSharp.Web version

3.1.5

Other Six Labors packages and versions

SixLabors.ImageSharp.Web.Providers.AWS (v3.1.5)

Environment (Operating system, version and so on)

Windows

.NET version

9.0

Description

Here's a stack trace I'm getting:

System.MissingMethodException: Method not found: 'System.DateTime Amazon.S3.Model.GetObjectMetadataResponse.get_LastModified()'.
   at SixLabors.ImageSharp.Web.Resolvers.AWS.AWSS3StorageImageResolver.GetMetaDataAsync()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at SixLabors.ImageSharp.Web.Resolvers.AWS.AWSS3StorageImageResolver.GetMetaDataAsync()
   at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.<>c__DisplayClass23_0.<IsNewOrUpdatedAsync>b__0(String _)
   at SixLabors.ImageSharp.Web.Caching.ConcurrentTLruCache`2.GetOrAddAsync(TKey key, Func`2 valueFactory)
   at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.IsNewOrUpdatedAsync(IImageResolver sourceImageResolver, String key)
   at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.ProcessRequestAsync(ImageCommandContext imageCommandContext, IImageResolver sourceImageResolver, ImageContext imageContext, Boolean retry)
   at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.Invoke(HttpContext httpContext, Boolean retry)
   at Umbraco.Cms.Api.Management.Middleware.BackOfficeAuthorizationInitializationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<<CreateMiddleware>b__0>d.MoveNext()

The issue lies with a change to the AWSSDK.S3 library with its latest version. The Amazon.S3.Model.GetObjectMetadataResponse.LastModified property has changed to have a DateTime? property type, instead of the non-nullable DateTime type.

Steps to Reproduce

Simply compiling the SixLabors.ImageSharp.Web.Providers.AWS project with the latest version of the AWSSDK.S3 library (v4.0.1.3) should reproduce the issue.

Images

No response

Activity

  1. JimBobSquarePants commented on Jun 9, 2025

    @JimBobSquarePants
    Member

    @peanutbutterlou Can you please ensure you look at existing PRs before opening issues.

    See #385

  2. peanutbutterlou commented on Jun 10, 2025

    @peanutbutterlou
    Author

    Dang. Sorry about that. Thanks for referencing the PR.

    Might be a good idea to add checking existing PRs to the prerequisites checklist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions