You try to upload pictures or attachments to a custom SharePoint list while you're working with a SharePoint app in Visual Studio. However, you receive the following error message:
Sorry, there was a problem with Announcement
For support, please contact the developer.
An unexpected error has occurred.
Additionally, in a SharePoint 2013 on-premises environment, the following error is logged in the Unified Logging System (ULS) log:
Application error when access /_layouts/15/Upload.aspx, Error=Object reference not set to an instance of an object.