Skip to content

Blazor WASM native deps support #23530

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

Merged
merged 2 commits into from
Oct 25, 2021
Merged

Blazor WASM native deps support #23530

merged 2 commits into from
Oct 25, 2021

Conversation

guardrex
Copy link
Collaborator

@guardrex guardrex commented Oct 14, 2021

Fixes #23522

Based on the content in the blog post.

Internal Review Topic (links to section)

@guardrex
Copy link
Collaborator Author

guardrex commented Oct 14, 2021

I have a bug in the example that I don't understand based on the blog post and the SkiaSharp sample app.

UPDATE: I tried to publish the app, too (Debug and Release configs) ... same error crops up.

Uncaught Error: Microsoft.JSInterop.JSException: 
putImageData@https://localhost:8010/_content/SkiaSharp.Views.Blazor/SKHtmlCanvas.js:134:13
putImageData@https://localhost:8010/_content/SkiaSharp.Views.Blazor/SKHtmlCanvas.js:78:33
invokeJSFromDotNet@https://localhost:8010/_framework/blazor.webassembly.js:1:3179
At@https://localhost:8010/_framework/blazor.webassembly.js:1:58414

Original error with dotnet run ...

<empty string> blazor.webassembly.js:1:34552
Unhandled Exception: blazor.webassembly.js:1:34552
Microsoft.JSInterop.JSException: blazor.webassembly.js:1:34552
putImageData@https://localhost:5001/_content/SkiaSharp.Views.Blazor/SKHtmlCanvas.js:134:13 blazor.webassembly.js:1:34552
putImageData@https://localhost:5001/_content/SkiaSharp.Views.Blazor/SKHtmlCanvas.js:78:33 blazor.webassembly.js:1:34552
invokeJSFromDotNet@https://localhost:5001/_framework/blazor.webassembly.js:1:3179 blazor.webassembly.js:1:34552
At@https://localhost:5001/_framework/blazor.webassembly.js:1:58414 blazor.webassembly.js:1:34552
_mono_wasm_invoke_js_blazor@https://localhost:5001/_framework/dotnet.6.0.0-rc.2.21480.5.bes3pph8mp.js:1:231385 blazor.webassembly.js:1:34552
@:wasm-function[67]:0x0 blazor.webassembly.js:1:34552
@:wasm-function[4425]:0x146ed1 blazor.webassembly.js:1:34552
@:wasm-function[4131]:0x12cdb5 blazor.webassembly.js:1:34552
@:wasm-function[13678]:0x4901a2 blazor.webassembly.js:1:34552
@:wasm-function[13482]:0x4865e1 blazor.webassembly.js:1:34552
@:wasm-function[5906]:0x1d4f71 blazor.webassembly.js:1:34552
@:wasm-function[1028]:0x34ec0 blazor.webassembly.js:1:34552
@:wasm-function[11260]:0x409e7d blazor.webassembly.js:1:34552
@:wasm-function[4425]:0x146e8a blazor.webassembly.js:1:34552
@:wasm-function[4131]:0x12cdb5 blazor.webassembly.js:1:34552
@:wasm-function[13678]:0x4901a2 blazor.webassembly.js:1:34552
@:wasm-function[13482]:0x4865e1 blazor.webassembly.js:1:34552
@:wasm-function[5906]:0x1d4f71 blazor.webassembly.js:1:34552
@:wasm-function[1354]:0x43e09 blazor.webassembly.js:1:34552
@:wasm-function[13380]:0x482ecc blazor.webassembly.js:1:34552
Module._mono_wasm_invoke_method@https://localhost:5001/_framework/dotnet.6.0.0-rc.2.21480.5.bes3pph8mp.js:1:260057 blazor.webassembly.js:1:34552
managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_InvokeDotNet@https://mono-wasm.invalid/managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_InvokeDotNet:19:40 blazor.webassembly.js:1:34552
invokeDotNetFromJS@https://localhost:5001/_framework/blazor.webassembly.js:1:41033 blazor.webassembly.js:1:34552
g@https://localhost:5001/_framework/blazor.webassembly.js:1:1618 blazor.webassembly.js:1:34552
invokeMethod@https://localhost:5001/_framework/blazor.webassembly.js:1:3756 blazor.webassembly.js:1:34552
requestAnimationFrame/this.renderLoopRequest<@https://localhost:5001/_content/SkiaSharp.Views.Blazor/SKHtmlCanvas.js:101:38 blazor.webassembly.js:1:34552
FrameRequestCallback*requestAnimationFrame@https://localhost:5001/_content/SkiaSharp.Views.Blazor/SKHtmlCanvas.js:96:41 blazor.webassembly.js:1:34552
requestAnimationFrame@https://localhost:5001/_content/SkiaSharp.Views.Blazor/SKHtmlCanvas.js:66:33 blazor.webassembly.js:1:34552
invokeJSFromDotNet@https://localhost:5001/_framework/blazor.webassembly.js:1:3179 blazor.webassembly.js:1:34552
At@https://localhost:5001/_framework/blazor.webassembly.js:1:58414 blazor.webassembly.js:1:34552
_mono_wasm_invoke_js_blazor@https://localhost:5001/_framework/dotnet.6.0.0-rc.2.21480.5.bes3pph8mp.js:1:231385 blazor.webassembly.js:1:34552
@:wasm-function[67]:0x0 blazor.webassembly.js:1:34552
@:wasm-function[4425]:0x146ed1 blazor.webassembly.js:1:34552
@:wasm-function[4131]:0x12cdb5 blazor.webassembly.js:1:34552
@:wasm-function[13678]:0x4901a2 blazor.webassembly.js:1:34552
@:wasm-function[13482]:0x4865e1 blazor.webassembly.js:1:34552
@:wasm-function[5906]:0x1d4f71 blazor.webassembly.js:1:34552
@:wasm-function[1028]:0x34ec0 blazor.webassembly.js:1:34552
@:wasm-function[11260]:0x409e7d blazor.webassembly.js:1:34552
@:wasm-function[4425]:0x146e8a blazor.webassembly.js:1:34552
@:wasm-function[4131]:0x12cdb5 blazor.webassembly.js:1:34552
@:wasm-function[13678]:0x4901a2 blazor.webassembly.js:1:34552
@:wasm-function[13482]:0x4865e1 blazor.webassembly.js:1:34552
@:wasm-function[5906]:0x1d4f71 blazor.webassembly.js:1:34552
@:wasm-function[1354]:0x43e09 blazor.webassembly.js:1:34552
@:wasm-function[13380]:0x482ecc blazor.webassembly.js:1:34552
Module._mono_wasm_invoke_method@https://localhost:5001/_framework/dotnet.6.0.0-rc.2.21480.5.bes3pph8mp.js:1:260057 blazor.webassembly.js:1:34552
managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_InvokeDotNet@https://mono-wasm.invalid/managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_InvokeDotNet:19:40 blazor.webassembly.js:1:34552
invokeDotNetFromJS@https://localhost:5001/_framework/blazor.webassembly.js:1:41033 blazor.webassembly.js:1:34552
g@https://localhost:5001/_framework/blazor.webassembly.js:1:1618 blazor.webassembly.js:1:34552
invokeMethod@https://localhost:5001/_framework/blazor.webassembly.js:1:3756 blazor.webassembly.js:1:34552
invoke@https://localhost:5001/_content/SkiaSharp.Views.Blazor/SizeWatcher.js:39:34 blazor.webassembly.js:1:34552
init/SizeWatcher.observer<@https://localhost:5001/_content/SkiaSharp.Views.Blazor/SizeWatcher.js:30:29 blazor.webassembly.js:1:34552
ResizeObserverCallback*init@https://localhost:5001/_content/SkiaSharp.Views.Blazor/SizeWatcher.js:28:32 blazor.webassembly.js:1:34552
observe@https://localhost:5001/_content/SkiaSharp.Views.Blazor/SizeWatcher.js:6:21 blazor.webassembly.js:1:34552
invokeJSFromDotNet@https://localhost:5001/_framework/blazor.webassembly.js:1:3179 blazor.webassembly.js:1:34552
At@https://localhost:5001/_framework/blazor.webassembly.js:1:58414 blazor.webassembly.js:1:34552
_mono_wasm_invoke_js_blazor@https://localhost:5001/_framework/dotnet.6.0.0-rc.2.21480.5.bes3pph8mp.js:1:231385 blazor.webassembly.js:1:34552
@:wasm-function[67]:0x0 blazor.webassembly.js:1:34552
@:wasm-function[4425]:0x146ed1 blazor.webassembly.js:1:34552
@:wasm-function[4131]:0x12cdb5 blazor.webassembly.js:1:34552
@:wasm-function[13678]:0x4901a2 blazor.webassembly.js:1:34552
@:wasm-function[13482]:0x4865e1 blazor.webassembly.js:1:34552
@:wasm-function[5906]:0x1d4f71 blazor.webassembly.js:1:34552
@:wasm-function[1354]:0x43e09 blazor.webassembly.js:1:34552
@:wasm-function[13380]:0x482ecc blazor.webassembly.js:1:34552
Module._mono_wasm_invoke_method@https://localhost:5001/_framework/dotnet.6.0.0-rc.2.21480.5.bes3pph8mp.js:1:260057 blazor.webassembly.js:1:34552
managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS@https://mono-wasm.invalid/managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS:16:40 blazor.webassembly.js:1:34552
endInvokeJSFromDotNet@https://localhost:5001/_framework/blazor.webassembly.js:1:40959 blazor.webassembly.js:1:34552
beginInvokeJSFromDotNet/<@https://localhost:5001/_framework/blazor.webassembly.js:1:3336 blazor.webassembly.js:1:34552
promise callback*beginInvokeJSFromDotNet@https://localhost:5001/_framework/blazor.webassembly.js:1:3323 blazor.webassembly.js:1:34552
At@https://localhost:5001/_framework/blazor.webassembly.js:1:58349 blazor.webassembly.js:1:34552
_mono_wasm_invoke_js_blazor@https://localhost:5001/_framework/dotnet.6.0.0-rc.2.21480.5.bes3pph8mp.js:1:231385 blazor.webassembly.js:1:34552
@:wasm-function[67]:0x0 blazor.webassembly.js:1:34552
@:wasm-function[4425]:0x146ed1 blazor.webassembly.js:1:34552
@:wasm-function[4131]:0x12cdb5 blazor.webassembly.js:1:34552
@:wasm-function[13678]:0x4901a2 blazor.webassembly.js:1:34552
@:wasm-function[13482]:0x4865e1 blazor.webassembly.js:1:34552
@:wasm-function[5906]:0x1d4f71 blazor.webassembly.js:1:34552
@:wasm-function[1354]:0x43e09 blazor.webassembly.js:1:34552
@:wasm-function[13380]:0x482ecc blazor.webassembly.js:1:34552
Module._mono_wasm_invoke_method@https://localhost:5001/_framework/dotnet.6.0.0-rc.2.21480.5.bes3pph8mp.js:1:260057 blazor.webassembly.js:1:34552
<empty string> blazor.webassembly.js:1:34552
   at Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime.InvokeJS(String identifier, String argsJson, JSCallResultType resultType, Int64 targetInstanceId) blazor.webassembly.js:1:34552
   at Microsoft.JSInterop.JSInProcessRuntime.Invoke[Object](String identifier, Int64 targetInstanceId, Object[] args) blazor.webassembly.js:1:34552
   at Microsoft.JSInterop.Implementation.JSInProcessObjectReference.Invoke[Object](String identifier, Object[] args) blazor.webassembly.js:1:34552
   at Microsoft.JSInterop.JSInProcessObjectReferenceExtensions.InvokeVoid(IJSInProcessObjectReference jsObjectReference, String identifier, Object[] args) blazor.webassembly.js:1:34552
   at SkiaSharp.Views.Blazor.Internal.JSModuleInterop.Invoke(String identifier, Object[] args) blazor.webassembly.js:1:34552
   at SkiaSharp.Views.Blazor.Internal.SKHtmlCanvasInterop.PutImageData(IntPtr intPtr, SKSizeI rawSize) blazor.webassembly.js:1:34552
   at SkiaSharp.Views.Blazor.SKCanvasView.OnRenderFrame() blazor.webassembly.js:1:34552
   at SkiaSharp.Views.Blazor.Internal.ActionHelper.Invoke() blazor.webassembly.js:1:34552
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) blazor.webassembly.js:1:34552
--- End of stack trace from previous location --- blazor.webassembly.js:1:34552
   at Microsoft.JSInterop.Infrastructure.DotNetDispatcher.InvokeSynchronously(JSRuntime jsRuntime, DotNetInvocationInfo& callInfo, IDotNetObjectReference objectReference, String argsJson) blazor.webassembly.js:1:34552
   at Microsoft.JSInterop.Infrastructure.DotNetDispatcher.Invoke(JSRuntime jsRuntime, DotNetInvocationInfo& invocationInfo, String argsJson) blazor.webassembly.js:1:34552
   at Microsoft.AspNetCore.Components.WebAssembly.Services.DefaultWebAssemblyJSRuntime.InvokeDotNet(String assemblyName, String methodIdentifier, String dotNetObjectId, String argsJson) blazor.webassembly.js:1:34552
