I was recently creating a custom admin mass action controller for a UI component listing. The controller was throwing an exception when it was setting the filter on the collection. It turned out I had two things setup incorrectly because the custom table I was using for this mass action has a primary key id name that is different than “id”. I needed to define the “$_idFieldName” in my ResourceModel Collection. See the StackExchange post for more information. I also needed to make sure the UI component datasource was configured correctly. The “primaryFieldName” configuration needs to be “main_table.<idfieldname>” and not “main_table.id”.
StackExchange post about filtering on a mass action and the “$_idFieldName” is not set.