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

The type initializer for 'SkiaSharp.SKImageInfo' threw an exception #11

Open
sdagkas opened this issue Jan 31, 2023 · 7 comments
Open

Comments

@sdagkas
Copy link

sdagkas commented Jan 31, 2023

Using BlazorCaptcha 1.2.4 in a .NET 6 project results in the following runtime error:

Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: The type initializer for 'SkiaSharp.SKImageInfo' threw an exception.
System.TypeInitializationException: The type initializer for 'SkiaSharp.SKImageInfo' threw an exception.
---> System.DllNotFoundException: libSkiaSharp
at SkiaSharp.SKImageInfo..cctor()
--- End of inner exception stack trace ---
at BlazorCaptcha.Captcha.BuildRenderTree(RenderTreeBuilder builder)
at Microsoft.AspNetCore.Components.ComponentBase.<.ctor>b__6_0(RenderTreeBuilder builder)
at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, Exception& renderFragmentException)

@IonRobu
Copy link

IonRobu commented Jun 14, 2023

Same error here. Any workaround?

@crippledfaith
Copy link

crippledfaith commented Jul 8, 2023

Same here, added SkiaSharp, SkiaSharp.NativeAssets.WebAssembly, still not working.
on Webassembly

@a-bagherian
Copy link

blazor wasm

Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: The type initializer for 'SkiaSharp.SKImageInfo' threw an exception.
System.TypeInitializationException: The type initializer for 'SkiaSharp.SKImageInfo' threw an exception.
---> System.DllNotFoundException: libSkiaSharp
at SkiaSharp.SKImageInfo..cctor()
--- End of inner exception stack trace ---
at BlazorCaptcha.Captcha.BuildRenderTree(RenderTreeBuilder builder)

@nlpsl202
Copy link

same here
I am using wasm

Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: The type initializer for 'SkiaSharp.SKImageInfo' threw an exception.
System.TypeInitializationException: The type initializer for 'SkiaSharp.SKImageInfo' threw an exception.
---> System.DllNotFoundException: libSkiaSharp
at SkiaSharp.SKImageInfo..cctor()
--- End of inner exception stack trace ---
at BlazorCaptcha.Captcha.BuildRenderTree(RenderTreeBuilder builder) in D:\VSO\Blazor-Captcha\BlazorCaptcha\Captcha.cs:line 105
at Microsoft.AspNetCore.Components.ComponentBase.<.ctor>b__6_0(RenderTreeBuilder builder)
at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, Exception& renderFragmentException)

@elshorbagy
Copy link

I'm having the same problem.

@tossnet
Copy link
Owner

tossnet commented Feb 9, 2024

let's hope the SkiaSharp team finds a solution mono/SkiaSharp#2732

@nickfortyau
Copy link

Works great in a non-docker environment, as soon as I deployed in AWS ECS in a docker image, I get this error

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

8 participants