(Solved) How to fix error "Uncaught SyntaxError: Unexpected token u" when run web in Chrome

Uncaught SyntaxError: Unexpected token u


This post will help you to fix the error "Uncaught Syntax Error: Unexpected token u" when open the webpage in Chrome. I heard that some developers got headache when debugging this issue.

Solution: Click on Setting icon => More tools => Developer tools (shortcut: F12 or Ctrl + Shift + I)

Click on Resource tab, choose Session Storage in the left panel, click on the web page you are browsing. Now you see the Key, Value columns in the right panel, try to remove them and reload the pages. That's it!


More info: That unclear error from JSON.parse function cannot 'decode' value string to JSON object, you can delete the key or update value to a JSON string.

If Session Storage tab doesn't work, try Local Storage tab.

Happy coding!

Comments