-2

enter image description here

CloudError: Endpoint (`observeMySession`) responded with an error (or the request failed).

I need to fix this error this is my browser console error and those come while I;m trying to log in to the new sails project after the sails lift command

js console browser - account-notification-banner.component.js:55 Uncaught (in promise) CloudError: Endpoint (`observeMySession`) responded with an error (or the request failed).
    at Object.exec (http://localhost:1337/dependencies/cloud.js:649:33)
    at http://localhost:1337/dependencies/cloud.js:612:26
    at new Promise (<anonymous>)
    at Object.toPromise (http://localhost:1337/dependencies/cloud.js:610:24)
    at Object.then (http://localhost:1337/dependencies/cloud.js:592:36)

Error Summary:
(see `.responseInfo` for more details)
·-------------·----------------------------------------·
|    Protocol | ws(s)://   (io.socket)
|     Address | POST http://localhost:1337/api/v1/observe-my-session
|        Exit | error
| Status Code | 403
·-------------·----------------------------------------·

Response Body:
Forbidden
  • It's generally not recommended to upload images in questions. Read this for more info: https://stackoverflow.com/help/how-to-ask – Alexxino Aug 11 '23 at 14:15
  • Please provide enough code so others can better understand or reproduce the problem. – Community Aug 11 '23 at 14:15

1 Answers1

0

I am facing the same.

It looks like _csrf is not being sent back from Sails core into window.SAILS_LOCALS, so

I recommend you set false csrf attribute into config/security.js file - for a while.

I mean - for a while - due to security issues around lack of CSRF control.