MicrosoftEdge / MicrosoftEdge/WebView2Feedback
[Problem/Bug]: Request to WASM file is not resolved to virtual host sometimes
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
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.
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the WebView2 virtual host mapping and navigation described in the report, then trace the failing .wasm and .wasm.js requests in the developer tools. Compare the initial requests with the successful Edit and Resend behavior; done means both requests consistently resolve to the mapped local folder instead of the real host IP.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, wasm
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100