• Resolved warrenw

    (@warrenw)


    I have seen numerous topics concerning this unexpected token error, but none seem to fit my scenario. What seems different about this (to me) is that it is only affecting 1 user. I, as well as others, are able to go to the site, add an item to the cart, and checkout successfully. However, this specific user keeps getting the response “SyntaxError: Unexpected token < in JSON at position 0”. If this user visits [checkout/?wc-ajax=checkout], they receive a correct response: {"result":"failure","messages":"<ul class=\"woocommerce-error\">\n\t\t\t<li>We were unable to process your order, please try again.<\/li>\n\t<\/ul>\n","refresh":true,"reload":false}.

    What can I do to resolve this? I do not believe it to be a plugin error as orders are processed appropriately for all other users. I have debug logging enabled and nothing interesting is appearing in the log…

    • This topic was modified 8 years, 5 months ago by warrenw. Reason: Code formatting
    • This topic was modified 8 years, 5 months ago by warrenw.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Hannah S.L.

    (@fernashes)

    Automattic Happiness Engineer

    If it’s just the one user, then it sounds like there may be some sort of caching in play, or something specific on their end.

    If they try a different browser, do they still see the same issue?

    Thread Starter warrenw

    (@warrenw)

    I am thinking its a client error also, but its the ‘something specific’ I am trying to discover. I’ll have the user try another browser and see what happens.

    Plugin Support Hannah S.L.

    (@fernashes)

    Automattic Happiness Engineer

    @warrenw how did it go with another browser?

    Thread Starter warrenw

    (@warrenw)

    To be honest, I haven’t been able to get back with the end-user for further testing. At the time I had posted the question, we had already manually created the order so finding an answer to this was more or less just to give me some ammunition should this occur again. I’m leaving this open so that once I can get some further information, I can update.

    Plugin Support Hannah S.L.

    (@fernashes)

    Automattic Happiness Engineer

    Thanks for letting us know!

    To improve the quality of the forums and the support, I’m going to mark this as resolved. You’re welcome to create a new thread if this does come up again – that new thread will show on the main page instead of being buried like this thread now is.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Debug unexpected token’ is closed to new replies.