Hi!
I took your demo project:
https://github.com/LostBeard/BlazorWebApp10
- I added
WasmEnableThreads = true
- I added
app.Use(async (context, next) =>
{
context.Response.Headers.Append("Cross-Origin-Embedder-Policy", "require-corp");
context.Response.Headers.Append("Cross-Origin-Opener-Policy", "same-origin");
await next();
});
- I removed
inspectUri from lanchSettings.json
When I run the application Shared Worker's console shows me
VM8:6 MONO_WASM: Assert failed: SharedArrayBuffer is not enabled on this page. Please use a modern browser and set Cross-Origin-Opener-Policy and Cross-Origin-Embedder-Policy http headers. See also https://aka.ms/dotnet-wasm-features Error: Assert failed: SharedArrayBuffer is not enabled on this page. Please use a modern browser and set Cross-Origin-Opener-Policy and Cross-Origin-Embedder-Policy http headers. See also https://aka.ms/dotnet-wasm-features
Seems, headers are not working for the Shared Worker. Do I need to do anything special to make it work?
Upd: Also, I see an issue for a main thread:
SpawnDev.BlazorJS.lib.module.js:453 Callback invokeMethod error:
['Invoke']
null Error: Cannot call synchronous C# methods.
at Dn (managed-exports.ts:308:23)
at Object.<anonymous> (invoke-cs.ts:327:17)
at Object.invokeDotNetFromJS (blazor.web.b9228eflpl.js:1:169260)
at b.invokeDotNetMethod (blazor.web.b9228eflpl.js:1:4857)
at I.invokeMethod (blazor.web.b9228eflpl.js:1:7025)
at fn (SpawnDev.BlazorJS.lib.module.js:450:64)
Hi!
I took your demo project:
https://github.com/LostBeard/BlazorWebApp10
WasmEnableThreads = trueinspectUrifromlanchSettings.jsonWhen I run the application Shared Worker's console shows me
VM8:6 MONO_WASM: Assert failed: SharedArrayBuffer is not enabled on this page. Please use a modern browser and set Cross-Origin-Opener-Policy and Cross-Origin-Embedder-Policy http headers. See also https://aka.ms/dotnet-wasm-features Error: Assert failed: SharedArrayBuffer is not enabled on this page. Please use a modern browser and set Cross-Origin-Opener-Policy and Cross-Origin-Embedder-Policy http headers. See also https://aka.ms/dotnet-wasm-featuresSeems, headers are not working for the Shared Worker. Do I need to do anything special to make it work?
Upd: Also, I see an issue for a main thread: