• Resolved fernandocctech

    (@fernandocctech)


    Trying to sync with Square using Woocommerce as the system of record.

    It only managed to sync 5 products before it stopped working and now it keeps giving me an “Sync failed. Please try again” error every time I try to sync.

    The log just gives me an array filled with information from my Square account but the only error related message I could find there was:

    [0] => Square\Models\Error Object
    (
    [category:Square\Models\Error:private] => INVALID_REQUEST_ERROR
    [code:Square\Models\Error:private] => VERSION_MISMATCH
    [detail:Square\Models\Error:private] => Object version does not match latest database version.
    [field:Square\Models\Error:private] => version
    )

    Any way I can solve this issue?

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

Viewing 15 replies - 1 through 15 (of 19 total)
  • Plugin Support 3 Sons Development – a11n

    (@3sonsdevelopment)

    Hey @fernandocctech,

    Thanks for reaching out. I know these sync logs can be quite large. Do you see this right below where you spotted that error message?

    
    10-02-2019 @ 15:07:08 - Failed step cycle: upsert_categories (1.47s) - [VERSION_MISMATCH] Object version does not match latest database version.
    10-02-2019 @ 15:07:08 - [VERSION_MISMATCH] Object version does not match latest database version.
    

    Let us know and we’ll go from there.

    Thanks!

    Plugin Support Chris Moreira – a11n

    (@chrism245)

    I’m going to mark this as resolved, as we haven’t heard back from you in a while. Please open a new thread if you need further assistance.

    Hi @3sonsdevelopment im facing the same issue with my woocommerce – square sync , it says:

    [category:Square\Models\Error:private] => INVALID_REQUEST_ERROR
    [code:Square\Models\Error:private] => VERSION_MISMATCH
    [detail:Square\Models\Error:private] => Object version does not match latest database version.
    [field:Square\Models\Error:private] => version
    06-23-2022 @ 04:45:14 – Failed step cycle: upsert_categories (0.36s) –
    Any help??

    Plugin Support 3 Sons Development – a11n

    (@3sonsdevelopment)

    Hey @raheemmurtaza,

    Here’s one way you may be able to fix this. It does require editing the database directly so if you don’t feel comfortable doing that, please open up a ticket at WooCommerce.com and we can help you out.

    https://woocommerce.com/my-account/create-a-ticket/

    You can either use any database tools provided by the web host or a plugin like WP phpMyAdmin. Before making any changes, create a backup just in case.

    Then you’ll want to select the wp_options table. For this, wp_ is the default table prefix used by WordPress so this could be different on your site.

    Once you’ve located the options table, search for this option name, wc_square_category_map. Then deleted this row.

    After that try running a fresh sync and see how that goes. Typically, this should fix this problem.

    Let us know if you have any questions or trouble.

    Hi @3sonsdevelopment ! Sorry for the late reply, i checked with this solution and i have now run into a new error. Following is what it is showing me in the debug file:

    body: Array
    (
        [0] => Square\Models\Error Object
            (
                [category:Square\Models\Error:private] => INVALID_REQUEST_ERROR
                [code:Square\Models\Error:private] => INVALID_VALUE
                [detail:Square\Models\Error:private] => Invalid object: Invalid Object with Id: H36G4JZVJJWOIKTF6NBTIP45
    [merchant_token=5W37BA60T8TWG] Received request to update nonexistent object H36G4JZVJJWOIKTF6NBTIP45.
                [field:Square\Models\Error:private] => 
            )
    
    )
    
    06-28-2022 @ 04:46:00 - Failed step cycle: update_matched_products (30.34s) - 
    06-28-2022 @ 04:46:23 - Request

    Any help pls?

    Plugin Support 3 Sons Development – a11n

    (@3sonsdevelopment)

    Hey @raheemmurtaza,

    What that error means is WooCommerce and Square are attempting to sync an item with the Square ID H36G4JZVJJWOIKTF6NBTIP45. However, this ID doesn’t exist on the Square side so it’s returning an error.

    We have an open bug report about this with the developers to get a fix made. Until that happens you may be able to fix it this way.

    Back in your database, go to the _postmeta table and search the meta_value for H36G4JZVJJWOIKTF6NBTIP45.

    The post_id that is returned here will be the ID of this product. Take that ID number and search the _postmeta table for this post_id number. Then remove all of the rows that start with _square.

    **Please make a backup before making any changes.**

    After that you should be able to sync the product to Square again. You may have to toggle syncing off, update the product, and then turn it back on again.

    Let us know how that goes.

    Hi @3sonsdevelopment

    We’re having the same error. I have 24 of these errors.

    (
        [0] => Square\Models\Error Object
            (
                [category:Square\Models\Error:private] => INVALID_REQUEST_ERROR
                [code:Square\Models\Error:private] => INVALID_VALUE
                [detail:Square\Models\Error:private] => Invalid object: Invalid Object with Id: OANPJHTM3ZIAU3YPOXQDIDFR
    [merchant_token=Q0JA0RKVHAQ15] Received request to update nonexistent object OANPJHTM3ZIAU3YPOXQDIDFR.
                [field:Square\Models\Error:private] => 
            )
    
    )

    Surely we shouldn’t have to be “hacking” the database?

    What has caused this issue?

    My client needs the WooCommerce data sync’d to Square ASAP.

    Please kindly advise a solution.

    Plugin Support 3 Sons Development – a11n

    (@3sonsdevelopment)

    Hey @boylensupport,

    So far we don’t know what caused this but our developers are working on sorting out what’s the best way to move forward with this.

    Are the 24 instances of this error all for different object ids, or are they all for OANPJHTM3ZIAU3YPOXQDIDFR?

    The only non-database related fix for this I’m aware of would be to edit the product in WooCommerce so it doesn’t sync with Square and remove or alter the SKU. Then create a new product in WooCommerce if it’s the system of record. If Square is the system of record, then import products again from there and see if a new product is created for this one.

    They are all different objects, do I need to remove them to get this going in the interim? Will it fail each subsequent time?

    WooCommerce is our client’s system of record.

    Kind regards,

    Hi @3sonsdevelopment , unfortunately the hosting my client is using and its database manager does not allow searching for values within database tables.
    Is there any other way round to this? , it would be very helpful.
    Thanks!

    Hi @3sonsdevelopment,

    I’ve been looking into this further and have discovered on each product in the database there are two custom field types:
    – wc_square_synced
    – wcsquare_disable_sync

    Has the field changed when the plugin was updated recently?

    Does the Square sync function rely on which field to be set?

    I wonder if this is contributing to our issue.

    Is there an easier way to pass remove the database values in one command?

    Kindly advise.

    Plugin Support 3 Sons Development – a11n

    (@3sonsdevelopment)

    Hey @boylensupport,

    They are all different objects, do I need to remove them to get this going in the interim? Will it fail each subsequent time?

    WooCommerce is our client’s system of record.

    Currently, there are only two ways to approach this.

    1. Delete the product in WooCommerce and in Square. Then,recreate the product in WooCommerce and sync it to Square.
    2. Manually remove the Square data from the _postmeta table in the database.

    Neither of these are appealing workarounds but they should be functional until a fix for this can be released.

    @raheemmurtaza

    Is there any other way round to this?

    Is there any chance a plugin like WP phpMyAdmin would work? If so you could make the changes with it. I’m not aware of any plugins that allow us to edit “hidden” custom fields in the WordPress admin.

    If that’s not an option, then as I mentioned above, the only current option would be to complete delete the product in WooCommerce and Square. Then recreate the product in WooCommerce and sync it to Square.

    Let us know how it goes.

    Hi @3sonsdevelopment !!

    All the Non existing object errors have been resolved by your given approach , thanks to that but now it is showing a new error of operation timed out. Stated below:

    07-04-2022 @ 09:41:33 – Failed step cycle: update_matched_products (94.05s) – Operation timed out after 60001 milliseconds with 0 bytes received
    07-04-2022 @ 09:41:33 – Operation timed out after 60001 milliseconds with 0 bytes received
    07-04-2022 @ 09:42:07 – Request

    Any idea how to resolve this?

    Plugin Support 3 Sons Development – a11n

    (@3sonsdevelopment)

    Hey @raheemmurtaza,

    Please open up a ticket at WooCommerce.com so we can investigate this there. You may need to create a free account before submitting the ticket.

    https://woocommerce.com/my-account/create-a-ticket/

    Thanks!

    Hi @3sonsdevelopment !!

    Ive opened a ticket. Thanks for your support.

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Sync failed. Please try again’ is closed to new replies.