Blazor-Captcha icon indicating copy to clipboard operation
Blazor-Captcha copied to clipboard

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

Open sdagkas opened this issue 2 years ago • 7 comments

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)

sdagkas avatar Jan 31 '23 10:01 sdagkas

Same error here. Any workaround?

IonRobu avatar Jun 14 '23 08:06 IonRobu

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

crippledfaith avatar Jul 08 '23 03:07 crippledfaith

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)

a-bagherian avatar Jul 29 '23 08:07 a-bagherian

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)

nlpsl202 avatar Aug 29 '23 02:08 nlpsl202

I'm having the same problem.

elshorbagy avatar Dec 04 '23 17:12 elshorbagy

let's hope the SkiaSharp team finds a solution https://github.com/mono/SkiaSharp/issues/2732

tossnet avatar Feb 09 '24 07:02 tossnet

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

nickfortyau avatar Apr 26 '24 03:04 nickfortyau