You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browsers you attempted to reproduce this bug on (the more the merrier): Brave [Version 1.73.104 Chromium: 131.0.6778.204]
Does the problem persist after removing "assets/node_modules" and trying again? Yes/no: Yes
Actual behavior
Inside of a loop over a collection of documents I am using a nested live view using live_render/3.
Inside of that nested live view I am using assign_async/4 to loop over document pages.
I tested this both with the assign_async and explicitly with start_async using the callbacks.
In both cases only a few elements on the page will be updated in the initial load (always at the tail of the parent document live view). All other nested live views will show what's within <:loading></:loading>. The <:failed/>part is not rendered.
When navigate back and forth eventually all elements will be rendered. I also verified that all async tasks are executed.
Also if the collection rendered in the parent live view is relatively small the error doesn't reproduce.
I reverted back to use everything from my parent live view avoiding the nested live view and everything works as I would expect.
There are no errors in the server console nor in the browser console.
Expected behavior
Nested live views should allow to have async assigns and the rendering should work.
The text was updated successfully, but these errors were encountered:
falti
changed the title
assign_async fails eventually in nested LiveViews
assign_async fails intermittently in nested LiveViews
Jan 3, 2025
You can run this as elixir live_view_issue_3614.exs and visit http://localhost:5001 to see a LV and nested LV next to each other, each one running 1000 async tasks, all completing successfully.
So it would help a lot if you can provide a similar example that shows the failure.
Environment
Actual behavior
Inside of a loop over a collection of documents I am using a nested live view using
live_render/3
.Inside of that nested live view I am using
assign_async/4
to loop over document pages.I tested this both with the
assign_async
and explicitly withstart_async
using the callbacks.In both cases only a few elements on the page will be updated in the initial load (always at the tail of the parent document live view). All other nested live views will show what's within
<:loading></:loading>
. The<:failed/>
part is not rendered.When navigate back and forth eventually all elements will be rendered. I also verified that all async tasks are executed.
Also if the collection rendered in the parent live view is relatively small the error doesn't reproduce.
I reverted back to use everything from my parent live view avoiding the nested live view and everything works as I would expect.
There are no errors in the server console nor in the browser console.
Expected behavior
Nested live views should allow to have async assigns and the rendering should work.
The text was updated successfully, but these errors were encountered: