Skip to content

[blazor][debugger] Fixing vs-js-debugger: redirect ws to http is not supported anymore#39995

Merged
TanayParikh merged 2 commits intodotnet:mainfrom
thaystg:thays_fix_vs_js_debugger_websocket
Feb 4, 2022
Merged

[blazor][debugger] Fixing vs-js-debugger: redirect ws to http is not supported anymore#39995
TanayParikh merged 2 commits intodotnet:mainfrom
thaystg:thays_fix_vs_js_debugger_websocket

Conversation

@thaystg
Copy link
Member

@thaystg thaystg commented Feb 4, 2022

After microsoft/vscode-js-debug update the ws package to use version "8.4.2" as you can see here:
https://github.com/microsoft/vscode-js-debug/blob/2dfdba1f6f6e4f264d2beb90c80fa7cc4d4396dc/package.json#L78

This new check was added in ws library:
https://github.com/websockets/ws/blob/35d45c2a4fead953654ae7bcf029cdf6d2590121/lib/websocket.js#L682

So as we were trying to redirect ws://localhost:[PORTNUMBER]/_framework/debug/ws-proxy?browser={browserInspectUri} to http://localhost:[BROWSERDEBUGPROXYPORT]/{browserInspectUri} we were getting this new error:
The URL's protocol must be one of "ws:", "wss:", or "ws+unix:"

Then the browser was being launched correctly but it never loads the Blazor App Page.

With this fix it works in the current version of the vscode-js-debug and also in the nightly build.

Fixes: microsoft/vscode-js-debug#1190
Related: #38413
Fixes: #39976

@thaystg thaystg requested review from TanayParikh and lewing February 4, 2022 20:33
@thaystg thaystg requested a review from a team as a code owner February 4, 2022 20:33
@ghost ghost added the area-blazor Includes: Blazor, Razor Components label Feb 4, 2022
Co-authored-by: Pranav K <prkrishn@hotmail.com>
@thaystg
Copy link
Member Author

thaystg commented Feb 4, 2022

/backport to release/6.0

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2022

Started backporting to release/6.0: https://github.com/dotnet/aspnetcore/actions/runs/1797169484

Copy link
Contributor

@TanayParikh TanayParikh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thanks! Should we consider this for patching for 6.0.3xx? Edit: nevermind, I see you're ahead of it 😄

@TanayParikh TanayParikh enabled auto-merge (squash) February 4, 2022 21:25
@TanayParikh
Copy link
Contributor

fyi/ @mkArtakMSFT for potential servicing consideration via #39996. I've added the issue to the servicing project.

@thaystg thaystg changed the title [blazor][debugger] Fixing vs-js-debugger nightly build [blazor][debugger] Fixing vs-js-debugger: redirect ws to http is not supported anymore Feb 4, 2022
@ChristianWeyer
Copy link

What will be the delivery vehicle for this patch? SDK update?

@pranavkm
Copy link
Contributor

pranavkm commented Feb 4, 2022

This is a runtime change, consequently it would appear as part of a 6.0 patch release.

@TanayParikh TanayParikh merged commit b56f553 into dotnet:main Feb 4, 2022
@ghost ghost added this to the 7.0-preview2 milestone Feb 4, 2022
@TanayParikh
Copy link
Contributor

This is a runtime change, consequently it would appear as part of a 6.0 patch release.

For those who may be following along, this issue is resolved via microsoft/vscode-js-debug#1195 (and thus no longer required to get into the 6.0 patch release).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-blazor Includes: Blazor, Razor Components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Debugging with VSCode on Linux: Cannot launch browser, debugging not possible Debug Blazor using Edge on Ubuntu

4 participants