Skip to content
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

ImageSharp.Web.Sample yields System.MissingMethodException on macOS #55

Closed
fhintsch opened this issue Jan 29, 2019 · 4 comments
Closed

Comments

@fhintsch
Copy link

Prerequisites

Install ImageSharp.Web-master on a Mac. Start Visual Studio with ImageSharp.Web.sln

Description

Build ImageSharp.Web.Sample (see ticket #53 on errors).
Run it.
The demo page looks quite poor like this

All requests for an image result in an exception like:

Microsoft.AspNetCore.Hosting.Internal.WebHost:Information: Request starting HTTP/1.1 GET http://localhost:2646/imagesharp-logo.png?width=300&bgcolor=FFFF00 �[40m�[32minfo�[39m�[22m�[49m: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] Request starting HTTP/1.1 GET http://localhost:2646/imagesharp-logo.png?width=300&bgcolor=FFFF00 Exception thrown: 'System.MissingMethodException' in SixLabors.ImageSharp.Web.dll Exception thrown: 'System.NotSupportedException' in SixLabors.ImageSharp.Web.dll Exception thrown: 'System.MissingMethodException' in System.Private.CoreLib.dll Microsoft.AspNetCore.Hosting.Internal.WebHost:Information: Request finished in 4214.771ms 500 text/html; charset=utf-8 �[40m�[32minfo�[39m�[22m�[49m: Microsoft.AspNetCore.Hosting.Internal.WebHost[2] Request finished in 4214.771ms 500 text/html; charset=utf-8 �[40m�[32minfo�[39m�[22m�[49m: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] Request starting HTTP/1.1 GET http://localhost:2646/imagesharp-logo.png?width=300&bgcolor=128,28,32 Microsoft.AspNetCore.Hosting.Internal.WebHost:Information: Request starting HTTP/1.1 GET http://localhost:2646/imagesharp-logo.png?width=300&bgcolor=128,28,32 �[41m�[30mfail�[39m�[22m�[49m: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1] An unhandled exception has occurred while executing the request. System.MissingMethodException: Method not found: 'Void Microsoft.Net.Http.Headers.EntityTagHeaderValue..ctor(System.String)'. at SixLabors.ImageSharp.Web.Middleware.ImageContext.ComputeLastModified() at SixLabors.ImageSharp.Web.Middleware.ImageContext.ComprehendRequestHeaders(DateTimeOffset lastModified, Int64 length) in .../ImageSharp.Web-master/src/ImageSharp.Web/Middleware/ImageContext.cs:line 103 at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.SendResponse(ImageContext imageContext, String key, Stream stream, ImageMetaData metadata) in .../ImageSharp.Web-master/src/ImageSharp.Web/Middleware/ImageSharpMiddleware.cs:line 279 at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.Invoke(HttpContext context) in .../ImageSharp.Web-master/src/ImageSharp.Web/Middleware/ImageSharpMiddleware.cs:line 203 at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context) Exception thrown: 'System.MissingMethodException' in SixLabors.ImageSharp.Web.dll Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware:Error: An unhandled exception has occurred while executing the request.

System Configuration

  • ImageSharp.Web version: 1.0.0-beta6
  • Other SixLabors packages and versions:
    packages/sixlabors.core/1.0.0-beta0006/lib/netcoreapp2.0/SixLabors.Core.dll packages/sixlabors.imagesharp/1.0.0-beta0005/lib/netcoreapp2.1/SixLabors.ImageSharp.dll
  • Environment (Operating system, version and so on): macOS 10.14.2
  • .NET Core version: 2.1.2
  • Additional information: VS Community for Mac 7.7.3
@JimBobSquarePants
Copy link
Member

Looking at your stacktrace it appears this is the issue.

domaindrivendev/Swashbuckle.AspNetCore#438

@fhintsch
Copy link
Author

fhintsch commented Jan 29, 2019 via email

@fhintsch
Copy link
Author

Good news.

I did a complete new install of dotnet core 2.2 on linux and everything worked fine!

Then I did an uninstall of dotnet on the Mac (following https://stackoverflow.com/a/44089766/475997) and a new install of dotnet core 2.2.

Executing dotnet run in ImageSharp.Web.Sample and ... everything fine.

Thanks for your assistance, Jim!

@JimBobSquarePants
Copy link
Member

Great news!

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

No branches or pull requests

2 participants