Home › Forums › GoogleSync › Authentication Error with Sync
- This topic has 12 replies, 2 voices, and was last updated 1 year, 3 months ago by nmedia.
-
AuthorPosts
-
May 12, 2023 at 6:23 pm #151147Nicholas WilsonParticipant
Autofetch works beautifully but whenever I try to run the AutoSync function within Google Sheets, I receive the following error:
Error while connecting your site: Exception: Request failed for https://[my domain].com returned code 401. Truncated server response: {“code”:”invalid_username”,”message”:”Error:<\/strong> Unknown username. Check again or try your email address.”,”data”:{“status”:401}} (use muteHttpExceptions option to examine full response)
May 14, 2023 at 4:55 am #151169nmediaKeymasterHi,
Thanks for the feedback, we will check and get back to you soon.
May 15, 2023 at 7:25 pm #151207Nicholas WilsonParticipantUpdate:
This error only seems to occur when I try to explicitly run the AutoSync function from within the script editor. When I execute the script manually via the menu (Extensions -> Bulk Product Sync With Google Sheets -> Sync Data -> Sync Products) it works as intended.
There must be some function the Sync Products button calls that executing the AutoSync function by itself does not. This should be easily solvable by the addition of a couple lines of code calling whatever missing functions need to be called.
Additionally, I’ve found two bugs you might want to look into.
1) If unicode character U+2028 “ ” is contained in any of the fields, the fetch or sync will fail by hanging mid-chunk and provide no contextual error message as to why it isn’t working. Suggest you automatically sanitize this character.
2) When fetching product attributes, there are no spaces between the JSON syntax delimiters (e.g. [{“id”:33,”name”:”Reference”,…) however, if someone tries to sync to WC with a product attribute formatted in this way it will fail with no real indication as to why. It seems like your sheet requires spaces in order to work correctly (e.g. [ { “id”: 33, “name”: “Reference”, …). I had to make the following substitutions to all product attribute blobs to make the sync work correctly:
“[” to “[ ”
“{” to “{ ”
“:” to “: ”
“,” to “, ”
“]” to ” ]”
“}” to ” }”
This isn’t an issue for me anymore but seems like it would be an easy fix to be agnostic of the spacing.May 18, 2023 at 5:00 am #151268nmediaKeymasterHi,
thanks for sharing more details to debug this issue and it will help us.
1. Ok we will see how to handle unicode issue.
2. And regarding the formatting, I don’t think it’s the case. We don’t provide any spacing in JSON data for attributes.
June 1, 2023 at 9:19 pm #151621Nicholas WilsonParticipantAny update here? AutoSync still doesnt work when executed via the script.
June 3, 2023 at 1:22 pm #151637nmediaKeymasterWe have updated our AutSync code on May 25, did you try this?
June 5, 2023 at 5:59 pm #151671Nicholas WilsonParticipantI’ve updated and it’s a small improvement. I can sync about 70 rows at a time but any more and it times out. It would probably work if I could change the chunk size from 100 to 50 but the settings tab doesn’t preserve my chunk selection size: https://i.imgur.com/0N5k1Fp.mp4. Is the automatic resorting of the settings table expected behavior?
June 6, 2023 at 7:47 pm #151683Nicholas WilsonParticipantCan you let me know how to change the chunk size?
June 11, 2023 at 3:59 am #151755nmediaKeymasterHi,
Right now chunk size is fixed for 100 products/requests. But in future, we will allow admin to change it.
June 12, 2023 at 1:04 pm #151802Nicholas WilsonParticipantOk. Until then I’d like a refund because your product does not work as advertised unless I can update my products in smaller chunks.
June 14, 2023 at 4:01 am #151900nmediaKeymasterNicholas,
the missing sync issues have been fixed. YOu must try with a new connection. We had this issue and we fixed and verified it after version 7.6
June 14, 2023 at 5:54 pm #151918Nicholas WilsonParticipantI understand you’ve fixed the missing sync issues and I appreciate that and can confirm that part of the process works.
However, I am still unable to sync a full 100 products. My catalog has a very large amount of metadata associated with each product and can only sync between 60-70 products before the script times out and fails.
If I manually delete the “OK” in the sync column for no more than 50 products, everything works fine, but that breaks the purpose of having an AutoSync functionality at all. Allowing a user to define a lower chunk size seems like a pretty trivial fix, no? Because until this happens, this plugin can’t do what it’s supposed to for my use case.
I’m happy to jump on a zoom call to show you the issue in more detail if you’d like.
June 19, 2023 at 4:13 am #151954nmediaKeymasterOk, well please make a short video about this issue and share.
-
AuthorPosts
- You must be logged in to reply to this topic.