I got “Sorry Something Went wrong” error message when adding custom web part in SharePoint 2013 site and also found “User Agent not available, file operations may not be optimized” error message in SharePoint log files.
Resolution:
I have restarted IIS and the issue got fixed.