This happens when we forget to add an underscore to use the non-NSE version:
my_filter <- ~ am == 1
mtcars %>% filter(my_filter)
## Error: filter condition does not evaluate to a logical vector.
Now, my_filter contains the actual am object instead of just its name.