Blazor wasm and MS Edge
Hi, I came here from https://devblogs.microsoft.com/aspnet/blazor-webassembly-3-2-0-preview-3-release-now-available/
And seems like pwa-msedge doesn't work.
I have latest MS Edge installed ( Version 80.0.361.69 (Official build) (64-bit) ) "debug.javascript.usePreview": true and this is my launch.json:
{
"name": ".NET Core Debug Blazor Web Assembly in Edge",
"type": "pwa-msedge",
"request": "launch",
"timeout": 30000,
"url": "https://localhost:5001",
"webRoot": "${workspaceFolder}/Server",
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}"
}
When I trying to start debug I see this error:

Unable to launch browser: "Failed to launch browser!
[0327/171300.005:ERROR:file_io.cc(89)] ReadExactly: expected 120, observed 40
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
Can you help me find out what's wrong?
Sometimes I get this
VS code running with administrator rights.
This looks like an issue with Edge on your machine. There's a MSDN question that suggests making sure you're on a recent Windows version.
Edge works fine, Windows OS Build 18363.720 By the way if I click debug edge will start, but with default url.
Visual studio works fine with edge, but not Visual Studio Code.
If you pass "includeDefaultArgs": false in your launch config, does the problem persist?
With includeDefaultArgs result is same as on image 2.
Unable to launch browser: "Failed to launch browser!
[30228:26532:0331/012700.808:ERROR:cache_util_win.cc(21)] Unable to move the cache: Access is denied. (0x5)
[30228:26532:0331/012700.809:ERROR:cache_util.cc(135)] Unable to move cache folder C:\Temp\.profile\ShaderCache\GPUCache to C:\Temp\.profile\ShaderCache\old_GPUCache_000
[30228:26532:0331/012700.809:ERROR:disk_cache.cc(184)] Unable to create cache
[30228:26532:0331/012700.809:ERROR:shader_disk_cache.cc(606)] Shader Cache Creation failed: -2
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
"
I'm using vs code with admin rights and this conflicts with a terrible Edge feature called de-elevate.
--do-not-de-elevate did the trick, but anyway I'm seeing annoying message about admin rights.
Strange that in VS 2019 with admin rights too I didn't do anything and it worked fine.
I also run into this problem and eventually failed to solve id,so i reinstalled the system and gave up Blazor.
I was going to develop a BIM model interaction page with Blazor WebAssembly, but i had to use Three.js, the JS interaction syntax and scheme of Blazor is disgusting! i debug with chrome...
Did someone solve this? I have the same thing
same here
cc @digeff are you seeing reports of this? You guys get more feedback with Blazor.
@connor4312 I haven't seen any of these
I'm getting the same error when trying to launch a Blazor WebAssembly app either with Chrome or Edge. It works fine in Visual Studio 2019 but not in VS Code. I have updated to latest VS Code (including extensions), Chrome and .Net Core SDK. My launch configs:
Chrome
{
"type": "blazorwasm",
"name": "Launch and Debug Blazor WebAssembly Application",
"request": "launch",
"browser": "chrome",
"url": "http://localhost:5001"
}
Edge
{
"type": "blazorwasm",
"name": "Launch and Debug Blazor WebAssembly Application",
"request": "launch",
"browser": "edge",
"url": "http://localhost:5001"
}
Can you collect trace logs using these instructions?
If you're able to, add
"trace": trueto yourlaunch.jsonand reproduce the issue. The location of the log file on your disk will be written to the Debug Console. Share that with us.⚠️ This log file will not contain source code, but will contain file paths. You can drop it into https://microsoft.github.io/vscode-pwa-analyzer/index.html to see what it contains. If you'd rather not share the log publicly, you can email it to [email protected]
@connor4312 please see attached vscode-debugadapter-0.json.gz
Refs: https://github.com/dotnet/aspnetcore/issues/25519#issuecomment-686002998
If you experience this issue, can you see if it reproduces on VS Code Insiders? We suspect it might be coming from Electron, and our Insiders builds are updated +2 major versions of Electron from where stable is.
Also, are you launching as admin?
@connor4312 Using VS Code Insiders didn't make any difference unfortunately. I tried running in elevated mode too. What's weird is that sometimes it actually works, i.e. the UI launches in the browser. It will typically work for 3 or 4 launches and then keep crashing all the time.
Closing this issue since it's tracked by the one on the aspnetcore repo