-
Notifications
You must be signed in to change notification settings - Fork 10k
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
[blazor][wasm] load .js and .wasm assets by runtime #43049
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
The issue is I didn't dig deeper yet. |
Repros locally. Is there a way to run one of the E2E tests by hand in a browser to debug the JavaScript? (ie without Selenium) |
@lambdageek Yes. Start up the You may have to visit something like https://localhost:5003/subdir once the testserver is running - can't remember the URL exactly. The browser might open with it automatically. It does a weird thing where the port number changes each time you start it. |
return undefined; | ||
}; | ||
|
||
const runtimeAssets = resourceLoader.bootConfig.resources.runtimeAssets; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the problem for the E2E tests:
resourceLoader.bootConfig.resources
doesn't have a runtimeAssets
key. It has a runtime
key, is that what we want?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it needs to be in sync with
according to the comment in
aspnetcore/src/Components/Web.JS/src/Platform/BootConfig.ts
Lines 46 to 47 in 7b5da42
// Keep in sync with bootJsonData from the BlazorWebAssemblySDK | |
export interface BootJsonData { |
and indeed that defines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lambdageek no, there was a change in the SDK (last week I think) to add this additional key.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah runtimeAssets are there too.
https://github.com/dotnet/sdk/blob/4547cf714749f732b53a5c70edd269a33e75bd28/src/BlazorWasmSdk/Tasks/BootJsonData.cs#L106
Maybe we just need to merge this PR with main
to get an SDK bump?
Or maybe the E2E tests are using the sdk from <gitroot>/.dotnet
and that one is older?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merging main
wasn't enough. we probably need the SDK update PR #43028.
I'm verifying locally...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what the next steps are here. I think we still want this for net7 rc1. But it's unclear to me if the sdk bump PR is going into that branch /cc @lewing |
replaced by #45628 |
Hi @pavelsavara. It looks like you just commented on a closed PR. The team will most probably miss it. If you'd like to bring something important up to their attention, consider filing a new issue and add enough details to build context. |
config.assets
to pass URL ofdotnet.wasm
anddotnet-crypto-worker.js
downloadResource
callback to runtime which bridges the runtime to useWebAssemblyResourceLoader
for loading assetsinstantiateWasm
WebAssemblyResourceLoader
to return absolute URLs. For debugger purposes.setModuleImports
instead ofIMPORTS