So as the comments state this error is most likely caused by incorrect access rules configuration.
However, in 8.17 I had this error when I had the ‘Close Page’ activity in a microflow.
Removing the close page activity fixed the issue for me. Putting this answer here for reference.
This might help someone. It was access rules in my case, because I was trying to download a FileDocument directly. As (I think) access rules can't be added to FileDocument, I needed to use an inherited entity instead.
Please use inherited/generalized entity from FileDocument.
Please accept the Answere, it helps:)