Blazor-Captcha
Blazor-Captcha copied to clipboard
The type initializer for 'SkiaSharp.SKImageInfo' threw an exception
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)
Same error here. Any workaround?
Same here, added SkiaSharp, SkiaSharp.NativeAssets.WebAssembly, still not working. on Webassembly
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)
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)
I'm having the same problem.
let's hope the SkiaSharp team finds a solution https://github.com/mono/SkiaSharp/issues/2732
Works great in a non-docker environment, as soon as I deployed in AWS ECS in a docker image, I get this error