doc/articles/common-issues-wasm.md
If you're getting the following message in the browser debugger:
[MONO] DllImport unable to load library 'libSkiaSharp'.
Here are a few ways to fix this:
uno-check and that the dotnet workload list shows the wasm-tools workload. If you're using Visual Studio, make sure to restart it if you've installed workloads.dotnet publish, make sure to use the bin\Release\netX.0-browserwasm\publish\wwwroot folder to serve your app. Make sure to visit our publishing docs for more information.When running a webassembly app under WebAssembly with HTTPS the following error may happen:
Mixed Content: The page at 'https://localhost:5002' was loaded over HTTPS, but attempted to
connect to the insecure WebSocket endpoint 'ws://XXXX:59867/rc'. This request has been blocked;
this endpoint must be available over WSS.
In order to fix this issue, you may need to apply the HTTPS fixes mentioned in the server project documentation.
This is a security restriction from the JavaScript fetch API, where the endpoint you're calling needs to provide CORS headers to work properly.
If you control the API, you'll need to use the features from your framework to enable CORS, and if you don't you'll need to ask the maintainers of the endpoint to enable CORS.
To test if CORS is really the issue, you can use CORS Anywhere to proxy the queries.
Failed to generate AOT layoutWhen building for WebAssembly with AOT mode enabled, the following error may appear:
Failed to generate AOT layout (More details are available in diagnostics mode or using the MSBuild /bl switch)
To troubleshoot this error, you can change the text output log level:
Failed to generate AOT layout errorYou can get additional build troubleshooting information here.