Environment issues in my AEM development instance
We are using AEM 6.5.7 and there are couple of issues coming up in my development server.
- Issue 1: When we try to edit and apply the changes in any component. We receive the "Forbidden Error".
- Issue 2: When we publish any AEM page, we are seeing an error "ERROR Failed to retrieve references for the selected page" on top of the page.
Issue 1:

Issue 2:

When we debugged for both these issues, the root cause seems to be same and we received an error in the browser console at granite.min.js:7
Please find the below code snippet corresponding to it.

Kindly let us know any resolution for this problem.
We are unsure about the root cause behind this problem.
Thanks