Uncaught Error: Microsoft.JSInterop.JSException: 
putImageData@https://localhost:5001/_content/SkiaSharp.Views.Blazor/SKHtmlCanvas.js:134:13
putImageData@https://localhost:5001/_content/SkiaSharp.Views.Blazor/SKHtmlCanvas.js:78:33
invokeJSFromDotNet@https://localhost:5001/_framework/blazor.webassembly.js:1:3179
At@https://localhost:5001/_framework/blazor.webassembly.js:1:58414
_mono_wasm_invoke_js_blazor@https://localhost:5001/_framework/dotnet.6.0.0-rc.2.21480.5.bes3pph8mp.js:1:231385
@:wasm-function[67]:0x0
@:wasm-function[4425]:0x146ed1
@:wasm-function[4131]:0x12cdb5
@:wasm-function[13678]:0x4901a2
@:wasm-function[13482]:0x4865e1
@:wasm-function[5906]:0x1d4f71
@:wasm-function[1028]:0x34ec0
@:wasm-function[11260]:0x409e7d
@:wasm-function[4425]:0x146e8a
@:wasm-function[4131]:0x12cdb5
@:wasm-function[13678]:0x4901a2
@:wasm-function[13482]:0x4865e1
@:wasm-function[5906]:0x1d4f71
@:wasm-function[1354]:0x43e09
@:wasm-function[13380]:0x482ecc
Module._mono_wasm_invoke_method@https://localhost:5001/_framework/dotnet.6.0.0-rc.2.21480.5.bes3pph8mp.js:1:260057
managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_InvokeDotNet@https://mono-wasm.invalid/managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_InvokeDotNet:19:40
invokeDotNetFromJS@https://localhost:5001/_framework/blazor.webassembly.js:1:41033
g@https://localhost:5001/_framework/blazor.webassembly.js:1:1618
invokeMethod@https://localhost:5001/_framework/blazor.webassembly.js:1:3756
requestAnimationFrame/this.renderLoopRequest<@https://localhost:5001/_content/SkiaSharp.Views.Blazor/SKHtmlCanvas.js:101:38
FrameRequestCallback*requestAnimationFrame@https://localhost:5001/_content/SkiaSharp.Views.Blazor/SKHtmlCanvas.js:96:41
requestAnimationFrame@https://localhost:5001/_content/SkiaSharp.Views.Blazor/SKHtmlCanvas.js:66:33
invokeJSFromDotNet@https://localhost:5001/_framework/blazor.webassembly.js:1:3179
At@https://localhost:5001/_framework/blazor.webassembly.js:1:58414
_mono_wasm_invoke_js_blazor@https://localhost:5001/_framework/dotnet.6.0.0-rc.2.21480.5.bes3pph8mp.js:1:231385
@:wasm-function[67]:0x0
@:wasm-function[4425]:0x146ed1
@:wasm-function[4131]:0x12cdb5
@:wasm-function[13678]:0x4901a2
@:wasm-function[13482]:0x4865e1
@:wasm-function[5906]:0x1d4f71
@:wasm-function[1028]:0x34ec0
@:wasm-function[11260]:0x409e7d
@:wasm-function[4425]:0x146e8a
@:wasm-function[4131]:0x12cdb5
@:wasm-function[13678]:0x4901a2
@:wasm-function[13482]:0x4865e1
@:wasm-function[5906]:0x1d4f71
@:wasm-function[1354]:0x43e09
@:wasm-function[13380]:0x482ecc
Module._mono_wasm_invoke_method@https://localhost:5001/_framework/dotnet.6.0.0-rc.2.21480.5.bes3pph8mp.js:1:260057
managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_InvokeDotNet@https://mono-wasm.invalid/managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_InvokeDotNet:19:40
invokeDotNetFromJS@https://localhost:5001/_framework/blazor.webassembly.js:1:41033
g@https://localhost:5001/_framework/blazor.webassembly.js:1:1618
invokeMethod@https://localhost:5001/_framework/blazor.webassembly.js:1:3756
invoke@https://localhost:5001/_content/SkiaSharp.Views.Blazor/SizeWatcher.js:39:34
init/SizeWatcher.observer<@https://localhost:5001/_content/SkiaSharp.Views.Blazor/SizeWatcher.js:30:29
ResizeObserverCallback*init@https://localhost:5001/_content/SkiaSharp.Views.Blazor/SizeWatcher.js:28:32
observe@https://localhost:5001/_content/SkiaSharp.Views.Blazor/SizeWatcher.js:6:21
invokeJSFromDotNet@https://localhost:5001/_framework/blazor.webassembly.js:1:3179
At@https://localhost:5001/_framework/blazor.webassembly.js:1:58414
_mono_wasm_invoke_js_blazor@https://localhost:5001/_framework/dotnet.6.0.0-rc.2.21480.5.bes3pph8mp.js:1:231385
@:wasm-function[67]:0x0
@:wasm-function[4425]:0x146ed1
@:wasm-function[4131]:0x12cdb5
@:wasm-function[13678]:0x4901a2
@:wasm-function[13482]:0x4865e1
@:wasm-function[5906]:0x1d4f71
@:wasm-function[1354]:0x43e09
@:wasm-function[13380]:0x482ecc
Module._mono_wasm_invoke_method@https://localhost:5001/_framework/dotnet.6.0.0-rc.2.21480.5.bes3pph8mp.js:1:260057
managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS@https://mono-wasm.invalid/managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS:16:40
endInvokeJSFromDotNet@https://localhost:5001/_framework/blazor.webassembly.js:1:40959
beginInvokeJSFromDotNet/<@https://localhost:5001/_framework/blazor.webassembly.js:1:3336
promise callback*beginInvokeJSFromDotNet@https://localhost:5001/_framework/blazor.webassembly.js:1:3323
At@https://localhost:5001/_framework/blazor.webassembly.js:1:58349
_mono_wasm_invoke_js_blazor@https://localhost:5001/_framework/dotnet.6.0.0-rc.2.21480.5.bes3pph8mp.js:1:231385
@:wasm-function[67]:0x0
@:wasm-function[4425]:0x146ed1
@:wasm-function[4131]:0x12cdb5
@:wasm-function[13678]:0x4901a2
@:wasm-function[13482]:0x4865e1
@:wasm-function[5906]:0x1d4f71
@:wasm-function[1354]:0x43e09
@:wasm-function[13380]:0x482ecc
Module._mono_wasm_invoke_method@https://localhost:5001/_framework/dotnet.6.0.0-rc.2.21480.5.bes3pph8mp.js:1:260057

   at Microsoft.JSInterop.WebAssembly.WebAssemblyJSRuntime.InvokeJS(String identifier, String argsJson, JSCallResultType resultType, Int64 targetInstanceId)
   at Microsoft.JSInterop.JSInProcessRuntime.Invoke[Object](String identifier, Int64 targetInstanceId, Object[] args)
   at Microsoft.JSInterop.Implementation.JSInProcessObjectReference.Invoke[Object](String identifier, Object[] args)
   at Microsoft.JSInterop.JSInProcessObjectReferenceExtensions.InvokeVoid(IJSInProcessObjectReference jsObjectReference, String identifier, Object[] args)
   at SkiaSharp.Views.Blazor.Internal.JSModuleInterop.Invoke(String identifier, Object[] args)
   at SkiaSharp.Views.Blazor.Internal.SKHtmlCanvasInterop.PutImageData(IntPtr intPtr, SKSizeI rawSize)
   at SkiaSharp.Views.Blazor.SKCanvasView.OnRenderFrame()
   at SkiaSharp.Views.Blazor.Internal.ActionHelper.Invoke()
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
--- End of stack trace from previous location ---
   at Microsoft.JSInterop.Infrastructure.DotNetDispatcher.InvokeSynchronously(JSRuntime jsRuntime, DotNetInvocationInfo& callInfo, IDotNetObjectReference objectReference, String argsJson)
   at Microsoft.JSInterop.Infrastructure.DotNetDispatcher.Invoke(JSRuntime jsRuntime, DotNetInvocationInfo& invocationInfo, String argsJson)
   at Microsoft.AspNetCore.Components.WebAssembly.Services.DefaultWebAssemblyJSRuntime.InvokeDotNet(String assemblyName, String methodIdentifier, String dotNetObjectId, String argsJson)
    _convert_exception_for_method_call https://localhost:5001/_framework/dotnet.6.0.0-rc.2.21480.5.bes3pph8mp.js:1
    _handle_exception_for_call https://localhost:5001/_framework/dotnet.6.0.0-rc.2.21480.5.bes3pph8mp.js:1
    managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_InvokeDotNet https://mono-wasm.invalid/managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_InvokeDotNet:20
    invokeDotNetFromJS https://localhost:5001/_framework/blazor.webassembly.js:1
    g https://localhost:5001/_framework/blazor.webassembly.js:1
    invokeMethod https://localhost:5001/_framework/blazor.webassembly.js:1
    renderLoopRequest https://localhost:5001/_content/SkiaSharp.Views.Blazor/SKHtmlCanvas.js:101
    requestAnimationFrame https://localhost:5001/_content/SkiaSharp.Views.Blazor/SKHtmlCanvas.js:96
    requestAnimationFrame https://localhost:5001/_content/SkiaSharp.Views.Blazor/SKHtmlCanvas.js:66
    invokeJSFromDotNet https://localhost:5001/_framework/blazor.webassembly.js:1
    At https://localhost:5001/_framework/blazor.webassembly.js:1
    _mono_wasm_invoke_js_blazor https://localhost:5001/_framework/dotnet.6.0.0-rc.2.21480.5.bes3pph8mp.js:1
    _mono_wasm_invoke_method https://localhost:5001/_framework/dotnet.6.0.0-rc.2.21480.5.bes3pph8mp.js:1
    managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_InvokeDotNet https://mono-wasm.invalid/managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_InvokeDotNet:19
    invokeDotNetFromJS https://localhost:5001/_framework/blazor.webassembly.js:1
    g https://localhost:5001/_framework/blazor.webassembly.js:1
    invokeMethod https://localhost:5001/_framework/blazor.webassembly.js:1
    invoke https://localhost:5001/_content/SkiaSharp.Views.Blazor/SizeWatcher.js:39
    observer https://localhost:5001/_content/SkiaSharp.Views.Blazor/SizeWatcher.js:30
    init https://localhost:5001/_content/SkiaSharp.Views.Blazor/SizeWatcher.js:28
    observe https://localhost:5001/_content/SkiaSharp.Views.Blazor/SizeWatcher.js:6
    invokeJSFromDotNet https://localhost:5001/_framework/blazor.webassembly.js:1
    At https://localhost:5001/_framework/blazor.webassembly.js:1
    _mono_wasm_invoke_js_blazor https://localhost:5001/_framework/dotnet.6.0.0-rc.2.21480.5.bes3pph8mp.js:1
    _mono_wasm_invoke_method https://localhost:5001/_framework/dotnet.6.0.0-rc.2.21480.5.bes3pph8mp.js:1
    managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS https://mono-wasm.invalid/managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_EndInvokeJS:16
    endInvokeJSFromDotNet https://localhost:5001/_framework/blazor.webassembly.js:1
    beginInvokeJSFromDotNet https://localhost:5001/_framework/blazor.webassembly.js:1
    promise callback*beginInvokeJSFromDotNet https://localhost:5001/_framework/blazor.webassembly.js:1
    At https://localhost:5001/_framework/blazor.webassembly.js:1
    _mono_wasm_invoke_js_blazor https://localhost:5001/_framework/dotnet.6.0.0-rc.2.21480.5.bes3pph8mp.js:1
    _mono_wasm_invoke_method https://localhost:5001/_framework/dotnet.6.0.0-rc.2.21480.5.bes3pph8mp.js:1
