• Resolved blizo

    (@blizo)


    Hi this plugin gives an error at the checkout since updating to version 3.0.5. Here’s the error in the Chrome dev console –

    Uncaught InvalidClientTokenError: The client token is invalid. Make sure it has not been tampered with in any way.
    at new t (api.js:1:12730)
    at api.js:1:107857
    at Object.init (api.js:1:105662)
    at Object.initKlarnaCredit (klarna-payments.js?ver=3.0.5:351:20)
    at HTMLInputElement. (klarna-payments.js?ver=3.0.5:123:22)
    at HTMLBodyElement.dispatch ((index):27:43064)
    at v.handle ((index):27:41048)
    t @ api.js:1
    (anonymous) @ api.js:1
    (anonymous) @ api.js:1
    initKlarnaCredit @ klarna-payments.js?ver=3.0.5:351
    (anonymous) @ klarna-payments.js?ver=3.0.5:123
    dispatch @ (index):27
    v.handle @ (index):27

    When I refresh the checkout the error is fixed and doesn’t happen again.

    This only happens for first time visitors. I can only replicate it in incognito mode. The error happens when selecting the Klarna payment method.

    Any ideas how to fix?

    I’ve rolled back to an older version of the plugin until fixed.

    Thanks

    • This topic was modified 2 years ago by blizo.
    • This topic was modified 2 years ago by blizo.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Andreas – Krokedil

    (@boozebrorsan)

    Hi,

    Is there any server-side caching you try and empty?

    Is there any error messages in the KP logs?

    Please do NOT share any logs here as those should not be shared in public. Reach out to us at [email protected] so we can examine the logs and see if we can see anything special.

    Plugin Support Andreas – Krokedil

    (@boozebrorsan)

    @blizo Can you try and update to version 3.0.6 of Klarna Payments plugin and see if that solves your problem as there is a fix for this in that version. Let us know if you still have a problem after updating.

    Thread Starter blizo

    (@blizo)

    Hi @boozebrorsan I updated to version 3.0.6. and it now does the same error but only if there’s invalid fields. To replicate:

    • Add item to cart
    • Go to checkout
    • Add normal billing details
      • Use phone number: 5587
    • Click “Place order”
    • Klarna pop up shows this message “There has been an error with your address.. Please check fields: Phone number” (screenshot: https://i.ibb.co/rkY5r3D/pne.jpg)
    • Enter a valid phone number
    • Click “Place Order”
    • Woo error message “Checkout error”
    • Refresh checkout and this dev console error message shows “caught InvalidClientTokenError: The client token is invalid. Make sure it has not been tampered with in any way.”

    When I try replicating this on the old plugin this Woo error message shows before the Klarna popup

    Bad value: shipping_address.phone, billing_address.phone

    And when I enter a valid phone number the Klarna checkout works.

    • This reply was modified 1 year, 11 months ago by blizo.
    • This reply was modified 1 year, 11 months ago by blizo.
    • This reply was modified 1 year, 11 months ago by blizo.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Uncaught InvalidClientTokenError: The client token is invalid.’ is closed to new replies.