Closed arnvanhoutte closed 9 months ago
Can you please post your Blazor WASM project's index.html file? That error is related to the parsing of your index.html file and if I can examine it I can come up with a solution faster. Thank you!
After doing some testing I am willing to bet that you have an empty src attribute in a script tag <script src="" ... >
in your index.html. I will add a catch so it doesn't crash the web worker in such an event. If that isn't the case your index.html would still help.
As the exception caused by an empty script tag src attribute is a bug, I have fixed and updated the repo, and the Nuget packages. Version 2.2.4 has that particular fix. Please let me know if it resolves your issue.
The issue wasn't an empty script tag but an async script tag. It seems to be fixed in v2.2.4. Thanks for the quick help
Thank you for reporting the issue.
I'm trying to implement the webworkers in .NET 8 but I'm getting the following error in
spawndev.blazorjs.webworkers.js:119:47
The specific line where this error occurs is
let scriptSrc = /src="(.+?)"/.exec(scriptTagBody)[1];
The browser I'm testing this is in Firefox on Windows 11. The error occurs when running
await workerService.GetWebWorker()
in Blazor WASM