• Resolved Matthew Dixon

    (@matthewdixon)


    Hi guys, me again!

    I’ve had clients get in touch yesterday regarding more out of sync products (they’re currently checking levels after every purchase as have lost faith in the plugin’s reliability – I don’t blame them). I checked the logs and there are 3 404 not found errors referencing the products, here’s the first one:

    2022-01-20T12:11:56+00:00 DEBUG Added 1 jobs to the queue
    2022-01-20T12:11:56+00:00 DEBUG Added 1 jobs to the queue
    2022-01-20T12:11:56+00:00 INFO ZettleRestException: ENTITY_NOT_FOUND
    Got status 404 when sending GET request to https://products.izettle.com/organizations/self/products/61e968e2-0000-1000-8000-0011fbcb34c2
    PRODUCT_V2 with UUID 61e968e2-0000-1000-8000-0011fbcb34c2 not found
     Violations: []
     Thrown in /public_html/wp-content/plugins/zettle-pos-integration/modules/zettle-php-sdk/src/Psr18RestClient.php:184
     With data: {"developerMessage":"PRODUCT_V2 with UUID 61e968e2-0000-1000-8000-0011fbcb34c2 not found","errorType":"ENTITY_NOT_FOUND","violations":[]}
     and payload: []
    2022-01-20T12:11:56+00:00 INFO Product with Id:6685 and Uuid:61e968e2-0000-1000-8000-0011fbcb34c2 was successfully created at PayPal Zettle Backoffice.
    2022-01-20T12:11:56+00:00 INFO Enabled inventory tracking for WC product 6685 with UUID 61e968e2-0000-1000-8000-0011fbcb34c2
    2022-01-20T12:11:56+00:00 DEBUG Executed Job 'set-inventory-tracking' with ID 0.
    2022-01-20T12:11:56+00:00 INFO Attempting to sync inventory of WC_Product_Simple 6685 with PayPal Zettle UUID 61e968e2-0000-1000-8000-0011fbcb34c2
    2022-01-20T12:11:57+00:00 INFO Moved 12 items from SUPPLIER to STORE
    2022-01-20T12:11:57+00:00 DEBUG Executed Job 'sync-product-stock' with ID 0.
    2022-01-20T12:11:57+00:00 DEBUG Executed Job 'sync-product' with ID 12933.
    2022-01-20T12:11:57+00:00 DEBUG Removed 1 jobs from the queue
    2022-01-20T12:11:57+00:00 DEBUG Executed Job 'sync-product' with ID 12934.
    2022-01-20T12:11:57+00:00 DEBUG Removed 1 jobs from the queue
    2022-01-20T12:11:57+00:00 INFO Received Webhook: ProductCreated

    The levels were wrong in WooCommerce so I updated to bring in line with Zettle levels, manually changing on either platform updated the other as expected. Can you see anything your end suggesting why these 404s would have occurred when the products exist and seem to be syncing fine?

    Kind regards,
    Matthew

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Syde Joost

    (@joostvandevijver)

    Hello @matthewdixon

    thank you for reaching out to us, we are here to help.

    The 404 error can be caused by many things so, there is not a single reason I can give you for this to occur. The UUID that is mentioned in the error report is the ID that is used to link the Zettle product with the WooCommerce product and is stored in a relational matrix on the WordPress site.

    I have checked the notifications for this site and see some time-out notifications for the product with UUID 64f0e1fa-9ba4-11eb-a084-3347a5462f41, but not for the one you have mentioned. This time-out could cause a sync discrepancy, but not for other products.

    As I informed you before, the cause of such problems can possibly be traced back to a plugin conflict, but most of the time is caused by security/firewall settings that block the plugins webhooks to the WP site.

    We cannot guarantee that our plugin works in every webserver and WordPress site, there are just too many factors at play to cover all.

    Kind regards,
    Joost

    Thread Starter Matthew Dixon

    (@matthewdixon)

    Hi @joostvandevijver, thanks for getting back to me. If you could address the following points one by one I’d appreciate it:

    1. How can I use the UUID you’ve provided, 64f0e1fa-9ba4-11eb-a084-3347a5462f41, to track down the product in WooCommerce? I’ve found a reference to it in the database but can’t see what WordPress ID it’s linked to..

    2. As the website wasn’t able to find the product in Zettle it sounds like a timeout at Zettle’s end is the most likely cause here. I appreciate uptime will never be 100% but a) 3 in one day is very worrying and b) your plugin should have functionality in place to compensate for these discrepancies, especially if they’re a common occurrence.

    3. I appreciate there are many factors at play when it comes to hosting a site but when there are potential communication issues caused by things like firewalls you (or Zettle) need to provide details on how to whitelist their services so developers can make sure their sites operate smoothly. If the guys at Shopify can get everything talking reliably then we should be able to too. We’ve already been through potential conflicts on the site, there are no plugins causing problems and the last thing that might be blocking webhooks (which I highly doubt is the issue anyway) is Cloudflare – this is where whitelisting comes in but you’ve never been able to provide any useful info to help with this. If IPs can’t be used there must be some other whitelisting option, maybe Zettle themselves could help here?

    Kind regards,
    Matthew

    Thread Starter Matthew Dixon

    (@matthewdixon)

    @joostvandevijver as an example for #3, I see from looking at the plugin there are lots of references to subdomains on izettle.com, eg. https://products.izettle.com, https://image.izettle.com etc in zettle-pos-integration/modules/zettle-php-sdk/services.php.

    Are these domains where requests come from when purchases are made in Zettle? If so could whitelisting all requests from those domains help, eg. if (http.host contains "zettle.com") or (http.host contains "izettle.com") then always allow the request?

    Thread Starter Matthew Dixon

    (@matthewdixon)

    @joostvandevijver I’ve been tinkering and may have made some progress – in Cloudflare I’ve set a rule to allow any requests trying to hit a URI path including wp-json/zettle, which you guys use. With this set I’m now seeing multiple events being allowed from various IPs! I can see the paths of some requests are /wp-json/zettle/v1/webhook/listen while others are /wp-json/zettle-product-debug/v1/validate which I’m guessing is you guys testing.

    While this is great to see I’m unsure it will actually fix the issue as I completely disabled Cloudflare on the site, firewall and all, over the weekend and communication from Zettle to WooCommerce still wasn’t happening. We will monitor to see if this helps when purchases are made in store and let you know..

    Thread Starter Matthew Dixon

    (@matthewdixon)

    @joostvandevijver as a follow up it would be good to know from either Zettle or Inpsyde exactly what webhooks should be allowed through firewalls. I’m still seeing lots from /wp-json/zettle-product-debug/v1/validate, is the condition I’ve set up (wp-json/zettle) a good idea or too general? Maybe wp-json/zettle/ would be better to avoid these debug requests, or maybe they’re helpful?

    Plugin Support Syde Joost

    (@joostvandevijver)

    Hello @matthewdixon

    I asked our developer this, here is his answer:

    the only request that comes from the outside and not from the web browser is …/webhook/listen, the full URL depends on the WP URL structure settings.
    But I think firewalls usually do not care about URLs in incoming HTTP requests, they are usually more about things like IP, ports

    I hope this helps you further. Let me know if you have any more questions or if we can mark this thread as resolved.

    Kind regards,
    Joost

    Plugin Support Syde Joost

    (@joostvandevijver)

    Since we haven’t heard back from you, I’m going to mark it as resolved.
    In case you’re still having problems, feel free to let us know!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Inventory out of sync again with 404 errors in logs’ is closed to new replies.