• Our customer’s orders are being canceled from Vipps and after talking to Vipps support team they responded with the below message.

    We see the error “responded ServiceUnavailable with null” in our logs being generated from the webshop when users share their address from Vipps which means no shipping alternatives are returned. This is most likely related to the configuration with the Shipping module or web server not responding as needed.

    Any help will be really appriciated.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author Iver Odin Kvello

    (@iverok)

    It may be that your shipping callback URL is being blocked by a web firewall; or it may be that your shipping calculation causes an error or isn’t able to produce shipping alternatives .

    In your WordPress instance, you should go to Woocommerce/Status/logs and check the logs woo-vipps and fatal-errors for the given points in time. If there is an error, it should be listed there.

    Next, you need to check your server logs for calls of the type

    POST /wc-api/vipps_shipping_details/...

    If these do not appear, or gets 403 answers, then your firewall is blocking calls to the shipping callback API. You will need to ensure that the firewall does not block calls to this (or really, anything of the /wc-api/ space, because that’s the WooCommerce API prefix).

    If you can, you may try to use the “Static shipping” feature in the Vipps settings. You can use this if the price of shipping does not depend on the address of the customer; so for instance if you use fixed price shipping or the price only depends on the goods. If you use this, the callback isn’t used. You may however experience the same problem with the payment callback, so you should still check your firewall settings.

    Thread Starter hasamulhaan48

    (@hasamulhaan48)

    Thank you so much for this quick response.

    Should I contact my hosting provider to look into this problem if the callback is being blocked by a web firewall?

    Regards,
    Hasam

    Plugin Author Iver Odin Kvello

    (@iverok)

    Yes, if not blocked by any installed wordpress-plugin firewall.

    You can check the logs first, by going either to Vipps Checkout or Vipps Express checkout and then change your address. Each time you do, there should be a callback of the form mentioned above in your server logs.

    Thread Starter hasamulhaan48

    (@hasamulhaan48)

    I am in touch with my server support team and this is what they replied.

    ” I’ve checked our access logs for the last week and I don’t see any “POST /wc-api/vipps_shipping_details/” requests in there.

    There are a few 403 errors from our mod_security wall but most of them are for malicious python scripts that shouldn’t be whitelisted. I’m currently looking into all of the 403 errors. “

    Thread Starter hasamulhaan48

    (@hasamulhaan48)

    Here is now another reply from them:


    I was actually able to find requests that include “POST /wc-api/vipps_shipping_details/” in them. They returned 503 errors instead of 403 errors. I’ve increased the memory limit of the site from 384MB to 512MB per request, reset the files permissions and cleared the cache. I’d suggest testing the payment gateway now to see if it still returns any 503 errors.

    Plugin Author Iver Odin Kvello

    (@iverok)

    If no calls to /wc-api/vipps_shipping_details come thru, then that is what is causing the error.

    I *have* seen modsec block calls like this on a different payment gateway, though not this one, because these type of calls kind of look like they are doing session fixation. You may need to make exceptions for the URL.

    You should also check that the Vipps servers aren’t blocked entirely.

    You may also want to check for /wc-api/wc_gateway_vipps/ which are the payment callback – these should also be coming through, one per transaction. If they don’t, payment results will still normally be fetched using polls, but to be sure you definitely want the payment callbacks too.

    You *can* avoid the shipping callbacks if you can use static shipping – which is also faster.

    Plugin Author Iver Odin Kvello

    (@iverok)

    OK! 503 errors are better, sort of: That means your site crashes when trying to calculate shipping. It would be surprising if memory was the issue; but you should be able to find something either in the fatal-errors log of your Woo site or in the system error logs.

    Thread Starter hasamulhaan48

    (@hasamulhaan48)

    Can you please guide me how to use and setup static shipping?

    Plugin Author Iver Odin Kvello

    (@iverok)

    Sure, just go to WooCommerce/Settings/Payment/Vipps/ and either Express Checkout or Vipps Checkout depending on where the problem is. Or both. Then check the box for “Static shipping” and save.

    When using this, it will use your stores base address to calculate shipping, before the user is sent to the payment screen. The shipping will not be recalculated based on the customers address, so it will be quite a bit faster – but shipping methods that needs to use the customers address cannot be used.

    Thread Starter hasamulhaan48

    (@hasamulhaan48)

    Perfect Thanks you.

    By the way, I have got error logs from the server support team please if you can take a look.

    Regards,
    Hasam

    Plugin Author Iver Odin Kvello

    (@iverok)

    I’ve downloaded the logs; you should probably delete these now since there might be stuff in there you don’t want public.

    Thread Starter hasamulhaan48

    (@hasamulhaan48)

    Thanks.

    I also want to know if I use static shipping does it reflect on the shipping classes or zones as well?

    We have Norway as our shipping zone and Bring Fraktguiden is our Shipping method we have a total of 6 Shipping Classes.
    Bring Fraktguiden is a shipping method using Bring.com to calculate rates.

    Is this issue occurring due to this Bring Fraktguiden plugin?

    Plugin Author Iver Odin Kvello

    (@iverok)

    The errors are not in the error file provided; which probably means they may be errors on the HTTP level (apache, nginx, etc). You will need to check those logs too, for instance for these times:

    [05/Sep/2023:14:02:45 +0100] "POST /wc-api/vipps_shipping_details/?tk=9...
    [05/Sep/2023:14:02:46 +0100] "POST /wc-api/vipps_shipping_details/?tk=...
    [05/Sep/2023:14:02:47 +0100] "POST /wc-api/vipps_shipping_details/?tk=...
    [05/Sep/2023:14:02:49 +0100] "POST /wc-api/vipps_shipping_details/?tk=...

    You should also check the WooCommerce fatal-errors mentioned above because it may have captured the error before it was logged to the system logs.

    Thread Starter hasamulhaan48

    (@hasamulhaan48)

    This is a recent log file from woocommerce logs:
    —————————————————–

    woo-vipps-2023-09-05-31c023afd7d5f736b535ebf17a800d59.log?

    2023-09-05T05:21:51+00:00 DEBUG Initiating Vipps session for woofrsrvrdn1286522
    2023-09-05T05:28:43+00:00 INFO #!trpst#trp-gettext data-trpgettextoriginal=1006969#!trpen#The transaction text is too long! We are using a shorter transaction text to allow the transaction text to go through, but please check the 'woo_vipps_transaction_text_shop_id' filter so that you can use a shorter name for your store#!trpst#/trp-gettext#!trpen#
    2023-09-05T05:28:43+00:00 DEBUG Initiating Vipps session for woofrsrvrdn1286615
    2023-09-05T05:28:48+00:00 ERROR #!trpst#trp-gettext data-trpgettextoriginal=5703#!trpen#Could not initiate Vipps payment#!trpst#/trp-gettext#!trpen# 500 cURL error 28: Operation timed out after 5001 milliseconds with 0 out of -1 bytes received
    2023-09-05T06:53:38+00:00 DEBUG Initiating Vipps session for woofrsrvrdn1287520
    2023-09-05T07:13:25+00:00 INFO Feil under henting av kundedata i Vipps fraktdetaljer-callback: Syntax error
    2023-09-05T07:13:25+00:00 INFO Dataene som ble sendt var
    2023-09-05T07:13:25+00:00 INFO 
    2023-09-05T07:13:25+00:00 INFO Fant ingen fraktmetoder for Vipps Hurtigkasse - ordren vil mislykkes
    2023-09-05T08:10:57+00:00 DEBUG Initiating Vipps session for woofrsrvrdn1288040
    2023-09-05T08:20:03+00:00 DEBUG Initiating Vipps session for woofrsrvrdn1288213
    2023-09-05T08:22:04+00:00 DEBUG Initiating Vipps session for woofrsrvrdn1288295
    2023-09-05T08:22:37+00:00 DEBUG Initiating Vipps session for woofrsrvrdn1288296
    2023-09-05T08:22:58+00:00 INFO Receipt for order 1288296 sent to Vipps 
    2023-09-05T08:36:33+00:00 DEBUG Initiating Vipps session for woofrsrvrdn1288298
    2023-09-05T11:00:55+00:00 DEBUG Initiating Vipps session for woofrsrvrdn1289027
    2023-09-05T11:02:58+00:00 DEBUG Initiating Vipps session for woofrsrvrdn1289108
    2023-09-05T12:50:40+00:00 DEBUG Initiating Vipps session for woofrsrvrdn1289653
    2023-09-05T12:51:06+00:00 DEBUG Initiating Vipps session for woofrsrvrdn1289654
    2023-09-05T13:02:35+00:00 DEBUG Initiating Vipps session for woofrsrvrdn1289655
    2023-09-05T14:20:31+00:00 DEBUG Initiating Vipps session for woofrsrvrdn1289656
    2023-09-05T14:35:15+00:00 DEBUG Initiating Vipps session for woofrsrvrdn1289657
    Thread Starter hasamulhaan48

    (@hasamulhaan48)

    Via this URL you can access the Stack Trace .txt file. I believe you should able to view it without downloading it: https://frisorverden.no/stack_trace.txt

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Need help with vipps plugin – error “responded ServiceUnavailable with null”’ is closed to new replies.