It means that your Grid repository method doesn't return QueryBuilder, maybe at now you return array/one entity objects with getResult() method inside Repository method.
Example of correct QueryBuilder repository method:
public function createPrivateListQueryBuilder(int $residentId): QueryBuilder{ return $this->createQueryBuilder('a') ->leftJoin('a.user', 'user') ->where('user.id = :id') ->setParameter('id', $residentId);}
Notice that there is no getResult()/
getOneOrNullResult()/getSingleResult().
Appears in versions Sylius 1.0 - 1.3, maybe earlier.