Support » Plugin: WooCommerce Square » Updated to 2.2.0 and now can’t import/sync

  • Resolved kegobeer

    (@kegobeer)


    I performed a manual import and pulled a new product from my Square account to my WooCommerce installation and it worked perfectly. Then, I updated to version 2.2.0, and a few minutes later I did another import to get a brand new item just loaded to my Square account. Unfortunately it is now stuck in a sync loop. Here is the log information that shows the previous completed import/sync and the new and failing import/sync:

    08-31-2020 @ 15:59:10 - Starting step cycle: update_category_data
    08-31-2020 @ 15:59:10 - Completed job step: update_category_data
    08-31-2020 @ 15:59:10 - Completed step cycle: update_category_data (0.26s)
    08-31-2020 @ 15:59:11 - Starting step cycle: update_product_data
    08-31-2020 @ 15:59:11 - Completed job step: update_product_data
    08-31-2020 @ 15:59:11 - Completed step cycle: update_product_data (0.62s)
    08-31-2020 @ 15:59:12 - Starting step cycle: update_inventory_counts
    08-31-2020 @ 15:59:13 - Completed job step: update_inventory_counts
    08-31-2020 @ 15:59:13 - Completed step cycle: update_inventory_counts (0.32s)
    08-31-2020 @ 16:02:32 - Starting step cycle: import_products
    08-31-2020 @ 16:02:34 - Imported Products Count: 0
    08-31-2020 @ 16:02:34 - Completed step cycle: import_products (2.64s)
    08-31-2020 @ 16:02:35 - Starting step cycle: import_products
    08-31-2020 @ 16:02:37 - Imported Products Count: 0
    08-31-2020 @ 16:02:37 - Completed step cycle: import_products (1.80s)
    08-31-2020 @ 16:02:38 - Starting step cycle: import_products
    08-31-2020 @ 16:02:39 - Imported Products Count: 0
    08-31-2020 @ 16:02:39 - Completed step cycle: import_products (1.82s)
    08-31-2020 @ 16:02:40 - Starting step cycle: import_products
    08-31-2020 @ 16:02:43 - Imported Products Count: 0
    08-31-2020 @ 16:02:43 - Completed step cycle: import_products (2.58s)
    08-31-2020 @ 16:02:44 - Starting step cycle: import_products
    08-31-2020 @ 16:02:48 - Imported Products Count: 1
    08-31-2020 @ 16:02:48 - Completed job step: import_products
    08-31-2020 @ 16:02:48 - Completed step cycle: import_products (4.05s)
    08-31-2020 @ 16:02:48 - Starting step cycle: import_inventory
    08-31-2020 @ 16:02:49 - Completed step cycle: import_inventory (0.84s)
    08-31-2020 @ 16:02:50 - Starting step cycle: import_inventory
    08-31-2020 @ 16:02:51 - Completed step cycle: import_inventory (1.13s)
    08-31-2020 @ 16:02:52 - Starting step cycle: import_inventory
    08-31-2020 @ 16:02:54 - Completed step cycle: import_inventory (1.63s)
    08-31-2020 @ 16:02:54 - Starting step cycle: import_inventory
    08-31-2020 @ 16:02:56 - Completed step cycle: import_inventory (1.42s)
    08-31-2020 @ 16:02:57 - Starting step cycle: import_inventory
    08-31-2020 @ 16:02:59 - Completed step cycle: import_inventory (1.97s)
    08-31-2020 @ 16:02:59 - Starting step cycle: import_inventory
    08-31-2020 @ 16:03:02 - Completed step cycle: import_inventory (2.84s)
    08-31-2020 @ 16:03:04 - Starting step cycle: import_inventory
    08-31-2020 @ 16:03:07 - Completed step cycle: import_inventory (2.65s)
    08-31-2020 @ 16:03:07 - Starting step cycle: import_inventory
    08-31-2020 @ 16:03:10 - Completed step cycle: import_inventory (2.63s)
    08-31-2020 @ 16:03:11 - Starting step cycle: import_inventory
    08-31-2020 @ 16:03:13 - Completed step cycle: import_inventory (2.32s)
    08-31-2020 @ 16:03:14 - Starting step cycle: import_inventory
    08-31-2020 @ 16:03:16 - Completed step cycle: import_inventory (2.30s)
    08-31-2020 @ 16:03:17 - Starting step cycle: import_inventory
    08-31-2020 @ 16:03:20 - Completed step cycle: import_inventory (2.50s)
    08-31-2020 @ 16:03:20 - Starting step cycle: import_inventory
    08-31-2020 @ 16:03:23 - Completed step cycle: import_inventory (2.29s)
    08-31-2020 @ 16:03:23 - Starting step cycle: import_inventory
    08-31-2020 @ 16:03:26 - Completed step cycle: import_inventory (2.81s)
    08-31-2020 @ 16:03:27 - Starting step cycle: import_inventory
    08-31-2020 @ 16:03:28 - Completed job step: import_inventory
    08-31-2020 @ 16:03:28 - Completed step cycle: import_inventory (1.25s)
    08-31-2020 @ 16:20:25 - Starting upgrade to v2.2.0
    08-31-2020 @ 16:20:25 - Upgrade to v2.2.0 complete
    08-31-2020 @ 16:21:53 - Starting step cycle: import_products
    08-31-2020 @ 16:23:01 - Imported New Products Count: 0
    08-31-2020 @ 16:23:01 - Updated Products Count: 17
    08-31-2020 @ 16:23:01 - Completed step cycle: import_products (68.52s)
    08-31-2020 @ 16:23:02 - Starting step cycle: import_products
    08-31-2020 @ 16:32:27 - Starting step cycle: import_products
    08-31-2020 @ 16:37:31 - Starting step cycle: import_products

    You can see the import that started at 16:21:53 just keeps going.

Viewing 15 replies - 31 through 45 (of 55 total)
  • Plugin Contributor mattdallan

    (@mattdallan)

    Hey @kegobeer, @andrewcrook and @popped

    I’m here to let you know we’ve just released 2.2.1 which includes the fixes for the infinite looping issue you reported along with some other QOL changes like being able to run the import without updating every product from Square.

    Please let me know if you run into any problems with the latest release.

    Thanks and have a good weekend if I don’t hear from ya’ll before then 😀

    Thread Starter kegobeer

    (@kegobeer)

    @mattdallan Nothing is fixed for me. I just did an import and selected update existing items, and it’s stuck and it’s still uploading all of the images again for all of the items.

    • This reply was modified 1 year ago by kegobeer.
    Thread Starter kegobeer

    (@kegobeer)

    @mattdallan If I do an import and don’t select all existing items, then the import runs correctly.

    popped

    (@popped)

    I’m trying now as well

    popped

    (@popped)

    Pretty sure it’s stuck in a loop again

    popped

    (@popped)

    @mattdallan Not working (selecting update other products too) was stuck again. tried without selecting that option and I get Sync Failed, please try again. I tried 3 times. No good.

    Plugin Contributor mattdallan

    (@mattdallan)

    Hi @kegobeer and @popped,

    Not good news by the sounds of this and I appreciate you letting me know of these issues ASAP.

    > it’s still uploading all of the images again and it’s stuck

    Even though we fixed the looping issue it sounds like it’s still happening on your store. Let me try figure out other areas that may be causing this. It sounds PHP is still timing out before we can mark products as being processed by the importer so it keeps continuing to import the same products.

    To stop any potential lopping during the import, please disconnect your store from Square and reconnect.

    Are you seeing any errors in the Square logs (found WooCommerce > Status > Logs) or in the PHP logs?

    > Sync Failed, please try again

    Seeing this error tells us that there was an exception thrown or a PHP fatal error during the import.

    Do you have PHP error logs available to see what caused this “Sync Failed” message?

    Thanks for all your patience with these issues.

    Thread Starter kegobeer

    (@kegobeer)

    No errors in the PHP logs and the Square log just shows that the import is happening. I can enable debug logs for Square and see what they grab during the import.

    Plugin Contributor mattdallan

    (@mattdallan)

    Thanks @kegobeer, that would be helpful!

    Thread Starter kegobeer

    (@kegobeer)

    @mattdallan Where do you want me to send the log?

    Plugin Contributor mattdallan

    (@mattdallan)

    Thread Starter kegobeer

    (@kegobeer)

    @mattdallan Just sent the log to you.

    Plugin Contributor mattdallan

    (@mattdallan)

    @kegobeer Yes, thank-you! I’m looking over them now

    Plugin Contributor mattdallan

    (@mattdallan)

    @kegobeer, thanks a lot for sending me the logs.

    Firstly, I have been able to reproduce an issue where the images are being reloaded once per import that is ran.

    While we fixed the looping issue where the same images were being uploaded 1000s of times, we’re still seeing 1 image for each product being re-uploaded on each import. This is obviously not working unintended and I’ll get a fix for that.

    Now to your logs. At the start of the logs, I can see a bunch of lines that suggest the import is looping:

    
    09-10-2020 @ 20:13:34 - Starting step cycle: import_products
    09-10-2020 @ 20:20:03 - Starting step cycle: import_products
    

    This is then followed by you disconnecting and reconnecting Square.

    
    09-10-2020 @ 20:32:32 - Manually disconnected
    

    Was this when you updated to 2.2.1?

    From there on, I can’t see any indication of looping or the import getting stuck.
    It does seem to be moving very slow, but in the middle of the logs, I can see confirmation that it’s successfully processing the import in batches:

    
    09-10-2020 @ 22:54:32 - Imported New Products Count: 0
    09-10-2020 @ 22:54:32 - Updated Products Count: 17
    09-10-2020 @ 22:54:32 - Completed step cycle: import_products (50.33s)
    09-10-2020 @ 22:54:32 - Starting step cycle: import_products
    

    And in the middle of processing the second batch it looks like you disconnected and reconnected Square:

    
    09-10-2020 @ 22:58:36 - Manually disconnected
    09-10-2020 @ 22:58:58 - Access token successfully received.
    09-10-2020 @ 22:58:58 - Refresh token successfully received.
    

    I couldn’t see any other times where the import was restarted or timed out, so it appears to be mostly working.

    After we fix up the images still being re-uploaded on every update, one thing we could try is make the import batches smaller.

    By default, they’re set to fetch 100 products at a time, so I’d like to try drop this to something smaller like 25 or even 10.

    This can be done by adding the following filter:

    
    function kegobeer_square_import_api_limit( $limit ) {
    	return 10;
    }
    add_filter( 'wc_square_import_api_limit', 'kegobeer_square_import_api_limit', 10, 1 );
    
    popped

    (@popped)

    @mattdallan uou mention the images import with @kegobeer but I seem to also be having an issue where some images are not importing at all. I can send you logs tomorrow if mine as well if you need. 2.2.0 and your new 2.2.1 do not work for me

Viewing 15 replies - 31 through 45 (of 55 total)
  • The topic ‘Updated to 2.2.0 and now can’t import/sync’ is closed to new replies.