entityQuery with multiple conditions on taxonomy terms returns no result In my use-case I have an entity which has two fields that reference to unique vocabularies. 

News:
 - tag (entity reference)
 - category (entity reference)

If I query on one of those reference I get results however when I query both (an AND filter) I get no results. I have triple-checked it by now and there are entities that contain both the tag and category I am querying.

Is this an user-error or a Drupal bug?

$query = \Drupal::entityQuery('node')
    -&gt;condition('status', 1)
    -&gt;condition('type', 'news')
;
$group = $query-&gt;andConditionGroup()
    -&gt;condition('field_tag.entity.name', ['cars'], 'IN')
    -&gt;condition('field_category.entity.name', ['sport'], 'IN')
;
$query-&gt;condition($group);
$nids = $query-&gt;execute();


EDIT:
I have found a work-around by querying on the raw value instead of entity.value. This is a non-desirable situation though

$query = \Drupal::entityQuery('node')
    -&gt;condition('status', 1)
    -&gt;condition('type', 'news')
;
$group = $query-&gt;andConditionGroup()
    -&gt;condition('field_tag.entity.name', ['cars'], 'IN')
    -&gt;condition('field_category', [1], 'IN')
;
$query-&gt;condition($group);
$nids = $query-&gt;execute();
The reason you can't do that is that both of these fields are entity reference to the same entity. That means that the base table is the same base table.
You are asking Drupal to Join the taxonomy_data table to the node table and then make an impossible AND condition on it.
P.S.
You can use condition('field_tags', 1); instead of condition('field_tags', [1], 'IN');
And as mentioned in the comments, the AND condition group is the default, so you don't need to specify it.
P.P.S.
You should have both conditions use the referenced id to be consistent.