Are you using the System.FileDocument entity? I've run into this issue before and, in my case, it's because I was using the System.FileDocument entity to create the document and so I was trying to download the System.FileDocument. Creating a new entity (i.e. MyModule.ReportToDownload) as a generalization of the System.FileDocument and using this new entity for the report worked in my case.
See this documentation for more information about setting up generalizations in your model.
Matt