Skip to content

Unhandled exception when duplicating a tab or when pressing back button in chrome #24626

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

Closed
FrancisValade opened this issue Aug 6, 2020 · 6 comments
Labels
affected-most This issue impacts most of the customers area-blazor Includes: Blazor, Razor Components bug This issue describes a behavior which is not expected - a bug. ✔️ Resolution: Duplicate Resolved as a duplicate of another issue investigate severity-major This label is used by an internal tool Status: Resolved
Milestone

Comments

@FrancisValade
Copy link

FrancisValade commented Aug 6, 2020

Describe the bug

When I debug a Blazor server-side application in Visual Studio 2019, there is an error when I try to duplicate a tab in chrome and sometime when I press the back button.

To Reproduce

Clone the following repo: https://github.com/FrancisValade/IssueDuplicateTab. Open the solution with visual studio 2019 (It's a normal server side blazor project with two files added : TestLayout.razor and TestComponent.razor, the Counter page is using the TestLayout file as a layout). Run the app in debug with IIS Express in Google Chrome. Navigate to the counter page by using the menu and try to duplicate the tab. There should be an unhandled exception in the new tab. If there's no exception, close Visual Studio, reopen the project and try to run it again.

Exceptions (if any)

In the chrome console:
blazor.server.js:15 [2020-08-06T17:58:58.567Z] Error: The list of component records is not valid

Uncaught (in promise) Error: Invocation canceled due to the underlying connection being closed.
at e.connectionClosed (blazor.server.js:1)
at e.connection.onclose (blazor.server.js:1)
at e.stopConnection (blazor.server.js:1)
at e.transport.onclose (blazor.server.js:1)
at e.close (blazor.server.js:1)
at e.stop (blazor.server.js:1)
at e. (blazor.server.js:1)
at blazor.server.js:1
at Object.next (blazor.server.js:1)
at a (blazor.server.js:1)

Further technical details

  • ASP.NET Core version 3.1
  • Visual Studio version 16.5.0 and 16.6.5
@javiercn javiercn added the area-blazor Includes: Blazor, Razor Components label Aug 7, 2020
@FrancisValade
Copy link
Author

The error doesn't seem do appear the first time the app run. To make the bug appear, I added a new Blazor project in the solution, tried to run it one time and then then I deleted it. I also opened the Startup file and some other files from the project in Visual Studio. Eventually the bug appeared and once it appears, it will reappear every time the app run.

@pranavkm
Copy link
Contributor

@FrancisValade we think this might be because the browser is caching some state. You could try applying no-cache meta tags \ headers to the _Host.cshtml file (or any other file that's hosting your blazor component):

<meta http-equiv="Cache-Control" content="no-store" />

@FrancisValade
Copy link
Author

@FrancisValade we think this might be because the browser is caching some state. You could try applying no-cache meta tags \ headers to the _Host.cshtml file (or any other file that's hosting your blazor component):

<meta http-equiv="Cache-Control" content="no-store" />

Hi, I tried to add the no-cache meta tag in the _Host.cshtml file but the problem is still there.

@pranavkm pranavkm added this to the Next sprint planning milestone Aug 11, 2020
@ghost
Copy link

ghost commented Aug 11, 2020

Thanks for contacting us.
We're moving this issue to the Next sprint planning milestone for future evaluation / consideration. We will evaluate the request when we are planning the work for the next milestone. To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@SteveSandersonMS SteveSandersonMS added affected-most This issue impacts most of the customers bug This issue describes a behavior which is not expected - a bug. severity-major This label is used by an internal tool labels Oct 7, 2020 — with ASP.NET Core Issue Ranking
@ghost
Copy link

ghost commented Oct 9, 2020

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.

@mkArtakMSFT
Copy link
Contributor

Closing this as a dupe of #26474

@mkArtakMSFT mkArtakMSFT added the ✔️ Resolution: Duplicate Resolved as a duplicate of another issue label Oct 9, 2020
@ghost ghost added the Status: Resolved label Oct 9, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Nov 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affected-most This issue impacts most of the customers area-blazor Includes: Blazor, Razor Components bug This issue describes a behavior which is not expected - a bug. ✔️ Resolution: Duplicate Resolved as a duplicate of another issue investigate severity-major This label is used by an internal tool Status: Resolved
Projects
None yet
Development

No branches or pull requests

5 participants