[blazor][debugger] Fixing vs-js-debugger: redirect ws to http is not supported anymore#39995
Merged
TanayParikh merged 2 commits intodotnet:mainfrom Feb 4, 2022
Merged
Conversation
pranavkm
reviewed
Feb 4, 2022
Co-authored-by: Pranav K <prkrishn@hotmail.com>
pranavkm
approved these changes
Feb 4, 2022
Member
Author
|
/backport to release/6.0 |
Contributor
|
Started backporting to release/6.0: https://github.com/dotnet/aspnetcore/actions/runs/1797169484 |
11 tasks
TanayParikh
approved these changes
Feb 4, 2022
Contributor
|
fyi/ @mkArtakMSFT for potential servicing consideration via #39996. I've added the issue to the servicing project. |
|
What will be the delivery vehicle for this patch? SDK update? |
Contributor
|
This is a runtime change, consequently it would appear as part of a 6.0 patch release. |
Contributor
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). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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}tohttp://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