Skip to content
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

[Blazor WebApp] RenderMode InteractiveAuto and Could not reconnect to the server message #53120

Closed
1 task done
mohaaron opened this issue Jan 3, 2024 · 7 comments
Closed
1 task done
Labels
area-blazor Includes: Blazor, Razor Components Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. Status: No Recent Activity

Comments

@mohaaron
Copy link

mohaaron commented Jan 3, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I am using the new Blazor WebApp template using render mode InteractiveAuto globally and am getting the SignalR reconnect message even when I'm showing that the components are running in WASM. Was I wrong to think that once the render mode changed from Server to WASM that the server reconnect would not happen anymore? I was hoping that using the new WebApp template would help with the server reconnection issues.

There is some discussion here regarding how to test for the current render mode. Is the code below not a good test?

protected override void OnInitialized()
{
    if (OperatingSystem.IsBrowser())
    {
        currentRenderMode = "WASM";
    }
    else
    {
        currentRenderMode = "Server";
    }
}

image

Expected Behavior

Once the render mode has automatically changed to WASM there would no longer be reconnection required due to the SignalR connection not being needed.

Steps To Reproduce

Let a running WebApp sit idle until the reconnection message appears.

Exceptions (if any)

No response

.NET Version

8.0.100

Anything else?

No response

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-blazor Includes: Blazor, Razor Components label Jan 3, 2024
@mohaaron
Copy link
Author

mohaaron commented Jan 4, 2024

I wonder, does this have something to do with the OIDC authentication that's happening on the server side of the app and is somehow keeping a SignalR connection open?

image

@MackinnonBuck MackinnonBuck added the Needs: Repro Indicates that the team needs a repro project to continue the investigation on this issue label Jan 13, 2024
@ghost
Copy link

ghost commented Jan 13, 2024

Thank you for filing this issue. In order for us to investigate this issue, please provide a minimal repro project that illustrates the problem without unnecessary code. Please share with us in a public GitHub repo because we cannot open ZIP attachments, and don't include any confidential content.

@ghost ghost added the Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. label Jan 13, 2024
@mohaaron
Copy link
Author

I have the Github repo here that I've been using to understand how authorization works in the new WebApp template, but it's not having the same SignalR reconnect issue as my other project which I have pictured here. The project having this problem is not something I can share. Does anyone have some idea why the WebApp template would have this issue? It feels to me like maybe the authorization or something is hanging on to the SignalR connection and it's preventing 100% of the functionality from moving over to using the WASM components.

@ghost ghost added Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. and removed Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. labels Jan 16, 2024
@dotnet-policy-service dotnet-policy-service bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Feb 6, 2024
@wtgodbe wtgodbe removed the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Feb 6, 2024
@dotnet-policy-service dotnet-policy-service bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Feb 6, 2024
@MackinnonBuck
Copy link
Member

Thanks for reaching out. We have some auto mode improvements coming in .NET 8.0.200, but until then, could you please try the applying the fix manually as described in this comment and see if it resolves your issue?

@MackinnonBuck MackinnonBuck added Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. and removed Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. Needs: Repro Indicates that the team needs a repro project to continue the investigation on this issue labels Feb 8, 2024
@wtgodbe wtgodbe removed the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Feb 13, 2024
@dotnet dotnet deleted a comment from dotnet-policy-service bot Feb 13, 2024
@dotnet dotnet deleted a comment from dotnet-policy-service bot Feb 13, 2024
@mohaaron
Copy link
Author

Thanks for reaching out. We have some auto mode improvements coming in .NET 8.0.200, but until then, could you please try the applying the fix manually as described in this comment and see if it resolves your issue?

Hi Buck, I appreciate your response. I will check into what you have suggested and response here with the results.

Thank you

@dotnet-policy-service dotnet-policy-service bot added Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. and removed Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. labels Feb 15, 2024
@javiercn javiercn added Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. and removed Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. labels Feb 19, 2024
Copy link
Contributor

Hi @mohaaron. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

Copy link
Contributor

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

See our Issue Management Policies for more information.

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 Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. Status: No Recent Activity
Projects
None yet
Development

No branches or pull requests

4 participants