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

Unable to use 2.0.0 rc3.3 or rc4.5 #1761

Open
enricobenedos opened this issue Jan 13, 2025 · 4 comments
Open

Unable to use 2.0.0 rc3.3 or rc4.5 #1761

enricobenedos opened this issue Jan 13, 2025 · 4 comments
Labels

Comments

@enricobenedos
Copy link

Describe the bug
Unable to use the library for the first time on a existing Blazor WASM project.

To Reproduce
Steps to reproduce the behavior:

  1. Install package latest (rc4.5) or rc3.3 on a WASM project with .NET 9
  2. Use CartesianChart as per documentation

Behavior
The browser give an exception with both versions:

image

Desktop (please complete the following information):

  • OS: Windows 11 24H2
  • Browser: Edge
  • Version: 131.0.2903.146 (Official build) (64-bit)
@alexandrelugand
Copy link

alexandrelugand commented Jan 14, 2025

I have the same issue when I'm trying to migrate on .net 9.0.
I tried to update directly the SkiaSharp assembly to last version (3.118.0-preview.2.3), but I have another issue (on a function InitGL, probably to initialize OpenGL ES)

@beto-rodriguez
Copy link
Owner

This should be now working properly on the latest version of the library``2.0.0-rc5.1` please let me know if that version helps.

@alexandrelugand
Copy link

Hi, I've another exception with 2.0.0-rc5.1 version.

Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100] Unhandled exception rendering component: Could not set up parent class, due to: Could not load type of field 'SkiaSharp.Views.Blazor.Internal.JSModuleInterop:moduleTask' (0) due to: Could not resolve type with token 01000039 from typeref (expected class 'Microsoft.JSInterop.IJSUnmarshalledObjectReference' in assembly 'Microsoft.JSInterop, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60') assembly:Microsoft.JSInterop, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 type:Microsoft.JSInterop.IJSUnmarshalledObjectReference member:(null) assembly:SkiaSharp.Views.Blazor.dll type:JSModuleInterop member:(null) System.TypeLoadException: Could not set up parent class, due to: Could not load type of field 'SkiaSharp.Views.Blazor.Internal.JSModuleInterop:moduleTask' (0) due to: Could not resolve type with token 01000039 from typeref (expected class 'Microsoft.JSInterop.IJSUnmarshalledObjectReference' in assembly 'Microsoft.JSInterop, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60') assembly:Microsoft.JSInterop, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 type:Microsoft.JSInterop.IJSUnmarshalledObjectReference member:(null) assembly:SkiaSharp.Views.Blazor.dll type:JSModuleInterop member:(null) at SkiaSharp.Views.Blazor.SKGLView.OnAfterRenderAsync(Boolean firstRender) fail: FEV.Morphee.Scada.App.Services.Loggers.Scada[0] Unhandled Exception: System.TypeInitializationException: The type initializer for 'SkiaSharp.SKObject' threw an exception. ---> System.InvalidOperationException: The version of the native libSkiaSharp library (116.0) is incompatible with this version of SkiaSharp. Supported versions of the native libSkiaSharp library are in the range [88.1, 89.0). at SkiaSharp.SkiaSharpVersion.CheckNativeLibraryCompatible(Version minSupported, Version current, Boolean throwIfIncompatible) at SkiaSharp.SkiaSharpVersion.CheckNativeLibraryCompatible(Boolean throwIfIncompatible) at SkiaSharp.SKObject..cctor() --- End of inner exception stack trace --- at SkiaSharp.SKTypeface..ctor(IntPtr handle, Boolean owns) at SkiaSharp.SKTypeface.SKTypefaceStatic..ctor(IntPtr x) at SkiaSharp.SKTypeface..cctor()

@alexandrelugand
Copy link

I tried to update SkiaSharp to last preview version (3.118.0-preview.2.3) after see this pull request, but it didn't work. I have always the upper exception, and a new one:

fail: FEV.Morphee.Scada.App.Services.Loggers.Scada[0] Unhandled Exception: System.TypeInitializationException: The type initializer for 'SkiaSharp.SKObject' threw an exception. ---> System.InvalidOperationException: The version of the native libSkiaSharp library (118.0) is incompatible with this version of SkiaSharp. Supported versions of the native libSkiaSharp library are in the range [88.1, 89.0). at SkiaSharp.SkiaSharpVersion.CheckNativeLibraryCompatible(Version minSupported, Version current, Boolean throwIfIncompatible) at SkiaSharp.SkiaSharpVersion.CheckNativeLibraryCompatible(Boolean throwIfIncompatible) at SkiaSharp.SKObject..cctor() --- End of inner exception stack trace --- at SkiaSharp.SKTypeface..ctor(IntPtr handle, Boolean owns) at SkiaSharp.SKTypeface.SKTypefaceStatic..ctor(IntPtr x) at SkiaSharp.SKTypeface..cctor()

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

No branches or pull requests

3 participants