Open flennic opened 1 day ago
This issue got tagged with author feedback. Anything I can contribute with?
In order for us to investigate this issue, please provide a minimalistic repro project that illustrates the problem.
Hi @flennic. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
Is there an existing issue for this?
Describe the bug
Given a Blazor component with Streaming Rendering enabled, everything works as expected. When data is loaded in the
OnInitializedAsync()
method, each async update and call toStateHasChanged()
works as expected and the list shows one entry being added at the time. Note: I am aware stateStateHasChanged()
does not guarantee an UI update. This is more or less also the example shown during the demo when Blazor 8 was announced.If now the attribute
is added, it breaks the intermediate steps of Streaming Rendering. The last state, with all documents in the list, is shown, but no intermediate updates. When looking at the network tab and the actual HTTP being sent to the client, it can be seen that the updated HTML (like you see that every second more HTML is being sent, the same way as during the Demo of Blazor 8 with
curl
) reaches the browser, so the server part of Streaming Rendering works as expected. But the client is not picking up the intermediate steps, as one would expect.Is this an intended behavior, something I am missing with how authentication works, or actually a bug? As this is server side and were some authentication issue, then I would not expect the server to actually stream the correct data to the browser.
If you need any more information, please let me know.
Expected Behavior
All intermediate state changes during the streaming rendering are also reflected in HTML and visible to the user, but they are not.
Steps To Reproduce
Create a Blazor 8 application with Cookie authentication. There is some more custom authentication stuff ongoing which I do not want to share in public. But none of that should prevent the client from showing the HTML in the HTTP call which is actually being sent to the client, here the web browser.
I left some commented code in the example which I started removing to pin it down to the Authorize attribute.
Exceptions (if any)
No response
.NET Version
8.0.205
Anything else?