dotnet.6.0.0-rc.2.21480.5.bes3pph8mp.js:1:216314

@guardrex guardrex marked this pull request as draft October 14, 2021 12:25
@guardrex guardrex mentioned this pull request Oct 15, 2021
41 tasks
@guardrex
Copy link
Collaborator Author

guardrex commented Oct 24, 2021

Update: Still breaking here under RC2 and SkiaSharp.Views.Blazor 2.88.0-preview.152 ...

<empty string> blazor.webassembly.js:1:34938
Unhandled Exception: blazor.webassembly.js:1:34938
Microsoft.JSInterop.JSException: blazor.webassembly.js:1:34938
putImageData@https://localhost:5001/_content/SkiaSharp.Views.Blazor/SKHtmlCanvas.js:134:13 blazor.webassembly.js:1:34938
putImageData@https://localhost:5001/_content/SkiaSharp.Views.Blazor/SKHtmlCanvas.js:78:33 blazor.webassembly.js:1:34938
invokeJSFromDotNet@https://localhost:5001/_framework/blazor.webassembly.js:1:3214 blazor.webassembly.js:1:34938
At@https://localhost:5001/_framework/blazor.webassembly.js:1:58811 blazor.webassembly.js:1:34938
_mono_wasm_invoke_js_blazor@https://localhost:5001/_framework/dotnet.6.0.0-rc.2.21480.5.bes3pph8mp.js:1:231385

The repro steps are on the diff in the Use libraries section starting at Line 135:

https://github.com/dotnet/AspNetCore.Docs/pull/23530/files#diff-33e8a6fb08eb824691be5ed70d9df4863e822269ee31d38d7a5085895140e6b6R135

@guardrex guardrex marked this pull request as ready for review October 25, 2021 15:00
@guardrex
Copy link
Collaborator Author

Chatted with Steve offline about this. This is likely caused by a point-in-time problem with RC2. There have been a number of updates/improvements for the RTM SDK, which I'm not on at this point. Let's merge this and then look at it in PU docs review, which should be coming up soon for all of the 6.0 content updates.

@guardrex guardrex merged commit dba052e into main Oct 25, 2021
@guardrex guardrex deleted the guardrex/blazor-native-deps branch October 25, 2021 15:19
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

Successfully merging this pull request may close these issues.

Blazor WASM native dependencies support
1 participant