-
Notifications
You must be signed in to change notification settings - Fork 19
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
MissingMethodException: Method not found: 'SixLabors.ImageSharp.Formats.IImageFormat on Cropper.LoadImage() #66
Comments
Here is a repository showing a working 7.0 and broken ABP 7.0 example: https://github.com/brauerj-gc/CropperError-ABP7-and-dotnet7 |
Hi @brauerj-gc , thanks for reporting this issue. This seems like a bug in dotnet runtime (dotnet/aspnetcore#40033), could you try the workaround described there? Unfortunately, I am currently tied up with other obligations and am unable to investigate the sample project at this moment. I apologize for any inconvenience that this may cause. Please feel free to reach out if you have any further questions or concerns. |
I don't believe I am using trimming so not sure how it is related to that bug... I may try to dig in deeper here in a few weeks. I understand being otherwise engaged... |
I'm running into the same issue even though I'm not using ABP.IO. Was working a couple days ago and it started throwing after the setting the image OnInputFileChange :Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100] |
Not sure if it's related to @brauerj-gc 's issue but I found out the cause of my issue with the Method Not Found error. I had another package that updated SixLabors.ImageSharp to 3.0 which caused Cropper to break. Downgrading SixLabors.ImageSharp to 2.1.3 seems to resolved my issue. |
Downgrading SixLabors.ImageSharp to 2.1.3 solved my error but now the image itself is never set in the cropper and there seems to be an "Object reference not set to an instance of an object" error on this line: var args = await cropper.GetCropedResult(); In the logs I see: 2023-03-28 10:19:36.708 -04:00 [ERR] Unhandled exception in circuit '3uPJOeuzhIWTEjqfcZDpFbwwvsGH_TaDHiSgKPjAE78'. and 2023-03-28 10:19:36.742 -04:00 [INF] Connection id "0HMPFIT2ID533", Request id "0HMPFIT2ID533:0000009B": the application completed without reading the entire request body. |
With any ABP.IO Blazor Server project using version 7.0 (dotnet and ABP) I get the following error! I'm seem to be unable to fix it.
Error: System.MissingMethodException: Method not found: 'SixLabors.ImageSharp.Formats.IImageFormat SixLabors.ImageSharp.Formats.ImageFormatManager.FindFormatByFileExtension(System.String)'.
at Blazor.Cropper.Cropper.LoadImage(String ext, IBrowserFile resizedImageFile)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Blazor.Cropper.Cropper.LoadImage(String ext, IBrowserFile resizedImageFile)
at Blazor.Cropper.Cropper.OnParametersSetAsync() in C:\Users\brauerj\source\repos\MyReport7\dependencies\Blazor.Cropper\Blazor.Cropper\Cropper.razor.cs:line 376
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
Any suggestions?
The text was updated successfully, but these errors were encountered: