• Resolved Jim

    (@jsheward)


    I have just started receiving the following error in the square logs when syncing. My last successful sync was on 4 Nov 2023.

    11-13-2023 @ 21:30:14 - Completed step cycle: refresh_category_mappings (0.28s)
    11-13-2023 @ 21:30:14 - Starting step cycle: refresh_category_mappings
    11-13-2023 @ 21:30:14 - Completed job step: refresh_category_mappings (Mapped categories: 32, Unmapped categories: 0)
    11-13-2023 @ 21:30:14 - Completed step cycle: refresh_category_mappings (0.00s)
    11-13-2023 @ 21:30:14 - Starting step cycle: query_unmapped_categories
    11-13-2023 @ 21:30:14 - Completed job step: query_unmapped_categories (Total mapped categories: 32)
    11-13-2023 @ 21:30:14 - Completed step cycle: query_unmapped_categories (0.00s)
    11-13-2023 @ 21:30:14 - Starting step cycle: upsert_categories
    11-13-2023 @ 21:30:14 - Request
     Request
    method:
    uri: batchUpsertCatalogObjects
    user-agent: WooCommerce-Square/4.2.2 (WooCommerce/8.2.2; WordPress/6.4.1)
    headers: Array
    (
    )
    body:
    duration: 0.35814s
    
    11-13-2023 @ 21:30:14 - Response
     Response
    code: 400
    message:
    headers: Array
    (
        [0] => HTTP/2 400
        [date] => Mon, 13 Nov 2023 10:30:14 GMT
        [content-type] => application/json
        [content-length] => 159
        [cf-ray] => 82565694ccb9a932-SYD
        [cf-cache-status] => DYNAMIC
        [content-encoding] => gzip
        [strict-transport-security] => max-age=631152000; includeSubDomains; preload
        [vary] => Origin, Accept-Encoding
        [square-version] => 2023-07-20
        [x-content-type-options] => nosniff
        [x-download-options] => noopen
        [x-frame-options] => SAMEORIGIN
        [x-permitted-cross-domain-policies] => none
        [x-speleo-traceid] => CDN-0b328ae7-79ad-4386-8a14-a78a127e7aa0
        [x-sq-dc] => aws
        [x-sq-region] => us-west-2
        [x-xss-protection] => 1; mode=block
        [set-cookie] => __cf_bm=xQyQHB3pq4EROC9VksKR7dNdW34wCr0oHX2xgQUaKXI-1699871414-0-AQnsq+qEFRegumnuG5J2L5CBurCVKLWOo+j1k1HN/71pedNOdIO76nin+U20Z58D+On7GvFKxMqMD+wFAtKWSrM=; path=/; expires=Mon, 13-Nov-23 11:00:14 GMT; domain=.connect.squareup.com; HttpOnly; Secure; SameSite=None
        [server] => cloudflare
    )
    body: Array
    (
        [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
            )
    
    )
    
    11-13-2023 @ 21:30:14 - Failed step cycle: upsert_categories (0.36s) - [VERSION_MISMATCH] Object version does not match latest database version.
    11-13-2023 @ 21:30:14 - [VERSION_MISMATCH] Object version does not match latest database version.

    Any ideas on what is causing this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • hrn1995 (woo-hc)

    (@aguinaldodarla)

    Hi @jsheward

    From the logs, the error might have been arising due to a discrepancy between the version of the objects in your database and the latest version that Square is expecting.

    Kindly ensure that both the database and Square plugin are up-to-date. You can update your database from WooCommerce Tools Update Database then try resyncing your data from Square to WooCommerce from the WooCommerce settings page, under the Square settings. This might take a while depending on the number of products you have.

    I hope this helps! Let us know how it goes.

    Thread Starter Jim

    (@jsheward)

    Hi Darla,

    Thanks for your suggestion, unfortunately this did not work.

    I discovered that the issue was caused because I created a staging site, which also sync’d to square. The versions therefore updated against the staging site, and when I returned to the live version of the site, there was a version mismatch.

    I corrected this by deleting all the square meta data from the products, essentially indicating to square that these were all new products, and then deleting the catalogue in the square store. So essentially I started over and re-uploaded the entire store. Not sure if there was a simpler solution?

    Hi @jsheward

    I discovered that the issue was caused because I created a staging site, which also sync’d to square. The versions therefore updated against the staging site, and when I returned to the live version of the site, there was a version mismatch.

    I’m glad you were able to find a solution to your inquiry here and thanks for sharing it with the community too! ??

    I will be marking this thread as resolved. Should you have further inquiries, kindly create a new topic here.

    I corrected this by deleting all the square meta data from the products, essentially indicating to square that these were all new products, and then deleting the catalogue in the square store. So essentially I started over and re-uploaded the entire store. Not sure if there was a simpler solution?

    Your solution to the issue is actually one of the recommended ways to resolve such conflicts. Resetting the data and starting from scratch helps in eliminating any discrepancies that may have arisen due to version mismatch between the staging and live site.

    However, for future reference, a simpler solution could be to ensure that your staging site is not synced to Square or any other live platform. This way, any changes or updates you make on the staging site won’t affect your live site.

    Hope this helps!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘VERSION_MISMATCH error’ is closed to new replies.