FieldCondition in an EntityQuery for media is causing a website error
There's no fieldCondition method, condition works for all fields:

$query = \Drupal::entityQuery('media')
  -&gt;condition('status', 1)
  -&gt;condition('field_flagged', 1);
$result = $query-&gt;execute();