0

Hi

I am at lesson 28. when I press the place order button i get error message “Invalid Token”. Which is coming from utils.js in the backend folder. I checked someone had similar issue and a suggestion was to check utils.js. I have no mistake in utils.js but still getting message. I am stuck at this point for almost 1 week. could some body help ?

in the inspect i get below error

  1. Request URL:http://localhost:5000/api/orders
  2. Request Method:POST
  3. Status Code:401 Unauthorized
  4. Remote Address:[::1]:5000
  5. Referrer Policy:strict-origin-when-cross-origin
A Raja Posted new comment November 6, 2022

hi
just an update I have managed to get rid of this problem by changing some settings in the backend utils.js. Now system creates an order in the backend. Only one issue remains, I am getting error where system is unable to read the “data.order._id” in the PlaceOrder.js. I raised a new question regarding it.