Why get_posts() returns empty array while I am trying to get posts from some specific taxonomies and work properly with others?

After several hours of debugging I have found what caused the problem. Custom taxonomy ‘cadassist_category’ is used for 2 custom post types: product_document and cadassist_file. The posts for taxanomy with ID 653 were of cadassis_file type. And I tried to get posts of product_document type. That is why I got empty array.

So if you have similar problem then maybe your custom taxonomy is used for several post types and you just query for a wrong post type.