While adding app to subsite (through Site Contents > Add an app), we are getting a message "We're adding your app, Click to cancel" for few seconds and then throws an error as mentioned in Title.
We compared the ULS logs with working environment and found that everything is same except the below lines.
SharePoint Foundation Claims Authentication amge4 Verbose SPFederationAuthenticationModule.IsRedirectToLogOnPage: This is a 302 redirect to <subsite URL>/_layouts/15/viewlsts.aspx#newest SharePoint Foundation Claims Authentication amge7 Medium SPFederationAuthenticationModule.IsRedirectToLogOnPage: Detected a redirection but the redirect is not to a known signin page: <subsite URL>/_layouts/15/viewlsts.aspx#newest
We have checked and ensured that all required services and service applications are up and running. Appreciate any suggestions to resolve this issue.