Skip to content

Conversation

@ilonatommy
Copy link
Member

@ilonatommy ilonatommy commented Apr 6, 2024

  • Hosted blazor app was moved to common project where we connect: aspenetcore server, blazor client, wasmbrowser client, shared lib.
  • All the test logic was moved out of clients to the lib and is same for both clients, no UI interactions.
  • WBT logic was unified for both clients and moved to a base class. Test for Blazor stays in Blazor dir, test for WASM app should be probably relocated from AspNetCore, not sure where?

@ilonatommy ilonatommy added arch-wasm WebAssembly architecture area-VM-threading-mono os-browser Browser variant of arch-wasm labels Apr 6, 2024
@ilonatommy ilonatommy self-assigned this Apr 6, 2024
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

@ilonatommy ilonatommy requested a review from pavelsavara April 9, 2024 16:15
@ilonatommy ilonatommy marked this pull request as ready for review April 9, 2024 16:17
@ilonatommy ilonatommy requested a review from maraf as a code owner April 9, 2024 16:17
Copy link
Member

@maraf maraf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should have a separate test app where single aspnetcore server will be hosting both blazor and wasmbrowser client.

One of the ideas I want to maintain for these test apps is that you can run them without WBT (we are not there quite yet, for example the one we have doesn't have any UI, but I want to head there).

@ilonatommy
Copy link
Member Author

ilonatommy commented Apr 10, 2024

Before I start separating the logic into another app - any ideas why we have integrity errors even though the WASM files are not edited between publish and serving? Last run did not have it and there was no change in server's setup between the commits

Failed to find a valid digest in the 'integrity' attribute for resource 'http://localhost:5000/_framework/System.Security.Cryptography.dll' with computed SHA-256 integrity '47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU='. The resource has been blocked.

log

@maraf
Copy link
Member

maraf commented Apr 10, 2024

Before I start separating the logic into another app - any ideas why we have integrity errors even though the WASM files are not edited between publish and serving? Last run did not have it and there was no change in server's setup between the commits

Failed to find a valid digest in the 'integrity' attribute for resource 'http://localhost:5000/_framework/System.Security.Cryptography.dll' with computed SHA-256 integrity '47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU='. The resource has been blocked.

log

Why is it downloading .dll instead of .wasm? Is webcil disabled?

@ilonatommy
Copy link
Member Author

Why is it downloading .dll instead of .wasm? Is webcil disabled?

yes, it's Workloads-NoWebcil-Wasm.Build.Tests.TestAppScenarios.SignalRClientTests

@ilonatommy ilonatommy requested review from maraf and pavelsavara April 10, 2024 10:55
@maraf
Copy link
Member

maraf commented Apr 11, 2024

Before I start separating the logic into another app - any ideas why we have integrity errors even though the WASM files are not edited between publish and serving? Last run did not have it and there was no change in server's setup between the commits

Failed to find a valid digest in the 'integrity' attribute for resource 'http://localhost:5000/_framework/System.Security.Cryptography.dll' with computed SHA-256 integrity '47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU='. The resource has been blocked.

log

Looking into binlog from the wasm app publish, the integrity visible in binlog is different from what the browser got. Suggesting a stale boot config was loaded, but I dunno how that could happened

image

@ilonatommy ilonatommy requested a review from maraf April 12, 2024 14:45
Copy link
Member

@maraf maraf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@ilonatommy
Copy link
Member Author

ilonatommy commented Apr 18, 2024

ST works. MT fails with (both blazorclient and wasmclient):

MONO_WASM: Error in bindings_init Can't find method System.Runtime.InteropServices.JavaScript.JavaScriptExports.BindAssemblyExports

MONO_WASM: start_runtime() failed Can't find method System.Runtime.InteropServices.JavaScript.JavaScriptExports.BindAssemblyExports

Debugging the problem, from some reason WasmEnableThreads is false in start_runtime - blazor.config.json does not have the worker. Binlog has it set to true.

Edit:
It might be my local problem. When I copy the project to a different location (out of runtime repo), running dotnet-latest works - blazor.config.json is correct. Blazor flow works. WASM app reaches the point where it subscribes to server's messages and there it freezes, I'm investigating it.

@ilonatommy ilonatommy merged commit 66ce263 into dotnet:main Apr 22, 2024
matouskozak pushed a commit to matouskozak/runtime that referenced this pull request Apr 30, 2024
* WIP, fixing net::ERR_CONNECTION_REFUSED.

* Change of setup - aspnet project serving WASM static files.

* Enable SharedArrayBuffer.

* WIP, investigating `JsonSerializerIsReflectionDisabled`

* Fix serialization issue.

* Fixed

* Cleanup.

* Trying to fix integrity check issue.

* Async interop + more logging.

* Move test preparation code to a method.

* Remove buttons, match other TestAppScenarios style.

* Moved the test out of TestAppScenarios. Standalone version works.

* Working version of test.

* Cleanup.

* Cleanup.

* @maraf's feedback - simplify the prebuild steps.

* WIP - merging blazor and wasmapp into one proj.

* Missing change in a non-related test.

* Do not pack blazor into a subfolder.

* Remove old app.

* Connect test logic, simplify.

* Not intentional.

* AspServer serves only "standard content types"

* Prevent loosing `InnerException` on exceptions thrown during `TaskCompletionSource` completion.

* Revert.

* Cleanup.

* @maraf's cleanup

* SignalR hub is located in a url with path.

* Fix "GET http://localhost:5000/wasmclient, Response status code: 404"
@github-actions github-actions bot locked and limited conversation to collaborators May 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-wasm WebAssembly architecture area-VM-threading-mono os-browser Browser variant of arch-wasm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants