Is the issue existing in every file or a few files?
Try to troubleshoot this issue as following:
Make sure the search service application is actively crawling the content, and the files are crawled.
Please check if the following timer jobs is running, then re-run them and check again:
Microsoft SharePoint Foundation Usage Data Import
Microsoft SharePoint ...
Did you set AAM for your web application? If yes, you need to configure content source using the default zone url.
In addition, if you configure Server Name Mappings, remember to do a full crawl for your content source.
There are two articles for your reference:
Configure your environment as official document below.
Then, you could develop SharePoint provider-hosted add-in by Visual Studio(Auto Hosted deprecated).