Vaadin Lazily loaded grid shows same 50 rows in loop

Description

Bug Description:

In a grid component utilizing a backend data provider to load data in a paginated manner based on user scrolling, we are experiencing an issue for certain users where rows repeat during scrolling. For affected users, the same 50 rows are rendered repeatedly. However, clicking on any row to display details shows the correct data.

This issue is inconsistent and cannot be reproduced in the local environment. From the browser console, we observe that new data is fetched in batches of 50 rows, but the DOM is not refreshed accordingly.

Additionally, in the Vaadin console, the following error is logged:

Error: This ChildPart has no parentNode and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit’s control such that the part’s marker nodes were ejected from the DOM. For example, setting the element’s innerHTML or textContent can cause this.

The root cause seems to be a failure in DOM updates during data fetch operations.

Expected outcome

  1. No errors should appear in console after the fix
  2. Display of grid should be fixed

Minimal reproducible example

Its just a normal grid with backend dataproivder

Steps to reproduce

Inconsistent so not easily reproduceable

Environment

Vaadin version(s): 24.4
OS: windows

Browsers

No response

Is equals and hashCode implemented properly for the classes used in the Grid?

yes, equals and hashcode are implemented properly and uses only id property which is unique always.
This does not seems to be coming from wrong equals and hashcode because in that case rows appears duplicate one after another.However in this case same 50 rows are appearing again and again for some users.
There is no erorr in backend logs but we are seeing errors in browser console only.

Also if user then opens the page in a icognito window then data get properly updated in grids

Can someone from vaadin team please check this and give some hints to sort this out.

Can you share the code you use for creating the grid to help us figure out what might be going on?