linkref Posted October 31, 2017 Share Posted October 31, 2017 Hi, When I upload an image to a product, i get this error message using chrome. Unexpected token s in JSON at position 2 But using safari i get this one : JSON Parse error: Unexpected identifier "smushing" I can code, but i don't know where to look... Thanks you for your help.. Link to comment Share on other sites More sharing options...
Aurelink_ Posted January 4, 2018 Share Posted January 4, 2018 I've got almost the same problem ! Unexpected token < in JSON at position 0 Anyone ? Link to comment Share on other sites More sharing options...
musicmaster Posted January 4, 2018 Share Posted January 4, 2018 This is basic debugging in Chrome (in other browsers it works quite similar). Press F12. It will open the DevTools in the lower part of your window. Assuming that this is an Ajax error you go to the network tab. When you then upload a file you will see the network operations as urls on rights side. See the image: Now click the url of the image. You will see then a submenu where you should select Response. See the image: When something has gone wrong you will find here an error message. That is what usually results in a JSON or other response error. Link to comment Share on other sites More sharing options...
lifeform Posted July 31, 2018 Share Posted July 31, 2018 (edited) On 10/31/2017 at 7:18 PM, linkref said: Hi, When I upload an image to a product, i get this error message using chrome. Unexpected token s in JSON at position 2 But using safari i get this one : JSON Parse error: Unexpected identifier "smushing" I can code, but i don't know where to look... Thanks you for your help.. hello... sorry... have you solved this problem? and do you used prestaspeed module? Edited July 31, 2018 by lifeform (see edit history) Link to comment Share on other sites More sharing options...
Steve V Posted June 18, 2020 Share Posted June 18, 2020 Here's the issue... The Ajax call returns an error, the error is written as HTML. Therefore the first (or other) character is "<" which is not JSON. In my case, it was an out of memory error. Hope this is more helpful to you. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now