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

Reload the browser when the circuit ID is unknown #9256

Closed
rynowak opened this issue Apr 10, 2019 · 18 comments
Closed

Reload the browser when the circuit ID is unknown #9256

rynowak opened this issue Apr 10, 2019 · 18 comments
Labels
affected-most This issue impacts most of the customers area-blazor Includes: Blazor, Razor Components enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-blazor-server feature-circuit-lifecycle Issues to do with blazor server lifecycle events Pillar: Complete Blazor Web Priority:2 Work that is important, but not critical for the release severity-major This label is used by an internal tool
Milestone

Comments

@rynowak
Copy link
Member

rynowak commented Apr 10, 2019

If I launch a components app with dotnet watch run - the reconnection feature doesn't ever seem to do its thing.

image

I can retry, and it will successfully connect (see console output) - but it never updates the UI.

My guess is that this happens because the circuit is gone - it's a new process after all. We should see if we can improve this for inner loopness, and figure out a better experience by default for the case where the circuit is gone.

@rynowak rynowak added area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates area-blazor Includes: Blazor, Razor Components labels Apr 10, 2019
@rynowak
Copy link
Member Author

rynowak commented Apr 10, 2019

@javiercn in case he has cool thoughts

@javiercn
Copy link
Member

Yeah, my guess is the same as yours. The only option at that point is to F5 the app. We should inform the client that the circuit is gone and provide some button on the UI to refresh the page as at that point the app is gone.

@javiercn
Copy link
Member

I think this not only applies to developer inner loop. In the future we might want to free up resources in case the app is idle for a while, at that point there should be some integration so that developers can take that into account and provide a good experience.

For example, something like

The application has been inactive for too long so we have ended your current session. 
Click here to refresh the application.

@danroth27 danroth27 changed the title Reconnect doesn't seem to work with dotnet watch Reload the browser when the circuit ID is unknown Apr 12, 2019
@danroth27
Copy link
Member

We discussed this and we think it would help that if the circuit ID is unknown we reload the page.

@danroth27 danroth27 added this to the Backlog milestone Apr 12, 2019
@mkArtakMSFT mkArtakMSFT removed area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates labels May 9, 2019
@mkArtakMSFT mkArtakMSFT added the enhancement This issue represents an ask for new feature or an enhancement to an existing one label Jan 10, 2020
@pranavkm pranavkm added the help wanted Up for grabs. We would accept a PR to help resolve this issue label Jul 6, 2020
@gingters
Copy link

I think that behavior should be configurable. In development mode a reload is fine and most likely expected.

In production, there could be a lot of issues (i.e. server node accidentally or gracefully restarted) and that might involve trying to persist some sort of session state when the server gracefully shuts down and trying to restore that state when a new circuit starts.

Also, the user might want to be informed when he should expect an application reload and possibly loss of data.

@uabarahona
Copy link
Contributor

What I found:

dotnet watch reconnection

This works:

  1. Create a new blazor server app
  2. Run it with dotnet watch run
  3. Change some files
  4. The restart and reconnection of the server works fine

Restart the server manually

1.- Manually restart the server by killing the process and then dotnet watch run again
2.- Old pages will try to reconnect until they notice the server is no longer the same and will display the following:
image

So, unless I am missing something, this is already working, right?

@captainsafia
Copy link
Member

@barahonajmc Thanks for testing it out! Can you confirm what version you validated this on?

@uabarahona
Copy link
Contributor

uabarahona commented Oct 8, 2020

@captainsafia oh I forget that, it was on .NET 5 RC1

@SteveSandersonMS SteveSandersonMS added affected-most This issue impacts most of the customers severity-major This label is used by an internal tool labels Oct 14, 2020 — with ASP.NET Core Issue Ranking
@BieleckiLtd
Copy link

Here is how the user experience looks in my case.

User loads page, works with the app, perhaps fills the form halfway through. They go for a snack and when they come back they see that their work is gone as the only thing they can do is to refresh the browser. Great for the banking app, but my users complain.

Disabling idle timeout would help but app pool can still recycle at any time unless this is also disabled. Corporate IT is not happy to change any of the application pool settings anyway. Similarly with my hobby stuff - online hosting providers are saying to go and buy VPS if I need such customization.

tl;dr
I know this is a long shot but are there any plans to improve user experience with blazor after the application restart? Maybe persist user session state in the browser?

@javiercn javiercn added feature-blazor-server feature-circuit-lifecycle Issues to do with blazor server lifecycle events labels Apr 19, 2021
@konradbartecki
Copy link

konradbartecki commented Apr 28, 2021

I actually implemented the exact scenario where this is configurable with default of reload page on circuit rejected
See: #32122

@pranavkm pranavkm modified the milestones: Backlog, .NET 7 Planning Oct 19, 2021
@pranavkm pranavkm added the Priority:1 Work that is critical for the release, but we could probably ship without label Oct 28, 2021
@mkArtakMSFT mkArtakMSFT added triaged Priority:2 Work that is important, but not critical for the release and removed Priority:1 Work that is critical for the release, but we could probably ship without labels Nov 5, 2021
@ghost
Copy link

ghost commented Jun 29, 2023

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@ghost
Copy link

ghost commented Dec 20, 2023

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@danroth27
Copy link
Member

danroth27 commented Mar 20, 2024

We're planning to address this as part of #9256 #32113

@aryehsilver
Copy link

We're planning to address this as part of #9256

Which is this issue but has now been closed?!?

@danroth27
Copy link
Member

Dah! Sorry! The correct tracking issue is #32113.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affected-most This issue impacts most of the customers area-blazor Includes: Blazor, Razor Components enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-blazor-server feature-circuit-lifecycle Issues to do with blazor server lifecycle events Pillar: Complete Blazor Web Priority:2 Work that is important, but not critical for the release severity-major This label is used by an internal tool
Projects
None yet
Development

No branches or pull requests