Skip to content
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

[Problem/Bug]: Request to WASM file is not resolved to virtual host sometimes #4838

Open
tomysaw opened this issue Sep 28, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@tomysaw
Copy link

tomysaw commented Sep 28, 2024

What happened?

Configuration: I'm developing a WinUI3 application running a WebView2 to open pspdfkit viewer. For that, I create a virtual host mapping to a directory where the library files are located

var folder = Path.GetDirectoryName(indexPagePath);
var index = Path.GetFileName(indexPagePath);

webView.CoreWebView2.SetVirtualHostNameToFolderMapping(host, folder, CoreWebView2HostResourceAccessKind.Allow);
webView.CoreWebView2.Navigate($"http://{host}/{index}?{query}");

The host value is app-beta.ourdomain.com

Problem: Recently we've started experiencing a weird issue. Upon library initialization it sends a lot of requests to source files. Two of those are *.wasm and *.wasm.js and they fail with 404. In the dev tools I see that it actually gets resolved to a real IP address of our host instead of being mapped to the local folder.

image

Which makes it even more weird is that if I click "Edit and Resend" the request works just fine.

Regression: It used to work fine when we were releasing the app. The issues was first noticed last week. Gradually it affected most of our users. Can it be a windows update?

Importance

Important. My app's user experience is significantly compromised.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

129.0.2792.65

SDK Version

1.0.2210.55

Framework

WinUI3/WinAppSDK

Operating System

Windows 11

OS Version

22631.4169

Repro steps

Explained in "What happened". Let me know how I can assist

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

Don't know

Last working version (if regression)

No response

@tomysaw tomysaw added the bug Something isn't working label Sep 28, 2024
@momo-AUX1
Copy link

Same issue here, did you try maybe intercepting the request if it has ".wasm" or ".wasm.js", read the file itself and return the stream via a new web response?

@khmyznikov
Copy link

I see other folks from Win App Community face same issue: https://discord.com/channels/372137812037730304/630451531984011274/1299000463374553121

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants