vscode-js-debug icon indicating copy to clipboard operation
vscode-js-debug copied to clipboard

Blazor wasm and MS Edge

Open vchirikov opened this issue 6 years ago • 20 comments

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: image

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?

vchirikov avatar Mar 27 '20 14:03 vchirikov

Sometimes I get this image VS code running with administrator rights.

vchirikov avatar Mar 27 '20 14:03 vchirikov

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.

connor4312 avatar Mar 27 '20 16:03 connor4312

Edge works fine, Windows OS Build 18363.720 By the way if I click debug edge will start, but with default url.

vchirikov avatar Mar 28 '20 22:03 vchirikov

Visual studio works fine with edge, but not Visual Studio Code.

vchirikov avatar Mar 30 '20 13:03 vchirikov

If you pass "includeDefaultArgs": false in your launch config, does the problem persist?

connor4312 avatar Mar 30 '20 17:03 connor4312

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
"

vchirikov avatar Mar 30 '20 22:03 vchirikov

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.

vchirikov avatar Apr 10 '20 19:04 vchirikov

I also run into this problem and eventually failed to solve id,so i reinstalled the system and gave up Blazor.

jetjo avatar Jul 07 '20 11:07 jetjo

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...

jetjo avatar Jul 07 '20 11:07 jetjo

Did someone solve this? I have the same thing

oishiimendesu avatar Aug 01 '20 02:08 oishiimendesu

same here

biju-ps avatar Aug 24 '20 09:08 biju-ps

cc @digeff are you seeing reports of this? You guys get more feedback with Blazor.

connor4312 avatar Aug 24 '20 15:08 connor4312

@connor4312 I haven't seen any of these

digeff avatar Aug 25 '20 18:08 digeff

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"
        }

aventus13 avatar Sep 01 '20 22:09 aventus13

Can you collect trace logs using these instructions?

If you're able to, add "trace": true to your launch.json and 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 avatar Sep 02 '20 03:09 connor4312

@connor4312 please see attached vscode-debugadapter-0.json.gz

aventus13 avatar Sep 02 '20 21:09 aventus13

Refs: https://github.com/dotnet/aspnetcore/issues/25519#issuecomment-686002998

connor4312 avatar Sep 02 '20 21:09 connor4312

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 avatar Sep 03 '20 23:09 connor4312

@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.

aventus13 avatar Sep 04 '20 23:09 aventus13

Closing this issue since it's tracked by the one on the aspnetcore repo

connor4312 avatar Mar 02 '21 18:03 connor4312