Description
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