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

InteractiveAutoRenderMode(prerender:false)) does not use interactive server rendering #54657

Open
1 task done
ihorlazarenko opened this issue Mar 21, 2024 · 6 comments
Open
1 task done
Assignees
Labels
area-blazor Includes: Blazor, Razor Components feature-full-stack-web-ui Full stack web UI with Blazor investigate Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. Needs: Repro Indicates that the team needs a repro project to continue the investigation on this issue
Milestone

Comments

@ihorlazarenko
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When InteractiveAuto render mode is used without prerendering, server rending is not started and Blazor hangs until wasm dlls are loaded.

Expected Behavior

When Blazor webassembly cache is empty server rendering should start no matter whether prerender is enabled or not.

Steps To Reproduce

  1. Create Blazor project with Auto interactive render mode from template(interactive location per component).
  2. Change render mode in Counter.razor to @rendermode @(new InteractiveAutoRenderMode(prerender:false))
  3. build run
  4. Change network latency in browser developer mode to Slow 3G or smth slow and clear Blazor cache dlls
  5. Open Counter page and see that page is empty and Blazor does not use server rendering and only load dlls
    2024-03-21_03-34-42

Exceptions (if any)

No response

.NET Version

8.0.203

Anything else?

No response

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-blazor Includes: Blazor, Razor Components label Mar 21, 2024
@mkArtakMSFT mkArtakMSFT added investigate feature-full-stack-web-ui Full stack web UI with Blazor labels Mar 26, 2024
@mkArtakMSFT mkArtakMSFT added this to the 8.0.x milestone Mar 26, 2024
@chadwickposey
Copy link

chadwickposey commented May 15, 2024

In OP description, they mention "When InteractiveAuto render mode is used without prerendering, server rending is not started and Blazor hangs until wasm dlls are loaded." In our case, Blazor just hangs and never completes the load. It loads all the assemblies, but the page is never rendered. If you refresh the browser, then (because the wasm assemblies are already downloaded maybe?) it renders the page properly. We are using Microsoft.AspNetCore.Components.WebAssembly 8.0.1 on the client side and Microsoft.AspNetCore.Components.WebAssembly.Server 8.0.1 on the server side, and the same directive for the components: InteractiveAutoRenderMode(prerender:false)

@mcse3010
Copy link

Updated both client and server to 8.0.5, and the problem still persists.

@MackinnonBuck
Copy link
Member

@ihorlazarenko and @mcse3010, could you please try using the latest .NET 8 SDK and see if the issue still repros? I attempted to repro this on SDK version 8.0.404, and the app worked as expected (using Blazor Server on the initial page load, even with prerendering disabled and 3G throttling enabled).

@MackinnonBuck MackinnonBuck added the Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. label Nov 20, 2024
@mcse3010
Copy link

This does not appear to be fixed. The reproduction steps are as follows:

  • Create a client+server blazor application
  • Set the start page to something other than /
  • In that page, set the render mode to InteractiveAuto(prerender: false)
  • Start the application using VS 2022 Enterprise in Debug Mode
  • Note that the page appears white at the end of the wasm download and does not forward to the application

if you then reload the page, every time you debug from then on, it will load first try (no white screen) until it is forced to download the WASM assemblies again. -- you can force this by changing the mode to WasmClientOnly and debugging, then changing it back to Auto and debugging -- then it will show the white screen again:

Image
Image

Server nuGet packages:
Image

Client nuGet packages:
Image

Server is set to startup

The page it starts is in the client, not the server

@MackinnonBuck
Copy link
Member

@mcse3010, are you able to provide us with a minimal repro project, hosted on GitHub as a public repository? I'm not experiencing the problem even after following your repro steps.

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

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.

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 feature-full-stack-web-ui Full stack web UI with Blazor investigate Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. Needs: Repro Indicates that the team needs a repro project to continue the investigation on this issue
Projects
Status: 8.0.x
Development

No branches or pull requests

5 participants