• We just changed hosting and suddenly shoppers can no longer finish the checkout page. It shows this message on the notification area: “SyntaxError: Unexpected token E in JSON at position 0”. Upon inspecting console, there’s a “Unable to fix malformed JSON” at checkout.min.js?ver=3.0.8:1. We also found out that the orders actually go through and the credit cards are charged, but we don’t understand why the error is showing up. Please help! Any assistance is greatly appreciated!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Mike Jolley

    (@mikejolley)

    Do this and find the full error message being returned https://mikejolley.com/2015/11/12/debugging-unexpected-token-in-woocommerce-2-4/

    Hi,

    we’re having the exact same problem since running the woocommerce update last night.

    The orders also go through and the credit cards are charged, but the download does not appear in the customers account.

    I get the following client side errors:

    Unable to fix malformed JSON
    checkout.min.js:1 Uncaught TypeError: Cannot read property ‘reload’ of null
    at Object.success (checkout.min.js:1)
    at i (jquery.js:2)
    at Object.fireWith [as resolveWith] (jquery.js:2)
    at y (jquery.js:4)
    at XMLHttpRequest.c (jquery.js:4)

    and when i look at the json response (/checkout/?wc-ajax=checkout) it is blank, even though i do get some response headers.

    I’d be very grateful for any assistance..

    thanks,

    Max

    Also receiving this error. Strange part, I can get the purchase to go through all the way to the “completed order” page if I’m logged in as admin. No guests or customer accounts make it to that page though. Customers are charged correctly though on their credit card.

    Unable to fix malformed JSON
    checkout.min.js?ver=3.1.0:1 Uncaught TypeError: Cannot read property ‘reload’ of null
    at Object.success (checkout.min.js?ver=3.1.0:1)
    at i (jquery.js?ver=1.11.0:2)
    at Object.fireWith [as resolveWith] (jquery.js?ver=1.11.0:2)
    at y (jquery.js?ver=1.11.0:4)
    at XMLHttpRequest.c (jquery.js?ver=1.11.0:4)

    Hello,

    Here are the full error messages:

    screenshot

    Error code: 4401 Error message: Unable to populate data, please check if mandatory value is entered correctly.

    I tried updating to WooCommerce 3.1 and the only difference is that the error in the console is now:
    Unable to fix malformed JSON checkout.min.js?ver=3.1.0:1

    Note that registered users can checkout with no problems. The problem only affects guest checkout.

    We have the almost the same issue as @fleckebk

    The purchase to go through all the way to the “completed order” page if I’m logged in as admin. No guests can make it to that page though. They still get charged and the order comes in, but they see the SyntaxError

    I’m seeing the same problem as @madmaxau. I’m using WooCommerce 3.1.2 on an up-to-date WordPress 4.8.1 site. The AJAX request to “/checkout/?wc-ajax=checkout” is made and has a “Status Code” of “200 OK”. The Response Headers are there and look OK, but the “Content-Length” is 0 and the Response is empty.

    Changing the theme from Avada to “Twenty Seventeen” didn’t help. I am working through disabling plugins to see if I can find a “smoking gun” but nothing yet.

    I resolved this problem by deactivating the “WP Voting Contest” v3.3.9 plugin. No fix from the developer as of yet.

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

The topic ‘Cannot Checkout: SyntaxError: Unexpected token E in JSON at position 0’ is closed to new replies.