The hook_file_transfer function in xmlsitemap module (line 2223) expects parameter one to be a Response object.
It seems that the module file_entity invokes this hook and it passes following arguments:
\Drupal::moduleHandler()->invokeAll('file_transfer', array($file->getFileUri(), $headers));
So this generates a fatal error... I looked into the code of xmlsitemap_file_transfer and all it does is adding header to the response object... what is the use of this function, I don't think this is needed. If so it has to be done in "hook_file_download_headers_alter" though.