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

Nothing works in Blazor Web App .NET 8 on the Server side with InteractiveServer render mode #31317

Closed
ericbrunner opened this issue Dec 29, 2023 · 5 comments · Fixed by #31318
Assignees

Comments

@ericbrunner
Copy link

Description

I tried the CircuitHandler to catch connection drops on the server side and I tried all your javascript samples as suggested to catch connection drop issues.

Nothing works in a Blazor Web App .NET in the server part. My root component "/" is set to

@rendermode @(new InteractiveServerRenderMode(prerender:false))

Even the onConnectionUp is never invoked when I add the to my App.razor

<script src="{BLAZOR SCRIPT}" autostart="false"></script>
<script>
  Blazor.start({
    circuit: {
      reconnectionHandler: {
        onConnectionDown: (options, error) => console.error(error),
        onConnectionUp: () => console.log("Up, up, and away!")
      }
    }
  });
</script>

The Circuit Handler's OnConnection* methods are never invoked . Only the .ctor.

Page URL

https://learn.microsoft.com/en-us/aspnet/core/blazor/fundamentals/signalr?view=aspnetcore-8.0&preserve-view=true

Content source URL

https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/blazor/fundamentals/signalr.md

Document ID

d17e4c28-ea82-0dd8-295d-19f6ada147ea

Article author

@guardrex

Copy link
Contributor

🍂🎁 Happy Holidays! ❄️⛄

This issue has been marked for triage on the Blazor Docs GitHub project, and I'll respond as soon as I return from the holiday vacation the second week of January.

We only work on documentation on this repo. If you need product support, close this issue and seek assistance through one or more of the following support channels:

If you think that you found a potential bug in the framework or have product feedback, close this issue and open a new issue for the ASP.NET Core product unit at dotnet/aspnetcore issues. Bug reports require a clear explanation of the problem, usually including a minimal repro project placed on GitHub for the product unit engineers to download and run. If you determine with the product unit that it isn't a bug but merely requires documentation, please re-open this docs issue and place a cross-link to your engineering issue discussion.

For problems or feedback on Visual Studio, close this issue and use the Report a Problem or Suggest a Feature processes from within VS, which open internal issues for the VS product unit. For more information, see Visual Studio Feedback.

For problems with Visual Studio Code, close this issue and ask for support on community support forums. For bug reports and product feedback, open an issue on the microsoft/vscode GitHub repo.

💃🕺🥳 Happy New Year! 🎈🎆🍾🥂🎉 See you in 2024!

@guardrex
Copy link
Collaborator

guardrex commented Dec 29, 2023

UPDATE: See the next few comments below 👇 ... I think I see the problem here.

Hello @ericbrunner ... Please open this for the product unit with a minimal repro project that shows the behavior at ...

https://github.com/dotnet/aspnetcore/issues

Please add ...

cc: @guardrex https://github.com/dotnet/AspNetCore.Docs/issues/31317

... to the bottom of your opening comment so that I can follow along. I might re-open this for doc work depending on what they say.

@github-project-automation github-project-automation bot moved this from Triage to Done in Blazor.Docs Dec 29, 2023
@guardrex
Copy link
Collaborator

... and btw @ericbrunner ... you don't show it, but make sure that you replace the placeholder with the script path ...

{BLAZOR SCRIPT}

... should be ...

_framework/blazor.web.js

... for a BWA app.

@guardrex
Copy link
Collaborator

... when you say "nothing works" ... nothing will work if the Blazor script isn't correctly referenced there.

@guardrex
Copy link
Collaborator

guardrex commented Dec 29, 2023

Actually, I think I'll use this issue to highlight that point in the article. I'll make those lines BOLD so that they stand out well from the text.

@guardrex guardrex reopened this Dec 29, 2023
@github-project-automation github-project-automation bot moved this from Done to Triage in Blazor.Docs Dec 29, 2023
@guardrex guardrex moved this from Triage to In progress in Blazor.Docs Dec 29, 2023
@github-project-automation github-project-automation bot moved this from In progress to Done in Blazor.Docs Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants