Skip to content

Add retries when initial connection fails #21711

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 13, 2020
Merged

Conversation

pranavkm
Copy link
Contributor

In this particular case, the client failed to connect with Error: WebSocket closed with status code: 1006. The recommendation here is to collect server logs. Unfortunately the linked build is old and deleted, so we no longer have any logs to look at.

Given that the Blazor auth tests appear to continue running just fine and this test works locally, the change I have:

a) Adds some retries in case the browser is unable to establish the SignalR connection
b) Change the connection detection to be more robust than tossing in a delay.

@ghost ghost added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label May 11, 2020
@pranavkm pranavkm marked this pull request as ready for review May 12, 2020 17:25
@pranavkm pranavkm added this to the 5.0.0-preview5 milestone May 12, 2020
@BrennanConroy
Copy link
Member

Idk any details about this. How long does a browser refresh take? Is this just because the server takes some time to get setup? If so, is there a way to wait for the server to be ready before trying to connect?

@pranavkm
Copy link
Contributor Author

Here's the logs that we have

[2020-03-25T23:29:57Z] [Info] https://localhost:50863/_framework/blazor.server.js 0:5359 "[2020-03-25T23:29:57.084Z] Information: Normalizing '_blazor' to 'https://localhost:50863/_blazor'."
[2020-03-25T23:30:02Z] [Info] https://localhost:50863/_framework/blazor.server.js 0:5359 "[2020-03-25T23:29:57.505Z] Information: WebSocket connected to wss://localhost:50863/_blazor?id=wXSTzHmh9YZV4R9olS75zQ."
[2020-03-25T23:30:06Z] [Severe] https://localhost:50863/_framework/blazor.server.js 0:5162 "[2020-03-25T23:30:03.278Z] Error: Connection disconnected with error 'Error: WebSocket closed with status code: 1006 ().'."

It's not entirely clear why this was closed. The server should be running because we wouldn't have attempted to establish a SignalR connection without first getting the pre-rendered content.

@pranavkm pranavkm merged commit 572c6fa into master May 13, 2020
@pranavkm pranavkm deleted the prkrishn/noauth-test branch May 13, 2020 14:59
@pranavkm pranavkm linked an issue May 13, 2020 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test failure: BlazorServerTemplateWorks_NoAuth
2 participants